From 2a293bfc6b34fc7a0dbc145e34bd643a25b09085 Mon Sep 17 00:00:00 2001 From: cuz Date: Mon, 10 Feb 2003 22:48:40 +0000 Subject: [PATCH] Renamed DEINSTALL to UNINSTALL. Checked/fixed initialization so that some of the drivers do work now when linked statically. git-svn-id: svn://svn.cc65.org/cc65/trunk@1958 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/c64/c64-georam.s | 9 +++++---- libsrc/c64/c64-ram.s | 23 ++++++++++++----------- libsrc/c64/c64-ramcart.s | 17 +++++++++-------- libsrc/c64/c64-reu.s | 26 ++++++++++++++------------ libsrc/c64/c64-vdc.s | 22 +++++++++++----------- 5 files changed, 51 insertions(+), 46 deletions(-) diff --git a/libsrc/c64/c64-georam.s b/libsrc/c64/c64-georam.s index bc98f6101..4e0ecd816 100644 --- a/libsrc/c64/c64-georam.s +++ b/libsrc/c64/c64-georam.s @@ -1,5 +1,6 @@ ; -; Extended memory driver for the GEORAM cartridge +; Extended memory driver for the GEORAM cartridge. Driver works without +; problems when statically linked. ; ; Ullrich von Bassewitz, 2002-11-29 ; @@ -26,7 +27,7 @@ ; Jump table. .word INSTALL - .word DEINSTALL + .word UNINSTALL .word PAGECOUNT .word MAP .word USE @@ -63,11 +64,11 @@ INSTALL: rts ; ------------------------------------------------------------------------ -; DEINSTALL routine. Is called before the driver is removed from memory. +; UNINSTALL routine. Is called before the driver is removed from memory. ; Can do cleanup or whatever. Must not return anything. ; -DEINSTALL: +UNINSTALL: rts diff --git a/libsrc/c64/c64-ram.s b/libsrc/c64/c64-ram.s index f9e8b4f6c..35194034d 100644 --- a/libsrc/c64/c64-ram.s +++ b/libsrc/c64/c64-ram.s @@ -1,5 +1,6 @@ ; -; Extended memory driver for the C64 hidden RAM +; Extended memory driver for the C64 hidden RAM. Driver works without +; problems when statically linked. ; ; Ullrich von Bassewitz, 2002-12-02 ; @@ -26,7 +27,7 @@ ; Jump table. .word INSTALL - .word DEINSTALL + .word UNINSTALL .word PAGECOUNT .word MAP .word USE @@ -43,10 +44,8 @@ PAGES = ($10000 - BASE) / 256 ; ------------------------------------------------------------------------ ; Data. -.data -curpage: .byte $FF ; Current page number (invalid) - .bss +curpage: .res 1 ; Current page number window: .res 256 ; Memory "window" .code @@ -59,16 +58,18 @@ window: .res 256 ; Memory "window" ; INSTALL: - lda #EM_ERR_OK + ldx #$FF + stx curpage ; Invalidate the current page + inx ; X = 0 + txa ; A = X = EM_ERR_OK rts ; ------------------------------------------------------------------------ -; DEINSTALL routine. Is called before the driver is removed from memory. +; UNINSTALL routine. Is called before the driver is removed from memory. ; Can do cleanup or whatever. Must not return anything. ; -DEINSTALL: +UNINSTALL: rts @@ -243,7 +244,7 @@ common: ldy #EM_COPY_COUNT+1 sta $01 ; Transfer the bytes in the last page - + ldy #$00 @L3: lda (ptr1),y sta (ptr2),y @@ -256,7 +257,7 @@ common: ldy #EM_COPY_COUNT+1 pla sta $01 ; Restore the old configuration cli - + ; Done @L4: rts diff --git a/libsrc/c64/c64-ramcart.s b/libsrc/c64/c64-ramcart.s index 194fec871..5541e9b9f 100644 --- a/libsrc/c64/c64-ramcart.s +++ b/libsrc/c64/c64-ramcart.s @@ -1,9 +1,10 @@ ; -; Extended memory driver for the RamCart 64/128KB cartridge -; (based on GEORAM code by Ullrich von Bassewitz) +; Extended memory driver for the RamCart 64/128KB cartridge. Driver works +; without problems when statically linked. +; Code is based on GEORAM code by Ullrich von Bassewitz. ; Maciej 'YTM/Elysium' Witkowiak ; 06,22.12.2002 -; +; .include "zeropage.inc" @@ -28,7 +29,7 @@ ; Jump table. .word INSTALL - .word DEINSTALL + .word UNINSTALL .word PAGECOUNT .word MAP .word USE @@ -46,9 +47,9 @@ RAMC_PAGE_HI = $DE01 ; Page register high (only for RC128) ; ------------------------------------------------------------------------ ; Data. -.data +.bss -pagecount: .word 512 ; default for RC128 +pagecount: .res 2 ; Number of available pages .code @@ -102,11 +103,11 @@ INSTALL: rts ; ------------------------------------------------------------------------ -; DEINSTALL routine. Is called before the driver is removed from memory. +; UNINSTALL routine. Is called before the driver is removed from memory. ; Can do cleanup or whatever. Must not return anything. ; -DEINSTALL: +UNINSTALL: rts diff --git a/libsrc/c64/c64-reu.s b/libsrc/c64/c64-reu.s index 2c8238078..a5f57d1f7 100644 --- a/libsrc/c64/c64-reu.s +++ b/libsrc/c64/c64-reu.s @@ -26,7 +26,7 @@ ; Jump table. .word INSTALL - .word DEINSTALL + .word UNINSTALL .word PAGECOUNT .word MAP .word USE @@ -53,19 +53,18 @@ OP_COPYTO = $EC ; ------------------------------------------------------------------------ ; Data. -.data +.bss pagecount: .res 2 ; Number of pages available -curpage: .word $FFFF ; Current page number (invalid) +curpage: .res 2 ; Current page number -.bss window: .res 256 ; Memory "window" reu_params: .word $0000 ; Host address, lo, hi - .word $0000 ; Exp address, lo, hi + .word $0000 ; Exp address, lo, hi .byte $00 ; Expansion bank no. .word $0000 ; # bytes to move, lo, hi - .byte $00 ; Interrupt mask reg. - .byte $00 ; Adress control reg. + .byte $00 ; Interrupt mask reg. + .byte $00 ; Adress control reg. .code @@ -92,9 +91,12 @@ INSTALL: beq @L1 ldx #>(256*4) ; 256KB when size bit is set @L1: stx pagecount+1 - - lda #EM_ERR_OK + + ldx #$FF + stx curpage + stx curpage+1 ; Invalidate the current page + inx + txa ; X = A = EM_ERR_OK rts ; No REU found @@ -105,11 +107,11 @@ nodevice: rts ; ------------------------------------------------------------------------ -; DEINSTALL routine. Is called before the driver is removed from memory. +; UNINSTALL routine. Is called before the driver is removed from memory. ; Can do cleanup or whatever. Must not return anything. ; -DEINSTALL: +UNINSTALL: rts diff --git a/libsrc/c64/c64-vdc.s b/libsrc/c64/c64-vdc.s index 49badc3d1..86e3ad91c 100644 --- a/libsrc/c64/c64-vdc.s +++ b/libsrc/c64/c64-vdc.s @@ -26,7 +26,7 @@ ; Jump table. .word INSTALL - .word DEINSTALL + .word UNINSTALL .word PAGECOUNT .word MAP .word USE @@ -99,14 +99,14 @@ INSTALL: ldx #VDC_CSET lda tmp1 - jsr vdcputreg ; restore 16/64k flag - jmp @endok ; and leave default values for 16k + jsr vdcputreg ; restore 16/64k flag + jmp @endok ; and leave default values for 16k @have64k: - lda #<256 - ldx #>256 - sta pagecount - stx pagecount+1 + lda #<256 + ldx #>256 + sta pagecount + stx pagecount+1 @endok: lda #EM_ERR_OK @@ -141,11 +141,11 @@ settestadr2: jmp vdcsetsrcaddr ; ------------------------------------------------------------------------ -; DEINSTALL routine. Is called before the driver is removed from memory. +; UNINSTALL routine. Is called before the driver is removed from memory. ; Can do cleanup or whatever. Must not return anything. ; -DEINSTALL: +UNINSTALL: ;on C128 restore font and clear the screen? rts @@ -255,7 +255,7 @@ COPYFROM: jsr setup beq @L2 ; Skip if no full pages -; Copy full pages +; Copy full pages @L1: jsr transferin inc ptr1+1 @@ -291,7 +291,7 @@ COPYTO: jsr setup beq @L2 ; Skip if no full pages -; Copy full pages +; Copy full pages @L1: jsr transferout inc ptr1+1 -- 2.39.5