From b256d6fb46c1e17baa2a4bce47bbb21c9e931720 Mon Sep 17 00:00:00 2001 From: uz Date: Sat, 20 Feb 2010 19:46:51 +0000 Subject: [PATCH] Made Olivers devnum patch (r4588) work with the PET-II models. On these machines, the program runs in a separate 64K bank, and zeropage variables need to be copied from the system bank into the execution bank to read by a simple load operation. The change is currently untested! git-svn-id: svn://svn.cc65.org/cc65/trunk@4597 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- asminc/cbm510.inc | 1 - asminc/cbm610.inc | 1 - libsrc/cbm510/crt0.s | 1 + libsrc/cbm510/devnum.s | 2 +- libsrc/cbm510/extzp.inc | 2 +- libsrc/cbm510/extzp.s | 1 + libsrc/cbm610/crt0.s | 1 + libsrc/cbm610/devnum.s | 2 +- libsrc/cbm610/extzp.inc | 4 ++-- libsrc/cbm610/extzp.s | 1 + 10 files changed, 9 insertions(+), 7 deletions(-) diff --git a/asminc/cbm510.inc b/asminc/cbm510.inc index e98ed4a14..c4476c2e1 100644 --- a/asminc/cbm510.inc +++ b/asminc/cbm510.inc @@ -11,7 +11,6 @@ ExecReg = $00 IndReg = $01 -DEVNUM = $9F ; --------------------------------------------------------------------------- ; Screen size diff --git a/asminc/cbm610.inc b/asminc/cbm610.inc index 62d0c6a42..14bbb3d69 100644 --- a/asminc/cbm610.inc +++ b/asminc/cbm610.inc @@ -11,7 +11,6 @@ ExecReg = $00 IndReg = $01 -DEVNUM = $9F ; --------------------------------------------------------------------------- ; Screen size diff --git a/libsrc/cbm510/crt0.s b/libsrc/cbm510/crt0.s index fc8acee74..e89bae74f 100644 --- a/libsrc/cbm510/crt0.s +++ b/libsrc/cbm510/crt0.s @@ -64,6 +64,7 @@ .proc transfer_table + .byte $9F, DEVNUM .byte $CA, CURS_Y .byte $CB, CURS_X .byte $EC, CHARCOLOR diff --git a/libsrc/cbm510/devnum.s b/libsrc/cbm510/devnum.s index 0c6bf2130..a10004e85 100644 --- a/libsrc/cbm510/devnum.s +++ b/libsrc/cbm510/devnum.s @@ -2,6 +2,6 @@ ; Oliver Schmidt, 2010-02-14 ; - .include "cbm510.inc" + .include "extzp.inc" .exportzp devnum := DEVNUM diff --git a/libsrc/cbm510/extzp.inc b/libsrc/cbm510/extzp.inc index be0cba71f..f500c9bca 100644 --- a/libsrc/cbm510/extzp.inc +++ b/libsrc/cbm510/extzp.inc @@ -11,7 +11,7 @@ .globalzp sysp0, time, segsave, ktmp, CURS_X, CURS_Y, CURS_FLAG .globalzp CURS_STATE, CURS_BLINK, CURS_COLOR, CHARCOLOR, RVS - .globalzp SCREEN_PTR, CRAM_PTR + .globalzp DEVNUM, SCREEN_PTR, CRAM_PTR .globalzp keyidx, keybuf, keyscanbuf, keysave, modkey .globalzp norkey, graphmode, lastidx, rptdelay, rptcount diff --git a/libsrc/cbm510/extzp.s b/libsrc/cbm510/extzp.s index 8402a00a8..abbfd2c43 100644 --- a/libsrc/cbm510/extzp.s +++ b/libsrc/cbm510/extzp.s @@ -43,6 +43,7 @@ CURS_BLINK: .byte 0 CURS_COLOR: .byte 0 CHARCOLOR: .byte 0 RVS: .byte 0 +DEVNUM: .byte 0 SCREEN_PTR: .word 0 CRAM_PTR: .word 0 ; Stuff for our own kbd polling routine diff --git a/libsrc/cbm610/crt0.s b/libsrc/cbm610/crt0.s index c63bdfdb5..21874438a 100644 --- a/libsrc/cbm610/crt0.s +++ b/libsrc/cbm610/crt0.s @@ -63,6 +63,7 @@ .proc transfer_table + .byte $9F, DEVNUM .byte $CA, CURS_Y .byte $CB, CURS_X .byte $CC, graphmode diff --git a/libsrc/cbm610/devnum.s b/libsrc/cbm610/devnum.s index 75fa4cd2a..a10004e85 100644 --- a/libsrc/cbm610/devnum.s +++ b/libsrc/cbm610/devnum.s @@ -2,6 +2,6 @@ ; Oliver Schmidt, 2010-02-14 ; - .include "cbm610.inc" + .include "extzp.inc" .exportzp devnum := DEVNUM diff --git a/libsrc/cbm610/extzp.inc b/libsrc/cbm610/extzp.inc index bb46a185b..59eb824eb 100644 --- a/libsrc/cbm610/extzp.inc +++ b/libsrc/cbm610/extzp.inc @@ -9,8 +9,8 @@ .globalzp sysp1, sysp3, crtc, sid, ipccia, cia, acia, tpi1, tpi2 .globalzp ktab1, ktab2, ktab3, ktab4 - .globalzp sysp0, time, segsave, ktmp, CURS_X, CURS_Y, RVS, config - .globalzp CharPtr, keyidx, keybuf, keyscanbuf, keysave + .globalzp sysp0, time, segsave, ktmp, CURS_X, CURS_Y, RVS, DEVNUM + .globalzp config, CharPtr, keyidx, keybuf, keyscanbuf, keysave .globalzp modkey, norkey, graphmode, lastidx, rptdelay, rptcount diff --git a/libsrc/cbm610/extzp.s b/libsrc/cbm610/extzp.s index be7e096df..b0f3e7688 100644 --- a/libsrc/cbm610/extzp.s +++ b/libsrc/cbm610/extzp.s @@ -37,6 +37,7 @@ ktmp: .byte 0 CURS_X: .byte 0 CURS_Y: .byte 0 RVS: .byte 0 +DEVNUM: .byte 0 config: .byte 0 CharPtr: .word 0 ; Stuff for our own kbd polling routine -- 2.39.5