-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly fix MMC1 Automap for Animation (thanks to minucce)
- Loading branch information
1 parent
b804ae0
commit 2fae5af
Showing
18 changed files
with
476 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// | ||
// Source: | ||
// minucce | ||
// | ||
// License: | ||
// Code should be used only for educational, documentation and modding purposes. | ||
// Please keep derivative work open source. | ||
|
||
|
||
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< | ||
|
||
bank 5; | ||
org $AAB4 // 0x16AC4 | ||
jsr hud_loading_blink | ||
nop | ||
|
||
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< | ||
|
||
org $AF40 // 0x16F50+$2C | ||
|
||
// | ||
// Turn on BG display during VBlank; Disable after HUD scanline | ||
// | ||
|
||
hud_loading_blink: | ||
inc.b $06 | ||
|
||
lda.b $06 | ||
cmp.b #$10 // Done loading | ||
beq .exit | ||
and.b #$03 // Redraw every 4 frames | ||
bne .exit | ||
|
||
|
||
lda.b $12 // Verify overworld transition | ||
cmp.b #$0A | ||
beq + | ||
cmp.b #$0B | ||
bne .exit | ||
+; | ||
-; | ||
lda.w $2002 // Wait pre-render scanline -1 | ||
asl | ||
bmi - | ||
|
||
lda.b #$1E // Enable drawing | ||
sta.w $2001 | ||
|
||
jsr $8521 // Draw HUD | ||
|
||
.exit: | ||
lda.b $06 | ||
rts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// | ||
// Source: | ||
// minucce | ||
// | ||
// License: | ||
// Code should be used only for educational, documentation and modding purposes. | ||
// Please keep derivative work open source. | ||
|
||
|
||
// | ||
// Reset sprite position on entering overworld from caves | ||
// | ||
|
||
|
||
bank 5; org $14F5D // 0x14F6D | ||
jsr hide_sprite | ||
nop | ||
|
||
// ##################################################### | ||
|
||
org $14F61 // 0x14F71 | ||
stx.b $00 | ||
jsr $F184 // Reset vars | ||
ldx.b $00 | ||
|
||
rts | ||
|
||
org $8F69; hide_sprite: // $14F69, 0x14F79 | ||
lda.b #$0A // Transition out of cave | ||
sta.b $12 | ||
|
||
lda.b #$F8 // Hide sprite | ||
sta.b $84 | ||
|
||
nop | ||
rts // org $14F72, 0x14F82 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// | ||
// Source: | ||
// minucce | ||
// | ||
// License: | ||
// Code should be used only for educational, documentation and modding purposes. | ||
// Please keep derivative work open source. | ||
|
||
|
||
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< | ||
|
||
bank 5; org $1454E // 0x1455E | ||
|
||
// Reset Y-scroll value with more precision | ||
ldy.b #$5E+2 | ||
|
||
-; nop // Manual timing | ||
dey | ||
bpl - | ||
|
||
nop | ||
nop | ||
nop | ||
nop | ||
nop | ||
nop | ||
|
||
lda.w $2002 // Reset latch | ||
|
||
lda.b $58 // Render-Y2 | ||
ldy.b $E2 // Render-Y1 | ||
|
||
// Credit to Quietust (nesdev) for explaining PPU Addr register scrolling | ||
|
||
sta.w $2006 | ||
lda.b #$00 | ||
|
||
sty.w $2006 // Render location (must be h-blank) | ||
sta.w $2005 // Fine X-pos | ||
rts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// | ||
// Source: | ||
// minucce | ||
// | ||
// License: | ||
// Code should be used only for educational, documentation and modding purposes. | ||
// Please keep derivative work open source. | ||
|
||
|
||
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< | ||
|
||
bank 5; | ||
org $AAB4 // 0x16AC4 | ||
jsr hud_loading_blink | ||
nop | ||
|
||
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< | ||
|
||
org $AF40 // 0x16F50+$2C | ||
|
||
// | ||
// Turn on BG display during VBlank; Disable after HUD scanline | ||
// | ||
|
||
hud_loading_blink: | ||
inc.b $06 | ||
|
||
lda.b $06 | ||
cmp.b #$10 // Done loading | ||
beq .exit | ||
and.b #$03 // Redraw every 4 frames | ||
bne .exit | ||
|
||
|
||
lda.b $12 // Verify overworld transition | ||
cmp.b #$0A | ||
beq + | ||
cmp.b #$0B | ||
bne .exit | ||
+; | ||
-; | ||
lda.w $2002 // Wait pre-render scanline -1 | ||
asl | ||
bmi - | ||
|
||
lda.b #$1E // Enable drawing | ||
sta.w $2001 | ||
|
||
jsr $8521 // Draw HUD | ||
|
||
.exit: | ||
lda.b $06 | ||
rts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// | ||
// Source: | ||
// minucce | ||
// | ||
// License: | ||
// Code should be used only for educational, documentation and modding purposes. | ||
// Please keep derivative work open source. | ||
|
||
|
||
// | ||
// Reset sprite position on entering overworld from caves | ||
// | ||
|
||
|
||
bank 5; org $14F5D // 0x14F6D | ||
jsr hide_sprite | ||
nop | ||
|
||
// ##################################################### | ||
|
||
org $14F61 // 0x14F71 | ||
stx.b $00 | ||
jsr $F184 // Reset vars | ||
ldx.b $00 | ||
|
||
rts | ||
|
||
org $8F69; hide_sprite: // $14F69, 0x14F79 | ||
lda.b #$0A // Transition out of cave | ||
sta.b $12 | ||
|
||
lda.b #$F8 // Hide sprite | ||
sta.b $84 | ||
|
||
nop | ||
rts // org $14F72, 0x14F82 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// | ||
// Source: | ||
// minucce | ||
// | ||
// License: | ||
// Code should be used only for educational, documentation and modding purposes. | ||
// Please keep derivative work open source. | ||
|
||
|
||
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< | ||
|
||
bank 5; org $1454E // 0x1455E | ||
|
||
// Reset Y-scroll value with more precision | ||
ldy.b #$5E+2 | ||
|
||
-; nop // Manual timing | ||
dey | ||
bpl - | ||
|
||
nop | ||
nop | ||
nop | ||
nop | ||
nop | ||
nop | ||
|
||
lda.w $2002 // Reset latch | ||
|
||
lda.b $58 // Render-Y2 | ||
ldy.b $E2 // Render-Y1 | ||
|
||
// Credit to Quietust (nesdev) for explaining PPU Addr register scrolling | ||
|
||
sta.w $2006 | ||
lda.b #$00 | ||
|
||
sty.w $2006 // Render location (must be h-blank) | ||
sta.w $2005 // Fine X-pos | ||
rts |
Oops, something went wrong.