diff --git a/presets/atari7800/scroll.c b/presets/atari7800/scroll.c index db87d487..14d76f0f 100644 --- a/presets/atari7800/scroll.c +++ b/presets/atari7800/scroll.c @@ -1,10 +1,21 @@ +/* +This demo sets up two DLLs (Display List Lists) of +16 slots each. By adjusting the address and fine offset +of the first DL entry, the screen can scroll vertically +across the two DLLs. It can only wrap from the first 16 +to the second 16 slots. + +Note that this scheme can be used also for double-buffering. +By swapping between the two DLLs each frame, one DLL can +be written while the other is displayed. +*/ + #include "atari7800.h" #include //#link "chr_font.s" - //#link "generic8x16.s" #define DLL_FLAGS DLL_H16 @@ -67,6 +78,7 @@ void dll_swap() { dll_set_addr(DLL); } } +#endif void dll_set_scroll(byte y) { static byte oldslot = 0; @@ -77,7 +89,6 @@ void dll_set_scroll(byte y) { dll_set_addr(DLL + slot); oldslot = slot; } -#endif void* dll_alloc(byte slot, byte len) { byte dlofs; @@ -134,6 +145,8 @@ void dll_setup() { #endif } +// __MAIN__ + char* hello = "\2\4\6\0\220\222\102"; void main() { @@ -175,3 +188,4 @@ void main() { y++; } } + diff --git a/presets/atari7800/wsync.c b/presets/atari7800/wsync.c index 98f62dcc..8d5b0719 100644 --- a/presets/atari7800/wsync.c +++ b/presets/atari7800/wsync.c @@ -1,4 +1,14 @@ +/* +The Atari 7800 uses display lists and interrupts to +partition the video frame, but the 6502 can also be +synchronized with each scanline. When the CPU strobes +the WSYNC register, the CPU is halted until the end +of the current scanline. This is similar to the WSYNC +register on the Atari 2600, except that VBLANK and +VSYNC are automatically applied. +*/ + #include "atari7800.h" void main() { diff --git a/test/cli/testworker.js b/test/cli/testworker.js index 54cf2f72..3542bad8 100644 --- a/test/cli/testworker.js +++ b/test/cli/testworker.js @@ -158,7 +158,7 @@ describe('Worker', function() { }); it('should compile sg1000 skeleton', function(done) { var csource = ab2str(fs.readFileSync('presets/sms-sg1000-libcv/cursorsmooth.c')); - compile('sdcc', csource, 'sms-sg1000-libcv', done, 49152, 81, 0); + compile('sdcc', csource, 'sms-sg1000-libcv', done, 49152, 80, 0); }); it('should compile verilog example', function(done) { var csource = ab2str(fs.readFileSync('presets/verilog/lfsr.v'));