Use changed EM decls

git-svn-id: svn://svn.cc65.org/cc65/trunk@2773 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2003-12-16 21:08:13 +00:00
parent fdb5ed5fa1
commit 5010b8be45
14 changed files with 88 additions and 89 deletions

View File

@@ -22,7 +22,7 @@
; Driver signature
.byte $65, $6d, $64 ; "emd"
.byte $00 ; EM API version number
.byte EMD_API_VERSION ; EM API version number
; Jump table.
@@ -86,7 +86,7 @@ PAGECOUNT:
; The GeoRAM cartridge does not copy but actually map the window, so USE is
; identical to MAP.
USE = MAP
USE = MAP
; ------------------------------------------------------------------------
; MAP: Map the page in a/x into memory and return a pointer to the page in
@@ -225,7 +225,7 @@ setup: sta ptr1
; Get the page number from the struct and adjust it so that it may be used
; with the hardware. That is: lower 6 bits in tmp1, high bits in tmp2.
ldy #EM_COPY_PAGE+1
ldy #EM_COPY::PAGE+1
lda (ptr1),y
sta tmp2
dey
@@ -240,7 +240,7 @@ setup: sta ptr1
; Get the buffer pointer into ptr2
ldy #EM_COPY_BUF
ldy #EM_COPY::BUF
lda (ptr1),y
sta ptr2
iny
@@ -249,7 +249,7 @@ setup: sta ptr1
; Get the count, calculate -(count-1) and store it into ptr3
ldy #EM_COPY_COUNT
ldy #EM_COPY::COUNT
lda (ptr1),y
eor #$FF
sta ptr3
@@ -260,7 +260,7 @@ setup: sta ptr1
; Get the page offset into X and clear Y
ldy #EM_COPY_OFFS
ldy #EM_COPY::OFFS
lda (ptr1),y
tax
ldy #$00

View File

@@ -22,7 +22,7 @@
; Driver signature
.byte $65, $6d, $64 ; "emd"
.byte $00 ; EM API version number
.byte EMD_API_VERSION ; EM API version number
; Jump table.
@@ -162,7 +162,7 @@ loop: .repeat 8
; Done
done: rts
done: rts
; ------------------------------------------------------------------------
; COPYFROM: Copy from extended into linear memory. A pointer to a structure
@@ -173,24 +173,24 @@ done: rts
COPYFROM:
sta ptr3
stx ptr3+1 ; Save the passed em_copy pointer
ldy #EM_COPY_OFFS
ldy #EM_COPY::OFFS
lda (ptr3),y
sta ptr1
ldy #EM_COPY_PAGE
ldy #EM_COPY::PAGE
lda (ptr3),y
clc
adc #>BASE
sta ptr1+1 ; From
ldy #EM_COPY_BUF
ldy #EM_COPY::BUF
lda (ptr3),y
sta ptr2
iny
lda (ptr3),y
sta ptr2+1 ; To
common: ldy #EM_COPY_COUNT+1
common: ldy #EM_COPY::COUNT+1
lda (ptr3),y ; Get number of pages
beq @L2 ; Skip if no full pages
sta tmp1
@@ -206,7 +206,7 @@ common: ldy #EM_COPY_COUNT+1
; Copy the remainder of the page
@L2: ldy #EM_COPY_COUNT
@L2: ldy #EM_COPY::COUNT
lda (ptr3),y ; Get bytes in last page
beq @L4
tax
@@ -245,16 +245,16 @@ common: ldy #EM_COPY_COUNT+1
COPYTO: sta ptr3
stx ptr3+1 ; Save the passed em_copy pointer
ldy #EM_COPY_OFFS
ldy #EM_COPY::OFFS
lda (ptr3),y
sta ptr2
ldy #EM_COPY_PAGE
ldy #EM_COPY::PAGE
lda (ptr3),y
clc
adc #>BASE
sta ptr2+1 ; To
ldy #EM_COPY_BUF
ldy #EM_COPY::BUF
lda (ptr3),y
sta ptr1
iny

View File

@@ -24,7 +24,7 @@
; Driver signature
.byte $65, $6d, $64 ; "emd"
.byte $00 ; EM API version number
.byte EMD_API_VERSION ; EM API version number
; Jump table.
@@ -252,7 +252,7 @@ setup: sta ptr1
; Get the page number from the struct and adjust it so that it may be used
; with the hardware. That is: lower 6 bits in tmp1, high bits in tmp2.
ldy #EM_COPY_PAGE+1
ldy #EM_COPY::PAGE+1
lda (ptr1),y
sta tmp2
dey
@@ -261,7 +261,7 @@ setup: sta ptr1
; Get the buffer pointer into ptr2
ldy #EM_COPY_BUF
ldy #EM_COPY::BUF
lda (ptr1),y
sta ptr2
iny
@@ -270,7 +270,7 @@ setup: sta ptr1
; Get the count, calculate -(count-1) and store it into ptr3
ldy #EM_COPY_COUNT
ldy #EM_COPY::COUNT
lda (ptr1),y
eor #$FF
sta ptr3
@@ -281,7 +281,7 @@ setup: sta ptr1
; Get the page offset into X and clear Y
ldy #EM_COPY_OFFS
ldy #EM_COPY::OFFS
lda (ptr1),y
tax
ldy #$00

View File

@@ -22,7 +22,7 @@
; Driver signature
.byte $65, $6d, $64 ; "emd"
.byte $00 ; EM API version number
.byte EMD_API_VERSION ; EM API version number
; Jump table.
@@ -142,7 +142,7 @@ done: rts
; ------------------------------------------------------------------------
; USE: Tell the driver that the window is now associated with a given page.
USE: sta curpage
stx curpage+1 ; Remember the page
lda #<window

View File

@@ -21,7 +21,7 @@
; Driver signature
.byte $65, $6d, $64 ; "emd"
.byte $00 ; EM API version number
.byte EMD_API_VERSION ; EM API version number
; Jump table.
@@ -265,7 +265,7 @@ COPYFROM:
; Copy the remainder of the page
@L2: ldy #EM_COPY_COUNT
@L2: ldy #EM_COPY::COUNT
lda (ptr3),y ; Get bytes in last page
beq @L4
sta tmp1
@@ -301,7 +301,7 @@ COPYTO:
; Copy the remainder of the page
@L2: ldy #EM_COPY_COUNT
@L2: ldy #EM_COPY::COUNT
lda (ptr3),y ; Get bytes in last page
beq @L4
sta tmp1
@@ -360,21 +360,21 @@ setup:
sta ptr3
stx ptr3+1 ; Save the passed em_copy pointer
ldy #EM_COPY_OFFS
ldy #EM_COPY::OFFS
lda (ptr3),y
sta ptr1
ldy #EM_COPY_PAGE
ldy #EM_COPY::PAGE
lda (ptr3),y
sta ptr1+1 ; From
ldy #EM_COPY_BUF
ldy #EM_COPY::BUF
lda (ptr3),y
sta ptr2
iny
lda (ptr3),y
sta ptr2+1 ; To
ldy #EM_COPY_COUNT+1
ldy #EM_COPY::COUNT+1
lda (ptr3),y ; Get number of pages
sta tmp1
rts