diff --git a/joeylib/src/jIIgs.asm b/joeylib/src/jIIgs.asm index 51ed50f..58d49d9 100644 --- a/joeylib/src/jIIgs.asm +++ b/joeylib/src/jIIgs.asm @@ -342,6 +342,15 @@ drawTop phy ; Keep Y for later ; ; Draws from (clpx0,clpy0) to (clpx1,clpy1) (output of a clipping routine). ; +asmTest start +result equ 1 + jsubroutine (4:surface),2 + lda surface ; Should be $2000 + lda surface+1 + sta result + jreturn 2:result + end + asmDrawLine start x0 equ 1 @@ -359,7 +368,8 @@ odd_c equ 19 ; Say surface = $012000... - lda #surface ; Should be $0120 +; lda #>surface ; Should be $0120 + lda surface+1 ; Should be $0120 pha ; switch to bank we're pointing into plb ; B is now $20 - bad! plb ; B is now $01 - good! diff --git a/joeylib/src/joey.h b/joeylib/src/joey.h index bfc6917..8f946ba 100644 --- a/joeylib/src/joey.h +++ b/joeylib/src/joey.h @@ -256,7 +256,7 @@ bool jlKeyPressed(void); char jlKeyRead(void); void jlKeyWaitForAny(void); -void jlPaletteDefault(void); +void jlPaletteDefault(void); //***TODO*** Treat palettes like we do "surfaces" - allow changing STAs or display void jlPaletteSet(byte index, byte r, byte g, byte b); void jlPaletteSetFromSta(jlStaT *sta); diff --git a/joeylib/src/test.c b/joeylib/src/test.c index f7ce0df..80a4696 100644 --- a/joeylib/src/test.c +++ b/joeylib/src/test.c @@ -81,12 +81,14 @@ int main(void) { printAt(font, 1, y++, "X = %d ", jlGameGetAxis(0)); printAt(font, 1, y++, "Y = %d ", jlGameGetAxis(1)); printAt(font, 1, y++, "T = %d ", jlUtilTimer()); + printAt(font, 1, y++, "R = %d ", asmTest((jlSurfaceT)0x012000)); jlDrawColorSet((byte)color); jlDrawLine(0, y2, 319, 199-y2); + //asmDrawLine(_jlDrawTargetActual, _jlDrawColor, 0, y2, 319, 199-y2); y2 += dy; if (y2 == 199 || y2 == 0) dy = -dy; jlDisplayPresent(); - jlUtilNibbleSwap((byte *)font->pixels, 32000, (byte)(color), (byte)(nextColor)); + //jlUtilNibbleSwap((byte *)font->pixels, 32000, (byte)(color), (byte)(nextColor)); color = nextColor; nextColor++; if (nextColor > 15) nextColor = 1;