1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-21 15:32:41 +00:00

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:
cuz 2003-02-10 22:48:40 +00:00
parent fc353fbd5a
commit 2a293bfc6b
5 changed files with 52 additions and 47 deletions

View File

@ -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

View File

@ -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 #>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

View File

@ -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 <ytm@elysium.pl>
; 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

View File

@ -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
pagecount: .res 2 ; Number of pages available
curpage: .word $FFFF ; Current page number (invalid)
.bss
pagecount: .res 2 ; Number of pages available
curpage: .res 2 ; Current page number
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 #>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

View File

@ -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
ldx #>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