removeBOM(); new web images

This commit is contained in:
Steven Hugg 2018-08-07 16:15:45 -04:00
parent d6fe963f62
commit b81f4d04b9
14 changed files with 107 additions and 31 deletions

View File

@ -160,25 +160,23 @@ We're always adding new things here, so subscribe to our mailing list for update
<h1 class="text-center">Learn More With a Book!</h1>
<div class="container">
<div class="row">
<div class="col-md-3">
<div class="col-md-2">
<a target="_blank" href="https://www.amazon.com/gp/product/1541021304/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1541021304&linkCode=as2&tag=pzp-20&linkId=c149f6365c0a676065eb6d7c5f8dd6ae" onclick="ga('send', 'event', 'books', 'click', 'vcs');">
<img border="0" src="//ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&MarketPlace=US&ASIN=1541021304&ServiceVersion=20070822&ID=AsinImage&WS=1&Format=_SL250_&tag=pzp-20" ></a>
<img class="img-responsive" border="0" src="//ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&MarketPlace=US&ASIN=1541021304&ServiceVersion=20070822&ID=AsinImage&WS=1&Format=_SL250_&tag=pzp-20" ></a>
<img src="//ir-na.amazon-adsystem.com/e/ir?t=pzp-20&l=am2&o=1&a=1541021304" />
</div>
<div class="col-md-8">
<div class="col-md-4">
<a target="_blank" href="https://www.amazon.com/gp/product/1541021304/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1541021304&linkCode=as2&tag=pzp-20&linkId=c149f6365c0a676065eb6d7c5f8dd6ae" onclick="ga('send', 'event', 'books', 'click', 'vcs');">
<h3>Making Games For The Atari 2600</h3>
</a>
<p>The Atari 2600 was released in 1977, and now there's finally a book about how to write games for it! You'll learn about the 6502 CPU, NTSC frames, scanlines, cycle counting, players, missiles, collisions, procedural generation, pseudo-3D, and more. While using the manual, take advantage of our Web-based IDE to write 6502 assembly code, and see your code run instantly in the browser. We'll cover the same programming tricks that master programmers used to make classic games. Create your own graphics and sound, and share your games with friends!</p>
</div>
</div>
<div class="row">
<div class="col-md-3">
<div class="col-md-2">
<a target="_blank" href="https://www.amazon.com/gp/product/1545484759/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1545484759&linkCode=as2&tag=pzp-20&linkId=2f3c42111bffe3466830939fff4053fc" onclick="ga('send', 'event', 'books', 'click', 'arcade');">
<img border="0" src="//ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&MarketPlace=US&ASIN=1545484759&ServiceVersion=20070822&ID=AsinImage&WS=1&Format=_SL250_&tag=pzp-20" ></a>
<img class="img-responsive" border="0" src="//ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&MarketPlace=US&ASIN=1545484759&ServiceVersion=20070822&ID=AsinImage&WS=1&Format=_SL250_&tag=pzp-20" ></a>
<img src="//ir-na.amazon-adsystem.com/e/ir?t=pzp-20&l=am2&o=1&a=1545484759" />
</div>
<div class="col-md-8">
<div class="col-md-4">
<a target="_blank" href="https://www.amazon.com/gp/product/1545484759/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1545484759&linkCode=as2&tag=pzp-20&linkId=2f3c42111bffe3466830939fff4053fc" onclick="ga('send', 'event', 'books', 'click', 'arcade');">
<h3>Making 8-Bit Arcade Games in C</h3>
</a>
@ -188,13 +186,78 @@ We're always adding new things here, so subscribe to our mailing list for update
</div>
<h1 class="text-center">Supported Platforms</h1>
<div class="container">
<div class="row">
<div class="col-md-3">
<div class="col-md-4">
<h2><a href="redir.html?platform=vcs">Atari 2600</a></h2>
<p>
In 1977, the Atari 2600 popularized the idea of programmable video game consoles.
Its 6502 CPU and mere 128 bytes of RAM powered hundreds of classic games.
Fiendishly difficult to program, developers learned plenty of tricks for "racing the beam" to generate displays far beyond what its designers believed possible.
</p>
</div>
<div class="col-md-6">
<div class="col-md-4">
<h2><a href="redir.html?platform=vicdual">VIC Dual</a></h2>
<p>
The VIC Dual system was one of the first CPU-based arcade platforms from Gremlin Industries, later acquired by Sega.
It used a Z80 CPU and a character-based display with simple RGB colors.
"Carnival" is probably the best-remembered game on this platform.
</p>
</div>
<div class="col-md-3">
<div class="col-md-4">
<h2><a href="redir.html?platform=mw8080bw">Midway 8080</a></h2>
<p>
The Midway 8080 system powered Gun Fight, the first CPU-based arcade game.
Later, it would also run the immensely popular Space Invaders.
It used a Z80 and a simple black-and-white frame buffer backed by 7 KB of RAM, a huge amount for the time.
</p>
</div>
</div>
<div class="row">
<div class="col-md-4">
<img class="img-responsive center-block" src="images/scrnshots/atari2600-1-fs8.png">
</div>
<div class="col-md-4">
<img class="img-responsive center-block" src="images/scrnshots/vicdual-1-fs8.png">
</div>
<div class="col-md-4">
<img class="img-responsive center-block" src="images/scrnshots/mw8080-1-fs8.png">
</div>
</div>
<div class="row">
<div class="col-md-4">
<h2><a href="redir.html?platform=galaxian-scramble">Galaxian/Scramble</a></h2>
<p>
Galaxian pushed the limit of video game designs in 1979, with a 3 MHz Z80 and RGB color graphics with hardware sprites overlapping a scrolling background.
This hardware was licensed for many classics like Scramble and Frogger.
</p>
</div>
<div class="col-md-4">
<h2><a href="redir.html?platform=vector-z80color">Atari Vector</a></h2>
<p>
Atari's black-and-white vector games like Lunar Lander and Asteroids took the industry by storm, later leading to color vector games like Tempest.
Powered by a 6502 CPU and custom state machine, they could draw points and lines at a resolution far beyond the CRT-based games of the era.
</p>
</div>
<div class="col-md-4">
<h2><a href="redir.html?platform=williams-z80">Williams</a></h2>
<p>
The Williams games like Defender, Robotron, and Joust were powered by plenty of hardware.
A 36 KB framebuffer gave it 16-color graphics, and a custom bit blitter chip moved pixels around quickly.
A separate CPU powered its unique sound effects.
</p>
</div>
</div>
<div class="row">
<div class="col-md-4">
<img class="img-responsive center-block" src="images/scrnshots/galaxian-1-fs8.png">
</div>
<div class="col-md-4">
<img class="img-responsive center-block" src="images/scrnshots/vector-1-fs8.png">
</div>
<div class="col-md-4">
<img class="img-responsive center-block" src="images/scrnshots/williams-1-fs8.png">
</div>
</div>
</div>
@ -207,6 +270,9 @@ We're always adding new things here, so subscribe to our mailing list for update
&copy; 2018 Puzzling Plans LLC.
<a href="privacy.html" target="_blank">Privacy Policy.</a>
</p>
<p>
Some brands and product names mentioned are trademarks or service marks of their respective companies. Use of a term in this work should not be regarded as affecting the validity of any trademark or service mark.
</p>
</footer>
</div> <!-- /container -->

