diff --git a/src/test/kc/multiplexer-irq/multiplexer-irq.kc b/src/test/kc/multiplexer-irq/multiplexer-irq.kc index 28eab7ade..76450d3e5 100644 --- a/src/test/kc/multiplexer-irq/multiplexer-irq.kc +++ b/src/test/kc/multiplexer-irq/multiplexer-irq.kc @@ -17,7 +17,7 @@ import "c64" // The number of sprites in the multiplexer const char PLEX_COUNT = 32; -// The x-positions of the multiplexer sprites ($000-$1ff) +// The x-positions of the multiplexer sprites (0x000-0x1ff) unsigned int[PLEX_COUNT] PLEX_XPOS; // The y-positions of the multiplexer sprites. @@ -26,8 +26,8 @@ char[PLEX_COUNT] PLEX_YPOS; // The sprite pointers for the multiplexed sprites char[PLEX_COUNT] PLEX_PTR; -// The address of the sprite pointers on the current screen (screen+$3f8). -char* PLEX_SCREEN_PTR = $400+$3f8; +// The address of the sprite pointers on the current screen (screen+0x3f8). +char* PLEX_SCREEN_PTR = 0x400+0x3f8; // Indexes of the plex-sprites sorted by sprite y-position. Each call to plexSort() will fix the sorting if changes to the Y-positions have ruined it. char[PLEX_COUNT] PLEX_SORTED_IDX; @@ -49,9 +49,9 @@ void plexInit(char* screen) { } } -// Set the address of the current screen used for setting sprite pointers (at screen+$3f8) +// Set the address of the current screen used for setting sprite pointers (at screen+0x3f8) inline void plexSetScreen(char* screen) { - PLEX_SCREEN_PTR = screen+$3f8; + PLEX_SCREEN_PTR = screen+0x3f8; } // Ensure that the indices in PLEX_SORTED_IDX is sorted based on the y-positions in PLEX_YPOS @@ -73,7 +73,7 @@ void plexSort() { do { PLEX_SORTED_IDX[s+1] = PLEX_SORTED_IDX[s]; s--; - } while((s!=$ff) && (nxt_yPLEX_XPOS[xpos_idx]!=0) { *SPRITES_XMSB |= plex_sprite_msb; } else { - *SPRITES_XMSB &= ($ff^plex_sprite_msb); + *SPRITES_XMSB &= (0xff^plex_sprite_msb); } plex_sprite_idx = (plex_sprite_idx+1)&7; plex_show_idx++; diff --git a/src/test/kc/multiplexer-irq/simple-multiplexer-irq.kc b/src/test/kc/multiplexer-irq/simple-multiplexer-irq.kc index 60c03a481..4f5cc626c 100644 --- a/src/test/kc/multiplexer-irq/simple-multiplexer-irq.kc +++ b/src/test/kc/multiplexer-irq/simple-multiplexer-irq.kc @@ -29,12 +29,12 @@ void init() { // Set the x-positions & pointers unsigned int xp = 32; for(char sx: 0..PLEX_COUNT-1) { - PLEX_PTR[sx] = (char)(SPRITE/$40); + PLEX_PTR[sx] = (char)(SPRITE/0x40); PLEX_XPOS[sx] = xp; xp += 9; } // Enable & initialize sprites - *SPRITES_ENABLE = $ff; + *SPRITES_ENABLE = 0xff; for(char ss: 0..7) { SPRITES_COLS[ss] = GREEN; } diff --git a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.asm b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.asm index c5142a825..f871e2efe 100644 --- a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.asm +++ b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.asm @@ -30,7 +30,7 @@ .const GREEN = 5 // The number of sprites in the multiplexer .const PLEX_COUNT = $20 - // The address of the sprite pointers on the current screen (screen+$3f8). + // The address of the sprite pointers on the current screen (screen+0x3f8). .label PLEX_SCREEN_PTR = $400+$3f8 .label plex_show_idx = 7 .label plex_sprite_idx = 6 @@ -330,7 +330,7 @@ SPRITE: YSIN: .fill $100, round(139.5+89.5*sin(toRadians(360*i/256))) - // The x-positions of the multiplexer sprites ($000-$1ff) + // The x-positions of the multiplexer sprites (0x000-0x1ff) PLEX_XPOS: .fill 2*PLEX_COUNT, 0 // The y-positions of the multiplexer sprites. PLEX_YPOS: .fill PLEX_COUNT, 0 diff --git a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.log b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.log index 07209548f..856a5a1be 100644 --- a/src/test/ref/multiplexer-irq/simple-multiplexer-irq.log +++ b/src/test/ref/multiplexer-irq/simple-multiplexer-irq.log @@ -2380,7 +2380,7 @@ Target platform is c64basic / MOS6502X .const GREEN = 5 // The number of sprites in the multiplexer .const PLEX_COUNT = $20 - // The address of the sprite pointers on the current screen (screen+$3f8). + // The address of the sprite pointers on the current screen (screen+0x3f8). .label PLEX_SCREEN_PTR = $400+$3f8 .label plex_show_idx = $e .label plex_sprite_idx = $d @@ -3084,7 +3084,7 @@ SPRITE: YSIN: .fill $100, round(139.5+89.5*sin(toRadians(360*i/256))) - // The x-positions of the multiplexer sprites ($000-$1ff) + // The x-positions of the multiplexer sprites (0x000-0x1ff) PLEX_XPOS: .fill 2*PLEX_COUNT, 0 // The y-positions of the multiplexer sprites. PLEX_YPOS: .fill PLEX_COUNT, 0 @@ -3421,7 +3421,7 @@ ASSEMBLER BEFORE OPTIMIZATION .const GREEN = 5 // The number of sprites in the multiplexer .const PLEX_COUNT = $20 - // The address of the sprite pointers on the current screen (screen+$3f8). + // The address of the sprite pointers on the current screen (screen+0x3f8). .label PLEX_SCREEN_PTR = $400+$3f8 .label plex_show_idx = 7 .label plex_sprite_idx = 6 @@ -4059,7 +4059,7 @@ SPRITE: YSIN: .fill $100, round(139.5+89.5*sin(toRadians(360*i/256))) - // The x-positions of the multiplexer sprites ($000-$1ff) + // The x-positions of the multiplexer sprites (0x000-0x1ff) PLEX_XPOS: .fill 2*PLEX_COUNT, 0 // The y-positions of the multiplexer sprites. PLEX_YPOS: .fill PLEX_COUNT, 0 @@ -4461,7 +4461,7 @@ Score: 43736 .const GREEN = 5 // The number of sprites in the multiplexer .const PLEX_COUNT = $20 - // The address of the sprite pointers on the current screen (screen+$3f8). + // The address of the sprite pointers on the current screen (screen+0x3f8). .label PLEX_SCREEN_PTR = $400+$3f8 .label plex_show_idx = 7 .label plex_sprite_idx = 6 @@ -4664,7 +4664,7 @@ plexSort: { // s--; // [39] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3 -- vbuxx=_dec_vbuxx dex - // while((s!=$ff) && (nxt_yinit::@1#1] -- register_copy // init::@1 __b1: - // PLEX_PTR[sx] = (char)(SPRITE/$40) + // PLEX_PTR[sx] = (char)(SPRITE/0x40) // [59] *((const byte[PLEX_COUNT]) PLEX_PTR + (byte) init::sx#2) ← (byte)(const byte[$40]) SPRITE/(byte) $40 -- pbuc1_derefidx_vbuxx=vbuc2 lda #$ff&SPRITE/$40 sta PLEX_PTR,x @@ -4788,7 +4788,7 @@ init: { cpx #PLEX_COUNT-1+1 bne __b1 // init::@2 - // *SPRITES_ENABLE = $ff + // *SPRITES_ENABLE = 0xff // [65] *((const byte*) SPRITES_ENABLE) ← (byte) $ff -- _deref_pbuc1=vbuc2 // Enable & initialize sprites lda #$ff @@ -5009,11 +5009,11 @@ plexShowSprite: { cmp #0 bne __b1 // plexShowSprite::@3 - // $ff^plex_sprite_msb + // 0xff^plex_sprite_msb // [112] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (byte) plex_sprite_msb#28 -- vbuaa=vbuc1_bxor_vbuz1 lda #$ff eor.z plex_sprite_msb - // *SPRITES_XMSB &= ($ff^plex_sprite_msb) + // *SPRITES_XMSB &= (0xff^plex_sprite_msb) // [113] *((const byte*) SPRITES_XMSB) ← *((const byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa and SPRITES_XMSB sta SPRITES_XMSB @@ -5073,7 +5073,7 @@ SPRITE: YSIN: .fill $100, round(139.5+89.5*sin(toRadians(360*i/256))) - // The x-positions of the multiplexer sprites ($000-$1ff) + // The x-positions of the multiplexer sprites (0x000-0x1ff) PLEX_XPOS: .fill 2*PLEX_COUNT, 0 // The y-positions of the multiplexer sprites. PLEX_YPOS: .fill PLEX_COUNT, 0