~swisschili/toolchain-6502

207a084466d6a7609a4816dff8840920f045efed — swissChili 3 months ago e392aeb
Site
13 files changed, 1 insertions(+), 370 deletions(-)

A docs/.gitignore
D docs/site/CNAME
D docs/site/building.html
D docs/site/colors.dat
D docs/site/demo.webm
D docs/site/disco.dat
D docs/site/examples.html
D docs/site/index.html
D docs/site/index.md
D docs/site/styles.css
D docs/site/styles.scss
D docs/site/usage.html
D docs/site/usage.md
A docs/.gitignore => docs/.gitignore +1 -0
@@ 0,0 1,1 @@
site

D docs/site/CNAME => docs/site/CNAME +0 -1
@@ 1,1 0,0 @@
6502.swisschili.sh
\ No newline at end of file

D docs/site/building.html => docs/site/building.html +0 -61
@@ 1,61 0,0 @@
<html>
	<head>
		<meta name="viewport" content="width=device-width">
		<link rel="stylesheet"
			href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/styles/default.min.css">
		<link rel="stylesheet" href="styles.css">
		<title>Building</title>
	</head>
	<body>
		<main class="split container">
			<div class="sidebar">
				<h2><a href="/">6502</a></h2>

				<p>
					6502 Toolchain written by <a href="https://github.com/swissChili">swissChili</a>
				</p>

				<ul>
					<li><a href="https://github.com/swissChili/6502">Git</a></li>
					<li><a href="/usage.html">Basic usage</a></li>
					<li><a href="/examples.html">Example programs</a></li>
					<li><a href="/building.html">Building from source</a></li>
				</ul>
			</div>
			<div class="body">
				<h1> Building from source</h1>
You need the following libraries installed to build the emulator:
<br>
<code>pthread</code> <code>rt</code> <code>m</code> <code>SDL2</code> <code>GL</code> <code>GLEW</code> <code>GLU</code> <code>readline</code>
<br>
The first three will be included on any POSIX compliant operating system (OS X, Linux, BSD, etc).
To install SDL2, visit its <a href="https://www.libsdl.org/">website</a> or use your distributions
package manager.
<br>
<br>
You also need <code>awk</code> installed if you want to modify the <code>6502.csv</code> file from which parts of the
emulator are generated. If you don't want to do this, run cmake with <code>-DGEN_INSTRUCTIONS_HEADER=OFF</code>
<br>
<br>
You may be able to build this on Windows using Cygwin or MinGW, but I haven't tested that.
<br>
<br>
Run the usual commands to build with cmake:
<pre><code class>$ mkdir build
$ cd build
$ cmake ..
$ make -j
$ ./6502 # you built it, nice</code></pre>
			</div>
		</main>

		<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/highlight.min.js"></script>
		<script>
			document.addEventListener('DOMContentLoaded', (event) => {
				document.querySelectorAll('pre code').forEach((block) => {
					hljs.highlightBlock(block);
				});
			});
		</script>
	</body>
</html>

D docs/site/colors.dat => docs/site/colors.dat +0 -0

D docs/site/demo.webm => docs/site/demo.webm +0 -0

D docs/site/disco.dat => docs/site/disco.dat +0 -0

D docs/site/examples.html => docs/site/examples.html +0 -82
@@ 1,82 0,0 @@
<html>
	<head>
		<meta name="viewport" content="width=device-width">
		<link rel="stylesheet"
			href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/styles/default.min.css">
		<link rel="stylesheet" href="styles.css">
		<title>Examples</title>
	</head>
	<body>
		<main class="split container">
			<div class="sidebar">
				<h2><a href="/">6502</a></h2>

				<p>
					6502 Toolchain written by <a href="https://github.com/swissChili">swissChili</a>
				</p>

				<ul>
					<li><a href="https://github.com/swissChili/6502">Git</a></li>
					<li><a href="/usage.html">Basic usage</a></li>
					<li><a href="/examples.html">Example programs</a></li>
					<li><a href="/building.html">Building from source</a></li>
				</ul>
			</div>
			<div class="body">
				<h1> Example Programs</h1>