View File

@ -49,6 +49,10 @@ TODO:
- go to error in include files
- BOM in upload/download?
FYI: Image links for the books on http://8bitworkshop.com/ are broken
On the website the additional grey spacing next to the program line numbers is not dynamically resized when the web browser window size is changed. Intentional?
WEB WORKER FORMAT

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1023 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 783 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -27,7 +27,7 @@ body {
<!-- TODO: doesn't work properly when screen isn't exactly centered -->
<div id="thumbnaildiv" style="float:right;margin-top:20%;transform:scale(2);margin-right:10%">
</div>
<div id="maineditor" style="height:100%">
<div id="maineditor" style="margin-left:10%;margin-top:5%;height:100%">
</div>
</div>
@ -48,8 +48,7 @@ if (window.self === window.top) {
var palette = [0xff000000, 0xffffffff];
*/
var paldatastr = " 0x00, 0x03, 0x19, 0x50, 0x52, 0x07, 0x1f, 0x37, 0xe0, 0xa4, 0xfd, 0xff, 0x38, 0x70, 0x7f, 0xf8, ";
var fmt = {w:14,h:16,bpp:4,brev:1,count:2};
//fmt = {w:14,h:8,bpp:4,brev:1,count:2};
var fmt = {w:14,h:16,bpp:4,brev:1,count:128};
var datastr = "0x00,0x00,0xef,0xef,0xe0,0x00,0x00, 0x00,0xee,0xee,0xfe,0xee,0xe0,0x00, 0x0e,0xed,0xef,0xef,0xed,0xee,0x00, 0x0e,0xee,0xdd,0xdd,0xde,0xee,0x00, 0x0e,0xee,0xed,0xde,0xee,0xee,0x00, 0x00,0xee,0xee,0xde,0xee,0xe0,0x00, 0x00,0xee,0xee,0xde,0xee,0xe0,0x00, 0x00,0x00,0xed,0xdd,0xe0,0x00,0x0d, 0xdd,0xdd,0xee,0xee,0xed,0xdd,0xd0, 0x0d,0xee,0xee,0xee,0xee,0xee,0x00, 0x0e,0xe0,0xee,0xee,0xe0,0xee,0x00, 0x0e,0xe0,0xee,0xee,0xe0,0xee,0x00, 0x0e,0xe0,0xdd,0xdd,0xd0,0xde,0x00, 0x0d,0x00,0xee,0x0e,0xe0,0x0d,0x00, 0x00,0x00,0xed,0x0e,0xe0,0x00,0x00, 0x00,0x0d,0xdd,0x0d,0xdd,0x00,0x18,";
/*
var datastr = "$00,0xfe,0x82,0x82,0x82,0xfe,0xfe,0x00,0x00,0x00,0xfe,0xfe,0xc0,0x00,0x00,0x00,0x00,0xf2,0xf2,0x92,0x92,0x9e,0x9e,0x00,0x00,0xfe,0xfe,0x92,0x92,0x82,0x00,0x00,0x08,0xfe,0xfe,0x88,0x88,0xf8,0xf8,0x00,0x00,0x9e,0x9e,0x92,0x92,0xf2,0xf2,0x00,0x00,0x9e,0x92,0x92,0x92,0xfe,0xfe,0x00,0x00,0xf0,0xf0,0x9e,0x9e,0x80,0x80,0x00,0x00,0xfe,0x92,0x92,0x92,0xfe,0xfe,0x00,0x00,0xfe,0x92,0x92,0x92,0xf2,0xf0,0x00,0x00,0xfe,0xc8,0x88,0x88,0xfe,0xfe,0x00,0x00,0xee,0x92,0x92,0x92,0xfe,0xfe,0x00,0x00,0x82,0x82,0x82,0x86,0xfe,0xfe,0x00,0x00,0xfc,0x86,0x82,0x82,0xfe,0xfe,0x00,0x00,0x82,0x92,0x92,0x92,0xfe,0xfe,0x00,0x00,0x80,0x90,0x90,0x90,0xfe,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xc8,0x88,0x88,0xfe,0xfe,0x00,0x00,0xee,0x92,0x92,0x92,0xfe,0xfe,0x00,0x00,0x82,0x82,0x82,0x86,0xfe,0xfe,0x00,0x00,0xfc,0x86,0x82,0x82,0xfe,0xfe,0x00,0x00,0x82,0x92,0x92,0x92,0xfe,0xfe,0x00,0x80,0x90,0x90,0x90,0x90,0xfe,0xfe,0x00,0x00,0x9e,0x92,0x82,0x82,0xfe,0xfe,0x00,0xfe,0xfe,0x10,0x10,0x10,0xfe,0xfe,0x00,0x00,0x00,0xbe,0xbe,0x00,0x00,0x00,0x00,0xfc,0xfe,0x06,0x02,0x02,0x02,0x00,0x00,0x00,0x82,0x44,0x28,0x18,0xfe,0xfe,0x00,0x02,0x02,0x02,0x06,0xfe,0xfe,0x00,0x00,0xfe,0x40,0x20,0x18,0x20,0xfe,0xfe,0x00,0xfe,0x0c,0x08,0x10,0x20,0xfe,0xfe,0x00,0xfe,0x82,0x82,0x82,0x86,0xfe,0xfe,0x00,0x00,0xfe,0x82,0x82,0x82,0xfe,0xfe,0x00,0x00,0x00,0xfe,0xfe,0xc0,0x00,0x00,0x00,0x00,0xf2,0xf2,0x92,0x92,0x9e,0x9e,0x00,0x00,0xfe,0xfe,0x92,0x92,0x82,0x00,0x00,0x08,0xfe,0xfe,0x88,0x88,0xf8,0xf8,0x00,0x00,0x9e,0x9e,0x92,0x92,0xf2,0xf2,0x00,0x00,0x9e,0x92,0x92,0x92,0xfe,0xfe,0x00,0x00,0xf0,0xf0,0x9e,0x9e,0x80,0x80,0x00,0x00,0xfe,0x92,0x92,0x92,0xfe,0xfe,0x00,0x00,0xfe,0x92,0x92,0x92,0xf2,0xf0,0x00,0x00,0xfe,0xc8,0x88,0x88,0xfe,0xfe,0x00,0x00,0xee,0x92,0x92,0x92,0xfe,0xfe,0x00,0x00,0x82,0x82,0x82,0x86,0xfe,0xfe,0x00,0x00,0xfc,0x86,0x82,0x82,0xfe,0xfe,0x00,0x00,0x82,0x92,0x92,0x92,0xfe,0xfe,0x00,0x00,0x80,0x90,0x90,0x90,0xfe,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xc8,0x88,0x88,0xfe,0xfe,0x00,0x00,0xee,0x92,0x92,0x92,0xfe,0xfe,0x00,0x00,0x82,0x82,0x82,0x86,0xfe,0xfe,0x00,0x00,0xfc,0x86,0x82,0x82,0xfe,0xfe,0x00,0x00,0x82,0x92,0x92,0x92,0xfe,0xfe,0x00,0x80,0x90,0x90,0x90,0x90,0xfe,0xfe,0x00,0x00,0x9e,0x92,0x82,0x82,0xfe,0xfe,0x00,0xfe,0xfe,0x10,0x10,0x10,0xfe,0xfe,0x00,0x00,0x00,0xbe,0xbe,0x00,0x00,0x00,0x00,0xfc,0xfe,0x06,0x02,0x02,0x02,0x00,0x00,0x00,0x82,0x44,0x28,0x18,0xfe,0xfe,0x00,0x02,0x02,0x02,0x06,0xfe,0xfe,0x00,0x00,0xfe,0x40,0x20,0x18,0x20,0xfe,0xfe,0x00,0xfe,0x0c,0x08,0x10,0x20,0xfe,0xfe,0x00,0xfe,0x82,0x82,0x82,0x86,0xfe,0xfe,0x00,";

View File

@ -1,16 +1,17 @@

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ;
; LZ4FH uncompression for 6502 ;
; By Andy McFadden ;
; Version 1.0.1, August 2015 ;
; ;
; Refactored for size & speed ;
; by Peter Ferrie. ;
; ;
; Developed with Merlin-16 ;
; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; LZ4FH uncompression for 6502
; By Andy McFadden
; Version 1.0.1, August 2015
;
; Refactored for size & speed
; by Peter Ferrie.
;
; Developed with Merlin-16
; Ported to DASM by Steven Hugg
; Apache 2.0 license
; http://www.apache.org/licenses/LICENSE-2.0
;
processor 6502
@ -241,7 +242,7 @@ ClrScr:
rts
LZDATA:
; WORLDMAP file
hex 661f7f1400002001002900b040014019
hex 0000007c000008290041030600032a00
hex 43065433002900980000403f00002603

View File

@ -85,7 +85,7 @@ module digits10_array(digit, yofs, bits);
input [2:0] yofs; // vertical offset (0-4)
output [4:0] bits; // output (5 bits)
reg [4:0] bitarray[0:15][0:4]; // ROM array
reg [4:0] bitarray[16][5]; // ROM array (16 x 5 x 5 bits)
assign bits = bitarray[digit][yofs]; // assign module output

View File

@ -300,3 +300,10 @@ function stringToByteArray(s:string) : Uint8Array {
a[i] = s.charCodeAt(i);
return a;
}
function removeBOM(s:string) {
if (s.charCodeAt(0) === 0xFEFF) {
s = s.substr(1);
}
return s;
}

View File

@ -554,6 +554,7 @@ function assembleDASM(step) {
var listings = {};
listings[lstpath] = {lines:listing.lines};
// parse include files
// TODO: kinda wasted effort
for (var fn of step.files) {
if (fn != step.path) {
var lst = parseDASMListing(alst, unresolved, fn);
@ -1084,8 +1085,6 @@ function detectTopModuleName(code) {
var topmod = detectModuleName(code) || "top";
var m = /\bmodule\s+(\w+?_top)/.exec(code);
if (m && m[1]) topmod = m[1];
m = /\bmodule\s+(\w+?_top)/.exec(code);
if (m && m[1]) topmod = m[1];
return topmod;
}