projects
/
snes_test1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6b4a926
)
fixed comment
master
author
John Tsiombikas
<nuclear@member.fsf.org>
Tue, 7 Jul 2020 13:51:23 +0000
(16:51 +0300)
committer
John Tsiombikas
<nuclear@member.fsf.org>
Tue, 7 Jul 2020 13:51:23 +0000
(16:51 +0300)
test.asm
patch
|
blob
|
history
diff --git
a/test.asm
b/test.asm
index
da5f5ec
..
15d23a3
100644
(file)
--- a/
test.asm
+++ b/
test.asm
@@
-9,7
+9,7
@@
.segment "code"
; VMEM map
.segment "code"
; VMEM map
- ; 0000: tilemap for BG1 (32x32 4bpp: 512b)
+ ; 0000: tilemap for BG1 (32x32 word tile refs, 2kb)
; 2048: BG3-base (h/v offsets)
; 8192: tile data (16k)
vmem_tiles_offs = 4096 ; 4k words
; 2048: BG3-base (h/v offsets)
; 8192: tile data (16k)
vmem_tiles_offs = 4096 ; 4k words
@@
-17,9
+17,11
@@
vmem_voffs_offs = vmem_hoffs_offs + 32
sei
vmem_voffs_offs = vmem_hoffs_offs + 32
sei
+ ; get out of 6502 emulation mode
clc
xce
clc
xce
+ ; initialize stack
I16
ldx #$1fff
txs
I16
ldx #$1fff
txs
@@
-102,9
+104,7
@@
mainloop:
ldx ncol
bne @per_tile_offs
; global scroll for the first column
ldx ncol
bne @per_tile_offs
; global scroll for the first column
- ;sta REG_BG1VOFS
sta vscroll
sta vscroll
- ;stz REG_BG1VOFS
bra @end
@per_tile_offs:
bra @end
@per_tile_offs:
@@
-113,9
+113,6
@@
mainloop:
asl
tax ; x = ncol << 1
pla
asl
tax ; x = ncol << 1
pla
- ;sta REG_VMDATAL
- ;lda #$20 ; enable for BG1
- ;sta REG_VMDATAH
sta shadow_voffs,x
inx
lda #$20
sta shadow_voffs,x
inx
lda #$20
@@
-150,7
+147,7
@@
mainloop:
A16
jmp mainloop
A16
jmp mainloop
- ; copy_vmem(vmem_offset, src, num_words)
+ ; copy_vmem(vmem_offset, src, num_bytes)
copy_vmem:
rep #$30 ; 16bit accumulator and index registers
.a16
copy_vmem:
rep #$30 ; 16bit accumulator and index registers
.a16
@@
-164,7
+161,7
@@
copy_vmem:
; $3 return address
; $5 vmem_offs
; $7 src
; $3 return address
; $5 vmem_offs
; $7 src
- ; $9 num_words
+ ; $9 num_bytes
lda #$80 ; auto incerment after wiriting high byte
sta REG_VMAINC
lda #$80 ; auto incerment after wiriting high byte
sta REG_VMAINC