Download the compiled programs and try them out in the emulator!
<h3> Colors</h3>
Draws every supported color on the screen.
<a href="colors.dat" download>Download</a>
<br>
<pre><code class>	LDY #$0
loop:
	TYA
	STA $200, Y
	STA $300, Y
	STA $400, Y
	STA $500, Y
	INY
	CMP #$ff
	BCC loop
	BRK</code></pre>
<h3> Disco</h3>
Epilepsy warning: lots of flashing colors. Due to how much faster this emulator is
than the one this program was written for, it's more of just flashing colors than
what it originally looked like.
<a href="disco.dat" download>Download</a>
<br>
<pre><code class>; Taken from 6502asm.com
<br>
start:
	inx
	txa
	sta $200, y
	sta $300, y
	sta $400, y
	sta $500, y
	iny
	tya
	cmp 16
	bne do
	iny
	jmp start
do:
	iny
	iny
	iny
	iny
	jmp start</code></pre>
			</div>
		</main>

		<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/highlight.min.js"></script>
		<script>
			document.addEventListener('DOMContentLoaded', (event) => {
				document.querySelectorAll('pre code').forEach((block) => {
					hljs.highlightBlock(block);
				});
			});
		</script>
	</body>
</html>

D docs/site/index.html => docs/site/index.html +0 -66
@@ 1,66 0,0 @@
<html>
	<head>
		<meta name="viewport" content="width=device-width">
		<link rel="stylesheet"
			href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/styles/default.min.css">
		<link rel="stylesheet" href="styles.css">
		<title>Home</title>
	</head>
	<body>
		<main class="split container">
			<div class="sidebar">
				<h2><a href="/">6502</a></h2>

				<p>
					6502 Toolchain written by <a href="https://github.com/swissChili">swissChili</a>
				</p>

				<ul>
					<li><a href="https://github.com/swissChili/6502">Git</a></li>
					<li><a href="/usage.html">Basic usage</a></li>
					<li><a href="/examples.html">Example programs</a></li>
					<li><a href="/building.html">Building from source</a></li>
				</ul>
			</div>
			<div class="body">
				<h1> 6502 Toolchain</h1>
<center>
	<video controls="true">
		<source src="demo.webm" type="video/webm">
	</video>
</center>
<br>
This project aims to create a fast, powerful, and easy to use toolchain for writing, debugging,
and running programs for the 6502 processor. It features a graphical and CLI debugger, disassembler,
and emulator.
<br>
<h2> Features</h2><h3> 8 bit color</h3>
That's 16 times more colors than <a href="http://6502asm.com/" target="_blank">the competition</a>!
<h3> Graphical debugger</h3>
Easily step through, run, and debug your programs using a fast graphical debugger. A traditional
CLI debugger is also available.
<h3> Fully multithreaded</h3>
The graphical debugger, cli debugger, and screen are all fully asynchronous. That means your
debugger stays fast, even when the emulator is running at full capacity.
It will soon be possible to even debug an already running instance of the emulator!
<h3> <i>Fast</i></h3>
This emulator is incredibly fast. So fast that programs written for other emulators don't work
properly half the time because of how fast it is! At some point I will add an option to slow
the emulator down so it is comparable to other emulators.
<br>
<br>
<br>
So what are you waiting for? Download the emulator now, or build it from source.
			</div>
		</main>

		<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/highlight.min.js"></script>
		<script>
			document.addEventListener('DOMContentLoaded', (event) => {
				document.querySelectorAll('pre code').forEach((block) => {
					hljs.highlightBlock(block);
				});
			});
		</script>
	</body>
</html>

D docs/site/index.md => docs/site/index.md +0 -9
@@ 1,9 0,0 @@
@parent = home.html
@title = Home

<center>
	<video controls="true">
		<source src="demo.webm" type="video/webm">
	</video>
</center>


D docs/site/styles.css => docs/site/styles.css +0 -54
@@ 1,54 0,0 @@
html,
body {
  font-family: sans-serif;
}

