mirror of
https://github.com/cc65/cc65.git
synced 2025-01-10 19:29:45 +00:00
Don't use php to save old IRQ state
git-svn-id: svn://svn.cc65.org/cc65/trunk@869 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
c501c18b95
commit
241db12053
@ -153,7 +153,6 @@ _mouse_show:
|
|||||||
_mouse_box:
|
_mouse_box:
|
||||||
ldy #0 ; Stack offset
|
ldy #0 ; Stack offset
|
||||||
|
|
||||||
php
|
|
||||||
sei ; Disable interrupts
|
sei ; Disable interrupts
|
||||||
|
|
||||||
sta YMax
|
sta YMax
|
||||||
@ -179,7 +178,7 @@ _mouse_box:
|
|||||||
lda (sp),y
|
lda (sp),y
|
||||||
sta XMin+1 ; minx
|
sta XMin+1 ; minx
|
||||||
|
|
||||||
plp ; Enable interrupts
|
cli ; Enable interrupts
|
||||||
|
|
||||||
jmp addysp1 ; Drop params, return
|
jmp addysp1 ; Drop params, return
|
||||||
|
|
||||||
@ -195,7 +194,6 @@ _mouse_pos:
|
|||||||
|
|
||||||
ldy #0 ; Structure offset
|
ldy #0 ; Structure offset
|
||||||
|
|
||||||
php
|
|
||||||
sei ; Disable interrupts
|
sei ; Disable interrupts
|
||||||
|
|
||||||
lda XPos ; Transfer the position
|
lda XPos ; Transfer the position
|
||||||
@ -210,7 +208,7 @@ _mouse_pos:
|
|||||||
iny
|
iny
|
||||||
sta (ptr1),y
|
sta (ptr1),y
|
||||||
|
|
||||||
plp ; Restore initial interrupt state
|
cli ; Restore initial interrupt state
|
||||||
|
|
||||||
rts ; Done
|
rts ; Done
|
||||||
|
|
||||||
@ -404,7 +402,7 @@ MoveSprite:
|
|||||||
MoveSprite1:
|
MoveSprite1:
|
||||||
lda VIC_SPR_HI_X ; Get high X bits of all sprites
|
lda VIC_SPR_HI_X ; Get high X bits of all sprites
|
||||||
and NotMask-1,x ; Mask out sprite bit
|
and NotMask-1,x ; Mask out sprite bit
|
||||||
ldy XPos+1 ; Test Y position
|
ldy XPos+1 ; Test Y position
|
||||||
beq @L1
|
beq @L1
|
||||||
ora BitMask-1,x ; Set high X bit
|
ora BitMask-1,x ; Set high X bit
|
||||||
@L1: sta VIC_SPR_HI_X ; Set hi X sprite values
|
@L1: sta VIC_SPR_HI_X ; Set hi X sprite values
|
||||||
@ -412,14 +410,14 @@ MoveSprite1:
|
|||||||
; Set the low X byte
|
; Set the low X byte
|
||||||
|
|
||||||
txa
|
txa
|
||||||
asl a ; Index*2
|
asl a ; Index*2
|
||||||
tax
|
tax
|
||||||
lda XPos
|
lda XPos
|
||||||
sta VIC_SPR0_X-2,x ; Set low byte
|
sta VIC_SPR0_X-2,x ; Set low byte
|
||||||
|
|
||||||
; Set the Y position
|
; Set the Y position
|
||||||
|
|
||||||
ldy YPos+1 ; Negative or too large?
|
ldy YPos+1 ; Negative or too large?
|
||||||
bne MoveSpriteDone ; Jump if yes
|
bne MoveSpriteDone ; Jump if yes
|
||||||
lda YPos
|
lda YPos
|
||||||
sta VIC_SPR0_Y-2,x ; Set Y position
|
sta VIC_SPR0_Y-2,x ; Set Y position
|
||||||
|
Loading…
x
Reference in New Issue
Block a user