mirror of
https://github.com/deater/tb1.git
synced 2025-01-18 05:29:54 +00:00
snes: cleanup the opening screen code a bit
Some other misc minor cleanups.
This commit is contained in:
parent
4941aa8cc9
commit
16fd44d0ae
@ -1,5 +1,2 @@
|
||||
Tile compressor. Look for flipped too. Compare new tilemap size to
|
||||
size w/o compress.
|
||||
|
||||
Sort out how to best get colored fonts.
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
.word $702f ; Complement of checksum
|
||||
.word $8fd0 ; Unsigned 16-bit sum of ROM
|
||||
.word $7a38 ; Complement of checksum
|
||||
.word $85c7 ; Unsigned 16-bit sum of ROM
|
||||
|
@ -56,40 +56,30 @@ display_opening:
|
||||
jsr svmw_load_vram
|
||||
|
||||
|
||||
|
||||
|
||||
; we want the BG1 Tilemap to start at VRAM $F000 (60k)
|
||||
;=====================================
|
||||
; Set the BG1 and BG2 Tilemap Location
|
||||
;=====================================
|
||||
; Format is
|
||||
; aaaa aass a is shifted by 10 for address
|
||||
; ss = size of screen in tiles 00 = 32x32
|
||||
;
|
||||
; 1111 0000
|
||||
|
||||
lda #$78 ; BG1 Tilemap starts at VRAM $F000
|
||||
lda #$78 ; BG1 Tilemap starts at VRAM $F000 (/2)
|
||||
sta $2107 ; bg1 src
|
||||
|
||||
|
||||
; we want the BG2 Tilemap to start at VRAM $F800
|
||||
; Format is
|
||||
; aaaa aass a is shifted by 10 for address
|
||||
; ss = size of screen in tiles 00 = 32x32
|
||||
;
|
||||
; 1111 1000
|
||||
|
||||
lda #$7c ; BG2 Tilemap starts at VRAM $F800
|
||||
lda #$7c ; BG2 Tilemap starts at VRAM $F800 (/2)
|
||||
sta $2108 ; bg2 src
|
||||
|
||||
;========================================
|
||||
; Set the BG1 and BG2 Tile Data Locations
|
||||
;========================================
|
||||
|
||||
; aaaa bbbb a= BG2 tiles, b= BG1 tiles
|
||||
; bbbb<<13
|
||||
; 0000 0000
|
||||
; our BG1 tiles are stored starting in VRAM $0000
|
||||
; our BG2 tiles are stored starting in VRAM $e000
|
||||
|
||||
lda #$70
|
||||
sta $210b ; bg1 tile data starts at VRAM 0000
|
||||
|
||||
|
||||
sta $210b ; BG1 tile data starts at VRAM 0000
|
||||
; BG2 tile data starts at VRAM e000
|
||||
|
||||
|
||||
|
||||
|
@ -43,7 +43,7 @@ start_program:
|
||||
|
||||
jsr display_title
|
||||
|
||||
jsr level_1
|
||||
; jsr level_1
|
||||
|
||||
.include "title_screen.s"
|
||||
.include "opening.s"
|
||||
|
@ -115,24 +115,28 @@ title_setup_video:
|
||||
|
||||
|
||||
; lda #$81 ; Enable NMI (VBlank Interrupt) and joypads
|
||||
lda #$01 ; Enable joypad
|
||||
; lda #$01 ; Enable joypad
|
||||
lda #$00
|
||||
sta $4200 ;
|
||||
|
||||
title_joypad_read:
|
||||
lda $4212 ; get joypad status
|
||||
and #%00000001 ; if joy is not ready
|
||||
bne title_joypad_read ; wait
|
||||
big:
|
||||
bra big
|
||||
|
||||
lda $4219 ; read joypad (BYSTudlr)
|
||||
;title_joypad_read:
|
||||
; lda $4212 ; get joypad status
|
||||
; and #%00000001 ; if joy is not ready
|
||||
; bne title_joypad_read ; wait
|
||||
;
|
||||
; lda $4219 ; read joypad (BYSTudlr)
|
||||
;
|
||||
; and #%11110000 ; see if a button pressed
|
||||
|
||||
and #%11110000 ; see if a button pressed
|
||||
; beq title_joypad_read
|
||||
;
|
||||
; lda #$80
|
||||
; sta $2100 ; Turn off screen
|
||||
|
||||
beq title_joypad_read
|
||||
|
||||
lda #$80
|
||||
sta $2100 ; Turn off screen
|
||||
|
||||
rts
|
||||
; rts
|
||||
|
||||
|
||||
;============================================================================
|
||||
|
Loading…
x
Reference in New Issue
Block a user