mirror of
https://github.com/safiire/n65.git
synced 2024-12-12 00:29:03 +00:00
Updating some of the demo asm files
This commit is contained in:
parent
8f01494fbb
commit
602ff6754d
2
beep.asm
2
beep.asm
@ -6,7 +6,7 @@
|
|||||||
start:
|
start:
|
||||||
LDA #$01 ; square 1
|
LDA #$01 ; square 1
|
||||||
STA $4015
|
STA $4015
|
||||||
LDA #$08 ; period low
|
LDA #$F8 ; period low
|
||||||
STA $4002
|
STA $4002
|
||||||
LDA #$02 ; period high
|
LDA #$02 ; period high
|
||||||
STA $4003
|
STA $4003
|
||||||
|
24
demo.asm
24
demo.asm
@ -31,7 +31,7 @@ sprite:
|
|||||||
main:
|
main:
|
||||||
; Disable interrupts and decimal flag
|
; Disable interrupts and decimal flag
|
||||||
sei
|
sei
|
||||||
cld
|
cld
|
||||||
|
|
||||||
; Wait for 2 vblanks
|
; Wait for 2 vblanks
|
||||||
wait_vb1:
|
wait_vb1:
|
||||||
@ -60,18 +60,18 @@ main:
|
|||||||
ldx #$FF
|
ldx #$FF
|
||||||
txs
|
txs
|
||||||
|
|
||||||
; Disable all graphics.
|
; Disable all graphics.
|
||||||
lda #$00
|
lda #$00
|
||||||
sta $2000
|
sta $2000
|
||||||
sta $2001
|
sta $2001
|
||||||
|
|
||||||
jsr init_graphics
|
jsr init_graphics
|
||||||
jsr init_input
|
jsr init_input
|
||||||
jsr init_sound
|
jsr init_sound
|
||||||
jsr init_ppu
|
jsr init_ppu
|
||||||
|
|
||||||
; Resume interrupts and loop here forever
|
; Resume interrupts and loop here forever
|
||||||
cli
|
cli
|
||||||
forever:
|
forever:
|
||||||
jmp forever
|
jmp forever
|
||||||
|
|
||||||
@ -112,8 +112,8 @@ init_sound:
|
|||||||
sta $4015
|
sta $4015
|
||||||
lda #$00
|
lda #$00
|
||||||
sta $4001
|
sta $4001
|
||||||
lda #$40
|
lda #$40
|
||||||
sta $4017
|
sta $4017
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
@ -237,7 +237,7 @@ react_to_input:
|
|||||||
|
|
||||||
lda $4016 ; Is the A button down?
|
lda $4016 ; Is the A button down?
|
||||||
AND #$01
|
AND #$01
|
||||||
beq not_a
|
beq not_a
|
||||||
ldx $01 ; a
|
ldx $01 ; a
|
||||||
bne a_done ; Only react if the A button wasn't down last time.
|
bne a_done ; Only react if the A button wasn't down last time.
|
||||||
sta $01 ; Store the 1 in local variable 'a' so that we this is
|
sta $01 ; Store the 1 in local variable 'a' so that we this is
|
||||||
@ -255,7 +255,7 @@ a_done:
|
|||||||
ldx sprite ; Load Y value
|
ldx sprite ; Load Y value
|
||||||
cpx #$07
|
cpx #$07
|
||||||
beq not_up ; No going past the top of the screen
|
beq not_up ; No going past the top of the screen
|
||||||
dex
|
dex
|
||||||
stx sprite
|
stx sprite
|
||||||
|
|
||||||
not_up:
|
not_up:
|
||||||
@ -271,7 +271,7 @@ not_dn:
|
|||||||
rts ; Ignore left and right, we don't use 'em
|
rts ; Ignore left and right, we don't use 'em
|
||||||
|
|
||||||
reverse_dx:
|
reverse_dx:
|
||||||
lda #$FF
|
lda #$FF
|
||||||
eor $00 ; dx
|
eor $00 ; dx
|
||||||
clc
|
clc
|
||||||
adc #$01
|
adc #$01
|
||||||
@ -291,7 +291,7 @@ scroll_screen:
|
|||||||
lda #$00
|
lda #$00
|
||||||
sta $2005 ; Write 0 for Horiz. Scroll value
|
sta $2005 ; Write 0 for Horiz. Scroll value
|
||||||
stx $2005 ; Write the value of 'scroll' for Vert. Scroll value
|
stx $2005 ; Write the value of 'scroll' for Vert. Scroll value
|
||||||
|
|
||||||
no_scroll:
|
no_scroll:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user