You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Create a file (`mminer-a2m.asm`) that defines segments, turns on HGR and includes the root file.
10
9
* Fix evaluation order differences `row & $08 << 4` vs `(row & $08) << 4`
11
-
* Change `.addr` to `.word`
12
-
* Make `.string` of data in quotes
13
-
* Fix .local in macro by replacing the alias with the actual names
14
10
* Change .ifblank in macro to .if .defined (and swap code generation to match)
15
-
11
+
12
+
This is what the `mminer-a2m.asm` file looks like. It defines the segments and puts the Apple II into HGR mode - the laoder would have done that in the ca65 version. It then includes the main assembly file that was made for ca65.
13
+
```
14
+
.segdef "ZEROPAGE", $50, noemit
15
+
.segdef "LOWMEM", $800, noemit
16
+
.segdef "HGR", $4000
17
+
.segdef "CODE", $6000
18
+
.segdef "RODATA", $89DC
19
+
.segdef "DATA", $BE40
20
+
21
+
SETAN3 = $C05F
22
+
CLR80STORE = $C000
23
+
CLR80 = $C00C ; apple2.inc has CLR80COL as $C000 - I call that CLR80STORE
24
+
25
+
.segment "CODE"
26
+
sta SETAN3
27
+
sta CLR80STORE
28
+
sta CLR80 ; This turns off 80 col mode
29
+
bit TXTCLR
30
+
bit MIXCLR
31
+
bit HISCR
32
+
bit HIRES
33
+
; .proc main follows so this falls through intentionally
34
+
35
+
.include "mminer.asm"
36
+
```
16
37
Press `CTRL + SHIFT + F4`. Browse to `samples/mmminer/mminer-a2m.asm`. Change the address to `6000`. Press `OK`.
17
38
18
39
Press `CTRL + F4`. Pretty much immediately Manic Miner should be running.
19
40
20
41
You can now open the debugger with `F2` and stop with `F11`, open the source, modify it and press `CTRL-B` (when stopped) or `CTRL+F4` at any time, to instantly see the changes. You can also un-check the box to auto-run, in which case you could press `CTRL-A` to jump to an address (say 6000). Then press `CTRL-P` to set the program counter to the address of the cursor. Now pressing `F5` will run the code from that address. You can also, with the mouse over the dissasembly window and the debugger stopped, press `CTRL+S` to open the symbols view, and type `main` to show only symbols that match `main`. Click on the `main` symbol itself and you should be at the place where `main` is compiled to. Press `CTRL+left cursor` to set the PC to the disassembly cursor (from clicking on `main`). Press `F5` to run or `F10` to step over or `F11` to step into.
0 commit comments