body {
  display: grid;
  place-items: center center;
}

h4 code {
  font-size: 1.5em;
}

code {
  background: #f2f4f4;
  border-radius: 5px;
  padding: 3px 5px 3px 5px;
}

.container {
  width: 60em;
}

.nav {
  font-size: 1.5rem;
  display: flex;
  flex-direction: row;
}
.nav .wide {
  flex: 1;
  font-weight: bold;
}

.split {
  display: grid;
  grid-template-columns: 16em auto;
}

video {
  width: 100%;
}

@media screen and (max-width: 58em) {
  .split {
    display: flex;
    flex-direction: column;
  }

  .container {
    width: calc(100% - 2em);
    margin: 1em;
  }
}

D docs/site/styles.scss => docs/site/styles.scss +0 -31
@@ 1,31 0,0 @@
html,
body {
  font-family: /*'Segoe UI', 'Roboto', 'San Francisco', 'IBM Plex Sans',*/ sans-serif;
}

body {
  display: grid;
  place-items: center center
}

.container {
  width: 50vw;
}

.nav {
  font-size: 1.5rem;
  display: flex;
  flex-direction: row;

  .wide {
    flex: 1;
    font-weight: bold;
  }
}

@media screen and (max-width: 960px) {
  .container {
    width: calc(100% - 2em);
    margin: 1em;
  }
}
\ No newline at end of file

D docs/site/usage.html => docs/site/usage.html +0 -62
@@ 1,62 0,0 @@
<html>
	<head>
		<meta name="viewport" content="width=device-width">
		<link rel="stylesheet"
			href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/styles/default.min.css">
		<link rel="stylesheet" href="styles.css">
		<title>Usage</title>
	</head>
	<body>
		<main class="split container">
			<div class="sidebar">
				<h2><a href="/">6502</a></h2>

				<p>
					6502 Toolchain written by <a href="https://github.com/swissChili">swissChili</a>
				</p>

				<ul>
					<li><a href="https://github.com/swissChili/6502">Git</a></li>
					<li><a href="/usage.html">Basic usage</a></li>
					<li><a href="/examples.html">Example programs</a></li>
					<li><a href="/building.html">Building from source</a></li>
				</ul>
			</div>
			<div class="body">
				<h1> Basic Usage</h1>
The <code>6502</code> command takes some arguments that control how it functions. Each flag is documented
here. Note that only UNIX style flags are supported, not GNU style. This uses the standard
<code>getopt()</code> function, so flags work the same as any UNIX command.
<h4> <code>-g</code></h4>
Opens a GUI debugger window.
<h4> <code>-s</code></h4>
Opens a window that shows the emulators screen. Cannot be used in conjunction with <code>-g</code>.
<h4> <code>-H</code></h4>
Keep the emulator running after the CPU halts (after an interrupt is triggered). Useful
for debugging short programs. Does nothing when used with <code>-D</code>.
<h4> <code>-d</code></h4>
Disassemble the input file, printing the whole disassembly to <code>stdout</code>. You probably want
to use this with <code>-n</code>
<h4> <code>-r</code></h4>
Run the input file. Can be used in conjunction with <code>-s</code> to run and display the output.
<h4> <code>-D</code></h4>
Open CLI debugger. Can be used with <code>-s</code> to view screen while debugging. 
<h4> <code>-i input</code></h4>
Read <code>input</code> into the CPUs memory.
<h4> <code>-n number_of_instructions</code></h4>
Disassemble only <code>number_of_instructions</code> instructions.
<h4> <code>-h, -?</code></h4>
Print a help message.
			</div>
		</main>

		<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/highlight.min.js"></script>
		<script>
			document.addEventListener('DOMContentLoaded', (event) => {
				document.querySelectorAll('pre code').forEach((block) => {
					hljs.highlightBlock(block);
				});
			});
		</script>
	</body>
</html>

D docs/site/usage.md => docs/site/usage.md +0 -4
@@ 1,4 0,0 @@
@parent = page.html
@title = Usage

# Basic Usage
\ No newline at end of file