;
-; 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
;
; Jump table.
.word INSTALL
- .word DEINSTALL
+ .word UNINSTALL
.word PAGECOUNT
.word MAP
.word USE
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
;
-; Extended memory driver for the C128 RAM in bank #1
+; Extended memory driver for the C128 RAM in bank #1. Driver works without
+; problems when statically linked.
;
; Ullrich von Bassewitz, 2002-12-04
;
; Jump table.
.word INSTALL
- .word DEINSTALL
+ .word UNINSTALL
.word PAGECOUNT
.word MAP
.word USE
; ------------------------------------------------------------------------
; Data.
-.data
-curpage: .word $FFFF ; Current page number (invalid)
-
.bss
+curpage: .res 1 ; Current page number
+
window: .res 256 ; Memory "window"
.code
;
INSTALL:
- lda #<EM_ERR_OK
- ldx #>EM_ERR_OK
+ ldx #$FF
+ stx curpage
+ stx curpage+1 ; Invalidate the current page
+ inx
+ 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
lda (ptr3),y ; Get bytes in last page
beq @L4
sta tmp1
-
+
ldy #$00
@L3: lda (ptr2),y
ldx #MMU_CFG_RAM1
;
-; 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 <ytm@elysium.pl>
; 06,22.12.2002
-;
+;
.include "zeropage.inc"
; Jump table.
.word INSTALL
- .word DEINSTALL
+ .word UNINSTALL
.word PAGECOUNT
.word MAP
.word USE
; ------------------------------------------------------------------------
; Constants
-RAMC_WINDOW = $DF00 ; Address of RamCart window
-RAMC_PAGE_LO = $DE00 ; Page register low
-RAMC_PAGE_HI = $DE01 ; Page register high (only for RC128)
+RAMC_WINDOW = $DF00 ; Address of RamCart window
+RAMC_PAGE_LO = $DE00 ; Page register low
+RAMC_PAGE_HI = $DE01 ; Page register high (only for RC128)
; ------------------------------------------------------------------------
; Data.
-.data
+.bss
-pagecount: .word 512 ; default for RC128
+pagecount: .res 2 ; Number of pages available
.code
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
;
-; Extended memory driver for the Commodore REU
+; Extended memory driver for the Commodore REU. Driver works without
+; problems when statically linked.
;
; Ullrich von Bassewitz, 2002-11-29
;
; Jump table.
.word INSTALL
- .word DEINSTALL
+ .word UNINSTALL
.word PAGECOUNT
.word MAP
.word USE
; ------------------------------------------------------------------------
; 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
ldx #>(256*4) ; 256KB when size bit is set
@L1: stx pagecount+1
- lda #<EM_ERR_OK
- ldx #>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
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