From 7151093664ff1b321f06fce7fa600103410affe4 Mon Sep 17 00:00:00 2001 From: cassidoxa Date: Tue, 17 Jan 2023 17:01:21 -0500 Subject: [PATCH] Add numbers to file name screen --- data/text_unscramble1.bin | Bin 320 -> 320 bytes dungeonmap.asm | 1 - hooks.asm | 10 +++++--- playername.asm | 52 ++++++++++++++++++++++++++++++++++++++ utilities.asm | 5 ++++ 5 files changed, 64 insertions(+), 4 deletions(-) diff --git a/data/text_unscramble1.bin b/data/text_unscramble1.bin index 532ec83bd5749de6ee7b33dc6b63dc20968be605..161009c3bfca45f2a94539b9e34a73ffd31b1320 100644 GIT binary patch delta 25 jcmV+!0OtR|0>A>0^aY@yqNAjd`5OhLrl+W>lNkXgq&W-u delta 25 acmX@Wbbx8X7uGW%F!84}gfUr?Q5^ubd<}#E diff --git a/dungeonmap.asm b/dungeonmap.asm index 275c76a..7c4fff1 100644 --- a/dungeonmap.asm +++ b/dungeonmap.asm @@ -4,7 +4,6 @@ DoDungeonMapBossIcon: BEQ .dungeonmap .cave - CMP.b #$01 RTL .dungeonmap diff --git a/hooks.asm b/hooks.asm index 44d9f27..6f092c2 100644 --- a/hooks.asm +++ b/hooks.asm @@ -265,6 +265,7 @@ db $09 : SKIP 5 : db $09 : SKIP 1 : db $09 : SKIP 1 : db $09 : SKIP 1 : db $09 : db $09 : SKIP 1 : db $09 : SKIP 1 : db $09 : SKIP 1 : db $09 : SKIP 5 : db $05 ;-------------------------------------------------------------------------------- + ;================================================================================ ; Delete file Screen ;-------------------------------------------------------------------------------- @@ -2447,9 +2448,6 @@ SBC.b #$03 : STA.w $0801,X LDA.b #$03 : STA.w $0802,X LDA.b #$31 : STA.w $0803,X -org $008BE5 ; hijack stripes for boss GFX transfer -JSL DoDungeonMapBossIcon - ;================================================================================ org $01C4B8 JSL FixJingleGlitch @@ -2492,3 +2490,9 @@ if !FEATURE_NEW_TEXT org $0EF285 JSL RenderCharSetColorExtended_close : NOP endif + +;================================================================================ +; VRAM +;-------------------------------------------------------------------------------- +org $008BE5 ; hijack stripes +JSL.l TransferVRAMStripes diff --git a/playername.asm b/playername.asm index fe4c5be..426d61c 100644 --- a/playername.asm +++ b/playername.asm @@ -57,3 +57,55 @@ HeartCursorPositions: db $70, $78, $80, $88 db $98, $a0, $a8, $b0 db $c0, $c8, $d0, $d8 + + +NumberStripes: +dw $AB66, $1100 ; 0-4 top +dw $1D40, $0188, $1D41, $0188, $1D42, $0188, $1D43, $0188 +dw $1D44 +dw $CB66, $1100 ; 0-4 bottom +dw $1D50, $0188, $1D51, $0188, $1D52, $0188, $1D53, $0188 +dw $1D54 +dw $EB66, $1100 ; 5-9 top +dw $1D45, $0188, $1D46, $0188, $1D47, $0188, $1D48, $0188 +dw $1D49 +dw $0B67, $1100 ; 5-9 bottom +dw $1D55, $0188, $1D56, $0188, $1D57, $0188, $1D58, $0188 +dw $1D59 +db $80 ; termination + +TransferNumericStripes: + REP #$30 + LDA.w GameMode : CMP.w #$0204 : BNE .exit + SEP #$20 + LDA.b #NumberStripes>>0 : STA.b $00 + LDA.b #NumberStripes>>8 : STA.b $01 + LDA.b #NumberStripes>>16 : STA.b $02 : STA.w DMA1ADDRB + STZ.b $06 : LDY.w #$0000 + .check_next + LDA.b [$00],Y : BPL .next_stripe + .exit + SEP #$30 +RTL + .next_stripe + STA.b $04 + INY + LDA.b [$00],Y : STA.b $03 + INY + LDA.b [$00],Y : AND.b #$80 : ASL : ROL : STA.b $07 + LDA.b [$00],Y : AND.b #$40 : STA.b $05 + LSR #3 : ORA.b #$01 : STA.w DMA1MODE + LDA.b #VMDATAL : STA.w DMA1PORT + REP #$20 + LDA.b $03 : STA.w VMADDR + LDA.b [$00],Y : XBA : AND.w #$3FFF + TAX : INX : STX.w DMA1SIZE + INY #2 : TYA + CLC : ADC.b $00 : STA.w DMA1ADDRL + LDA.b $05 + STX.b $03 + TYA : CLC : ADC.b $03 : TAY + SEP #$20 + LDA.b $07 : ORA.b #$80 : STA.w VMAIN + LDA.b #$02 : STA.w DMAENABLE + JMP.w .check_next diff --git a/utilities.asm b/utilities.asm index 82f1076..c955bd1 100644 --- a/utilities.asm +++ b/utilities.asm @@ -724,3 +724,8 @@ RTL ;This feature makes it easy to draw the same tile repeatedly. If this bit is set, the length bits should be set to 2 times the number of copies of the tile to upload. (Without subtracting 1!) ;It is followed by a single tile (word). Combining this this with the D bit makes it easy to draw large horizontal or vertical runs of a tile without using much space. Geat for erasing or drawing horizontal or verical box edges. ;================================================================================ +TransferVRAMStripes: + JSL.l TransferNumericStripes + JSL.l DoDungeonMapBossIcon + LDA.b NMISTRIPES : CMP.b #$01 ; What we wrote over +RTL