|
2 | 2 | ; SpecBong - tutorial-like project to load Layer2 image and move sprites
|
3 | 3 | ; © Peter Helcmanovsky, John McGibbitts 2020, license: https://opensource.org/licenses/MIT
|
4 | 4 | ;
|
5 |
| -; to build this ASM file I use https://github.com/z00m128/sjasmplus command: |
| 5 | +; to build this ASM file we use https://github.com/z00m128/sjasmplus command: |
6 | 6 | ; sjasmplus --fullpath --nologo --lst --lstlab --msg=war SpecBong.asm
|
7 |
| -; (this will also produce the listing file, so I can review the machine code generated |
| 7 | +; (this will also produce the listing file, so we can review the machine code generated |
8 | 8 | ; and addresses assigned to various symbols)
|
9 | 9 | ;
|
10 | 10 | ; to convert BMP to upside-down TGA I use ImageMagick "convert" command:
|
|
27 | 27 | ; ^ it's the default mapping of assembler at assembling time, at runtime the NEXLOAD
|
28 | 28 | ; will set the default mapping the same way, but first 16k is ROM, not bank 7.
|
29 | 29 |
|
30 |
| -; $8000..BFFF is here Bank 2 (pages 4 and 5) -> I will put **all** code here |
| 30 | +; $8000..BFFF is here Bank 2 (pages 4 and 5) -> we will put **all** code here |
31 | 31 | ORG $8000
|
32 | 32 | start:
|
33 | 33 | ; break at start when running in CSpect with "-brk" option
|
34 | 34 | break : nop : nop ; 2x"nop" after "break" to make real board survive "break" (= ld bc,0)
|
35 | 35 |
|
36 |
| - ; disable interrupts, I will avoid using them to keep code simpler to understand |
| 36 | + ; disable interrupts, we will avoid using them to keep code simpler to understand |
37 | 37 | di
|
38 | 38 | ; make the Layer 2 visible and reset some registers (should be reset by NEXLOAD, but to be safe)
|
39 | 39 | nextreg $69,$80 ; Layer 2 visible, ULA bank 5, Timex mode 0
|
@@ -98,7 +98,7 @@ initialStackTop:
|
98 | 98 |
|
99 | 99 | ; pre-load the image pixel data from TGA file into memory (to store it in NEX file)
|
100 | 100 | ; the pixel data will be in 16k banks 9, 10, 11 (8k pages: 18, 19, .., 23)
|
101 |
| - ; I will use the last page region $E000..$FFFF to map through all the pages and |
| 101 | + ; We will use the last page region $E000..$FFFF to map through all the pages and |
102 | 102 | ; include the binary pixel data from the TGA file, using sjasmplus MMU directive
|
103 | 103 |
|
104 | 104 | ; map into last slot first Layer2 page (8ki page number = 16ki bank * 2 = 9*2 = 18)
|
|
0 commit comments