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
This commit is contained in:
parent
fc353fbd5a
commit
2a293bfc6b
5 changed files with 52 additions and 47 deletions
|
@ -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
|
; Ullrich von Bassewitz, 2002-11-29
|
||||||
;
|
;
|
||||||
|
@ -26,7 +27,7 @@
|
||||||
; Jump table.
|
; Jump table.
|
||||||
|
|
||||||
.word INSTALL
|
.word INSTALL
|
||||||
.word DEINSTALL
|
.word UNINSTALL
|
||||||
.word PAGECOUNT
|
.word PAGECOUNT
|
||||||
.word MAP
|
.word MAP
|
||||||
.word USE
|
.word USE
|
||||||
|
@ -63,11 +64,11 @@ INSTALL:
|
||||||
rts
|
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.
|
; Can do cleanup or whatever. Must not return anything.
|
||||||
;
|
;
|
||||||
|
|
||||||
DEINSTALL:
|
UNINSTALL:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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
|
; Ullrich von Bassewitz, 2002-12-02
|
||||||
;
|
;
|
||||||
|
@ -26,7 +27,7 @@
|
||||||
; Jump table.
|
; Jump table.
|
||||||
|
|
||||||
.word INSTALL
|
.word INSTALL
|
||||||
.word DEINSTALL
|
.word UNINSTALL
|
||||||
.word PAGECOUNT
|
.word PAGECOUNT
|
||||||
.word MAP
|
.word MAP
|
||||||
.word USE
|
.word USE
|
||||||
|
@ -43,10 +44,8 @@ PAGES = ($10000 - BASE) / 256
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Data.
|
; Data.
|
||||||
|
|
||||||
.data
|
|
||||||
curpage: .byte $FF ; Current page number (invalid)
|
|
||||||
|
|
||||||
.bss
|
.bss
|
||||||
|
curpage: .res 1 ; Current page number
|
||||||
window: .res 256 ; Memory "window"
|
window: .res 256 ; Memory "window"
|
||||||
|
|
||||||
.code
|
.code
|
||||||
|
@ -59,16 +58,18 @@ window: .res 256 ; Memory "window"
|
||||||
;
|
;
|
||||||
|
|
||||||
INSTALL:
|
INSTALL:
|
||||||
lda #<EM_ERR_OK
|
ldx #$FF
|
||||||
ldx #>EM_ERR_OK
|
stx curpage ; Invalidate the current page
|
||||||
|
inx ; X = 0
|
||||||
|
txa ; A = X = EM_ERR_OK
|
||||||
rts
|
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.
|
; Can do cleanup or whatever. Must not return anything.
|
||||||
;
|
;
|
||||||
|
|
||||||
DEINSTALL:
|
UNINSTALL:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
@ -243,7 +244,7 @@ common: ldy #EM_COPY_COUNT+1
|
||||||
sta $01
|
sta $01
|
||||||
|
|
||||||
; Transfer the bytes in the last page
|
; Transfer the bytes in the last page
|
||||||
|
|
||||||
ldy #$00
|
ldy #$00
|
||||||
@L3: lda (ptr1),y
|
@L3: lda (ptr1),y
|
||||||
sta (ptr2),y
|
sta (ptr2),y
|
||||||
|
@ -256,7 +257,7 @@ common: ldy #EM_COPY_COUNT+1
|
||||||
pla
|
pla
|
||||||
sta $01 ; Restore the old configuration
|
sta $01 ; Restore the old configuration
|
||||||
cli
|
cli
|
||||||
|
|
||||||
; Done
|
; Done
|
||||||
|
|
||||||
@L4: rts
|
@L4: rts
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
;
|
;
|
||||||
; Extended memory driver for the RamCart 64/128KB cartridge
|
; Extended memory driver for the RamCart 64/128KB cartridge. Driver works
|
||||||
; (based on GEORAM code by Ullrich von Bassewitz)
|
; without problems when statically linked.
|
||||||
|
; Code is based on GEORAM code by Ullrich von Bassewitz.
|
||||||
; Maciej 'YTM/Elysium' Witkowiak <ytm@elysium.pl>
|
; Maciej 'YTM/Elysium' Witkowiak <ytm@elysium.pl>
|
||||||
; 06,22.12.2002
|
; 06,22.12.2002
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
.include "zeropage.inc"
|
.include "zeropage.inc"
|
||||||
|
@ -28,7 +29,7 @@
|
||||||
; Jump table.
|
; Jump table.
|
||||||
|
|
||||||
.word INSTALL
|
.word INSTALL
|
||||||
.word DEINSTALL
|
.word UNINSTALL
|
||||||
.word PAGECOUNT
|
.word PAGECOUNT
|
||||||
.word MAP
|
.word MAP
|
||||||
.word USE
|
.word USE
|
||||||
|
@ -46,9 +47,9 @@ RAMC_PAGE_HI = $DE01 ; Page register high (only for RC128)
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Data.
|
; Data.
|
||||||
|
|
||||||
.data
|
.bss
|
||||||
|
|
||||||
pagecount: .word 512 ; default for RC128
|
pagecount: .res 2 ; Number of available pages
|
||||||
|
|
||||||
.code
|
.code
|
||||||
|
|
||||||
|
@ -102,11 +103,11 @@ INSTALL:
|
||||||
rts
|
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.
|
; Can do cleanup or whatever. Must not return anything.
|
||||||
;
|
;
|
||||||
|
|
||||||
DEINSTALL:
|
UNINSTALL:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
; Jump table.
|
; Jump table.
|
||||||
|
|
||||||
.word INSTALL
|
.word INSTALL
|
||||||
.word DEINSTALL
|
.word UNINSTALL
|
||||||
.word PAGECOUNT
|
.word PAGECOUNT
|
||||||
.word MAP
|
.word MAP
|
||||||
.word USE
|
.word USE
|
||||||
|
@ -53,19 +53,18 @@ OP_COPYTO = $EC
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Data.
|
; Data.
|
||||||
|
|
||||||
.data
|
|
||||||
pagecount: .res 2 ; Number of pages available
|
|
||||||
curpage: .word $FFFF ; Current page number (invalid)
|
|
||||||
|
|
||||||
.bss
|
.bss
|
||||||
|
pagecount: .res 2 ; Number of pages available
|
||||||
|
curpage: .res 2 ; Current page number
|
||||||
|
|
||||||
window: .res 256 ; Memory "window"
|
window: .res 256 ; Memory "window"
|
||||||
|
|
||||||
reu_params: .word $0000 ; Host address, lo, hi
|
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.
|
.byte $00 ; Expansion bank no.
|
||||||
.word $0000 ; # bytes to move, lo, hi
|
.word $0000 ; # bytes to move, lo, hi
|
||||||
.byte $00 ; Interrupt mask reg.
|
.byte $00 ; Interrupt mask reg.
|
||||||
.byte $00 ; Adress control reg.
|
.byte $00 ; Adress control reg.
|
||||||
|
|
||||||
.code
|
.code
|
||||||
|
|
||||||
|
@ -92,9 +91,12 @@ INSTALL:
|
||||||
beq @L1
|
beq @L1
|
||||||
ldx #>(256*4) ; 256KB when size bit is set
|
ldx #>(256*4) ; 256KB when size bit is set
|
||||||
@L1: stx pagecount+1
|
@L1: stx pagecount+1
|
||||||
|
|
||||||
lda #<EM_ERR_OK
|
ldx #$FF
|
||||||
ldx #>EM_ERR_OK
|
stx curpage
|
||||||
|
stx curpage+1 ; Invalidate the current page
|
||||||
|
inx
|
||||||
|
txa ; X = A = EM_ERR_OK
|
||||||
rts
|
rts
|
||||||
|
|
||||||
; No REU found
|
; No REU found
|
||||||
|
@ -105,11 +107,11 @@ nodevice:
|
||||||
rts
|
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.
|
; Can do cleanup or whatever. Must not return anything.
|
||||||
;
|
;
|
||||||
|
|
||||||
DEINSTALL:
|
UNINSTALL:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
; Jump table.
|
; Jump table.
|
||||||
|
|
||||||
.word INSTALL
|
.word INSTALL
|
||||||
.word DEINSTALL
|
.word UNINSTALL
|
||||||
.word PAGECOUNT
|
.word PAGECOUNT
|
||||||
.word MAP
|
.word MAP
|
||||||
.word USE
|
.word USE
|
||||||
|
@ -99,14 +99,14 @@ INSTALL:
|
||||||
|
|
||||||
ldx #VDC_CSET
|
ldx #VDC_CSET
|
||||||
lda tmp1
|
lda tmp1
|
||||||
jsr vdcputreg ; restore 16/64k flag
|
jsr vdcputreg ; restore 16/64k flag
|
||||||
jmp @endok ; and leave default values for 16k
|
jmp @endok ; and leave default values for 16k
|
||||||
|
|
||||||
@have64k:
|
@have64k:
|
||||||
lda #<256
|
lda #<256
|
||||||
ldx #>256
|
ldx #>256
|
||||||
sta pagecount
|
sta pagecount
|
||||||
stx pagecount+1
|
stx pagecount+1
|
||||||
@endok:
|
@endok:
|
||||||
lda #<EM_ERR_OK
|
lda #<EM_ERR_OK
|
||||||
ldx #>EM_ERR_OK
|
ldx #>EM_ERR_OK
|
||||||
|
@ -141,11 +141,11 @@ settestadr2:
|
||||||
jmp vdcsetsrcaddr
|
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.
|
; Can do cleanup or whatever. Must not return anything.
|
||||||
;
|
;
|
||||||
|
|
||||||
DEINSTALL:
|
UNINSTALL:
|
||||||
;on C128 restore font and clear the screen?
|
;on C128 restore font and clear the screen?
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
@ -255,7 +255,7 @@ COPYFROM:
|
||||||
jsr setup
|
jsr setup
|
||||||
beq @L2 ; Skip if no full pages
|
beq @L2 ; Skip if no full pages
|
||||||
|
|
||||||
; Copy full pages
|
; Copy full pages
|
||||||
|
|
||||||
@L1: jsr transferin
|
@L1: jsr transferin
|
||||||
inc ptr1+1
|
inc ptr1+1
|
||||||
|
@ -291,7 +291,7 @@ COPYTO:
|
||||||
jsr setup
|
jsr setup
|
||||||
beq @L2 ; Skip if no full pages
|
beq @L2 ; Skip if no full pages
|
||||||
|
|
||||||
; Copy full pages
|
; Copy full pages
|
||||||
|
|
||||||
@L1: jsr transferout
|
@L1: jsr transferout
|
||||||
inc ptr1+1
|
inc ptr1+1
|
||||||
|
|
Loading…
Add table
Reference in a new issue