present updates
This commit is contained in:
parent
86aa76b8c5
commit
197f2854d0
45
asm/blit.s
45
asm/blit.s
|
@ -185,7 +185,7 @@ dp ds 2
|
||||||
|
|
||||||
|
|
||||||
*
|
*
|
||||||
* void DrawRect(short x, short y, short width, short height)
|
* void BlitRect(short x, short y, short width, short height)
|
||||||
*
|
*
|
||||||
|
|
||||||
BlitRect start BLITCODE
|
BlitRect start BLITCODE
|
||||||
|
@ -221,6 +221,7 @@ stackFix equ 9
|
||||||
lsr a
|
lsr a
|
||||||
lsr a
|
lsr a
|
||||||
sta inputW,s
|
sta inputW,s
|
||||||
|
sta loopW
|
||||||
|
|
||||||
clc
|
clc
|
||||||
lda inputY,s
|
lda inputY,s
|
||||||
|
@ -231,28 +232,43 @@ stackFix equ 9
|
||||||
lsr a
|
lsr a
|
||||||
lsr a
|
lsr a
|
||||||
sta inputH,s
|
sta inputH,s
|
||||||
|
sta loopH
|
||||||
|
|
||||||
lda inputY,s
|
lda inputY,s
|
||||||
and #~3
|
and #~3
|
||||||
lsr a
|
lsr a
|
||||||
lsr a
|
lsr a
|
||||||
sta inputY,s
|
sta inputY,s
|
||||||
|
sta loopY
|
||||||
tay
|
tay
|
||||||
|
|
||||||
lda inputX,s
|
lda inputX,s
|
||||||
and #~3
|
and #~3
|
||||||
tax
|
tax
|
||||||
sta inputX,s ; maybe don't need this
|
sta inputX,s ; maybe don't need this
|
||||||
|
sta loopX
|
||||||
|
|
||||||
|
*---------------------------------------
|
||||||
|
sei
|
||||||
|
_shadowON
|
||||||
|
_auxON
|
||||||
|
*---------------------------------------
|
||||||
|
|
||||||
|
*
|
||||||
|
* We're messing with the stack, and the DP
|
||||||
|
* so operationally, we can't use these things
|
||||||
|
* for variables, or for call returns
|
||||||
|
*
|
||||||
|
|
||||||
*
|
*
|
||||||
* Outter loop, once for each Y
|
* Outter loop, once for each Y
|
||||||
*
|
*
|
||||||
YLOOP ANOP
|
YLOOP ANOP
|
||||||
|
|
||||||
lda inputX,s
|
lda loopX
|
||||||
sta tempX
|
sta tempX
|
||||||
|
|
||||||
lda inputW,s
|
lda loopW
|
||||||
sta tempW
|
sta tempW
|
||||||
|
|
||||||
XLOOP ANOP ; Inner Loop, for each X Block
|
XLOOP ANOP ; Inner Loop, for each X Block
|
||||||
|
@ -279,13 +295,14 @@ BRET anop ; Blit Return
|
||||||
lda tempW
|
lda tempW
|
||||||
bne XLOOP
|
bne XLOOP
|
||||||
|
|
||||||
lda inputH,s
|
dec loopH
|
||||||
dec a
|
|
||||||
bmi done
|
bmi done
|
||||||
sta inputH,s
|
|
||||||
|
|
||||||
iny ; next direct page
|
iny ; next direct page
|
||||||
iny
|
iny
|
||||||
|
|
||||||
|
* TODO, every 4 lines or so (or every so many clocks)
|
||||||
|
* re-enable interrupts, for audio, and the heartbeat
|
||||||
|
|
||||||
bra YLOOP
|
bra YLOOP
|
||||||
|
|
||||||
|
@ -299,6 +316,13 @@ done ANOP
|
||||||
lda stack
|
lda stack
|
||||||
tcs
|
tcs
|
||||||
|
|
||||||
|
*---------------------------------------
|
||||||
|
_auxOFF
|
||||||
|
_shadowOFF
|
||||||
|
cli
|
||||||
|
*---------------------------------------
|
||||||
|
|
||||||
|
|
||||||
* Patchup the Stack so we can return
|
* Patchup the Stack so we can return
|
||||||
|
|
||||||
lda 3,s
|
lda 3,s
|
||||||
|
@ -310,7 +334,12 @@ done ANOP
|
||||||
rtl
|
rtl
|
||||||
*-------------------------------------------------------------------------------
|
*-------------------------------------------------------------------------------
|
||||||
tempX ds 2 ; inner X
|
tempX ds 2 ; inner X
|
||||||
tempW ds 2 ; inner W
|
tempW ds 2 ; inner W
|
||||||
|
* Local bank copies of our stack variables
|
||||||
|
loopX ds 2
|
||||||
|
loopY ds 2
|
||||||
|
loopW ds 2
|
||||||
|
loopH ds 2
|
||||||
stack ds 2 ; stack register
|
stack ds 2 ; stack register
|
||||||
dp ds 2 ; dp register
|
dp ds 2 ; dp register
|
||||||
|
|
||||||
|
|
|
@ -174,6 +174,9 @@ extern void sysjoy_shutdown(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef IIGS
|
#ifdef IIGS
|
||||||
|
// GS Hardware Registers
|
||||||
|
extern volatile char *VIDEO_REGISTER;
|
||||||
|
|
||||||
// GS Specific Stuff
|
// GS Specific Stuff
|
||||||
extern int LZ4_Unpack(char* pDest, char* pPackedSource);
|
extern int LZ4_Unpack(char* pDest, char* pPackedSource);
|
||||||
extern volatile unsigned long* tick;
|
extern volatile unsigned long* tick;
|
||||||
|
@ -184,6 +187,12 @@ extern void DrawTile(int offset, int tileNo);
|
||||||
extern void SetSpriteBanks(short b0, short b1, short b2, short b3);
|
extern void SetSpriteBanks(short b0, short b1, short b2, short b3);
|
||||||
extern void DrawSprite(int offset, int SpriteNo);
|
extern void DrawSprite(int offset, int SpriteNo);
|
||||||
|
|
||||||
|
// Code for presenting backpage
|
||||||
|
extern void PresentPalette(void);
|
||||||
|
extern void PresentSCB(void);
|
||||||
|
extern void PresentFrameBuffer(void);
|
||||||
|
extern void BlitRect(short x, short y, short width, short height);
|
||||||
|
|
||||||
// ADB Support Code
|
// ADB Support Code
|
||||||
extern char KeyArray[128];
|
extern char KeyArray[128];
|
||||||
extern void RemoveKeyboardDriver();
|
extern void RemoveKeyboardDriver();
|
||||||
|
|
Loading…
Reference in New Issue