aboutsummaryrefslogtreecommitdiff
path: root/src-z80/core/macro.z80
diff options
context:
space:
mode:
authorsik2017-07-23 03:20:35 -0300
committersik2017-07-23 03:20:35 -0300
commit3aacf3d2cedfdeca49ceb57533389870bfc688a9 (patch)
treea46d166fa9270700e8e159ca9ae455ac24472771 /src-z80/core/macro.z80
parenta679ba38190bfed6ae150a12e819ad7527c495d1 (diff)
Now with pausing and other niceties
Diffstat (limited to 'src-z80/core/macro.z80')
-rw-r--r--src-z80/core/macro.z8041
1 files changed, 41 insertions, 0 deletions
diff --git a/src-z80/core/macro.z80 b/src-z80/core/macro.z80
new file mode 100644
index 0000000..eedd527
--- /dev/null
+++ b/src-z80/core/macro.z80
@@ -0,0 +1,41 @@
+;****************************************************************************
+; PollPCM
+; Used to update PCM while not idle
+;----------------------------------------------------------------------------
+; breaks: af
+;****************************************************************************
+
+PollPCM: macro
+ ld a, ($4000)
+ rrca
+ rst $08
+ endm
+
+;****************************************************************************
+; BankSwitch
+; Switches into a new bank (won't update player status!)
+;----------------------------------------------------------------------------
+; input A .... New bank to switch into
+; input HL ... Must be $60xx
+;----------------------------------------------------------------------------
+; breaks ..... AF
+;****************************************************************************
+
+BankSwitch: macro
+ ld (hl), a
+ rrca
+ ld (hl), a
+ rrca
+ ld (hl), a
+ rrca
+ ld (hl), a
+ rrca
+ ld (hl), a
+ rrca
+ ld (hl), a
+ rrca
+ ld (hl), a
+ ld (hl), h
+ rrca
+ ld (hl), a
+ endm