mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-04-06 15:41:05 +00:00
Updated multiplexer.kc to allow usage in IRQ's. Eliminated multiplexer-irq.kc.
This commit is contained in:
parent
90fccdebef
commit
a977e6d9f0
@ -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_XPOS[PLEX_COUNT];
|
||||
|
||||
// The y-positions of the multiplexer sprites.
|
||||
@ -26,8 +26,8 @@ char PLEX_YPOS[PLEX_COUNT];
|
||||
// The sprite pointers for the multiplexed sprites
|
||||
char PLEX_PTR[PLEX_COUNT];
|
||||
|
||||
// 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_SORTED_IDX[PLEX_COUNT];
|
||||
@ -35,11 +35,11 @@ char PLEX_SORTED_IDX[PLEX_COUNT];
|
||||
// Variables controlling the showing of sprites
|
||||
|
||||
// The index in the PLEX tables of the next sprite to show
|
||||
char plex_show_idx=0;
|
||||
volatile char plex_show_idx=0;
|
||||
// The index the next sprite to use for showing (sprites are used round-robin)
|
||||
char plex_sprite_idx=0;
|
||||
volatile char plex_sprite_idx=0;
|
||||
// The MSB bit of the next sprite to use for showing
|
||||
char plex_sprite_msb=1;
|
||||
volatile char plex_sprite_msb=1;
|
||||
|
||||
// Initialize the multiplexer data structures
|
||||
void plexInit(char* screen) {
|
||||
@ -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_y<PLEX_YPOS[PLEX_SORTED_IDX[s]]));
|
||||
} while((s!=0xff) && (nxt_y<PLEX_YPOS[PLEX_SORTED_IDX[s]]));
|
||||
// store the mark at the found position
|
||||
s++;
|
||||
PLEX_SORTED_IDX[s] = nxt_idx;
|
||||
@ -99,11 +99,11 @@ void plexShowSprite() {
|
||||
if(>PLEX_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++;
|
||||
plex_sprite_msb *=2;
|
||||
plex_sprite_msb <<=1;
|
||||
if(plex_sprite_msb==0) {
|
||||
plex_sprite_msb = 1;
|
||||
}
|
||||
@ -118,7 +118,7 @@ inline char plexShowNextYpos() {
|
||||
char PLEX_FREE_YPOS[8];
|
||||
|
||||
// The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown.
|
||||
char plex_free_next = 0;
|
||||
volatile char plex_free_next = 0;
|
||||
|
||||
// Prepare for a new frame. Initialize free to zero for all sprites.
|
||||
inline void plexFreePrepare() {
|
||||
|
@ -1,140 +0,0 @@
|
||||
// A flexible sprite multiplexer routine for 32 sprites.
|
||||
// Usage:
|
||||
// - Once:
|
||||
// - plexInit(screen): Initialize the data structures and set the screen address
|
||||
// Each frame:
|
||||
// - Set x-pos, y-pos and pointer in PLEX_XPOS[id], PLEX_YPOS[id], PLEX_PTR[id]
|
||||
// - plexSort() Sorts the sprites according to y-positions and prepares for showing them. This uses an insertion sort that is quite fast when the relative order of the sprites does not change very much.
|
||||
// - plexShowSprite() Shows the next sprite by copying values from PLEX_XXX[] to an actual sprite. Actual sprites are used round-robin. This should be called once for each of the 24 virtual sprites.
|
||||
// - plexFreeNextYpos() Returns the Y-position where the next sprite is available to be shown (ie. the next pos where the next sprite is no longer in use showing something else).
|
||||
// - plexShowNextYpos() Returns the Y-position of the next sprite to show.
|
||||
//
|
||||
// In practice a good method is to wait until the raster is beyond plexFreeNextYpos() and then call plexShowSprite(). Repeat until all 32 sprites have been shown.
|
||||
// TODO: Let the caller specify the number of sprites to use (or add PLEX_ENABLE[PLEX_COUNT])
|
||||
|
||||
import "c64"
|
||||
|
||||
// The number of sprites in the multiplexer
|
||||
const char PLEX_COUNT = 32;
|
||||
|
||||
// The x-positions of the multiplexer sprites (0x000-0x1ff)
|
||||
unsigned int PLEX_XPOS[PLEX_COUNT];
|
||||
|
||||
// The y-positions of the multiplexer sprites.
|
||||
char PLEX_YPOS[PLEX_COUNT];
|
||||
|
||||
// The sprite pointers for the multiplexed sprites
|
||||
char PLEX_PTR[PLEX_COUNT];
|
||||
|
||||
// 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_SORTED_IDX[PLEX_COUNT];
|
||||
|
||||
// Variables controlling the showing of sprites
|
||||
|
||||
// The index in the PLEX tables of the next sprite to show
|
||||
volatile char plex_show_idx=0;
|
||||
// The index the next sprite to use for showing (sprites are used round-robin)
|
||||
volatile char plex_sprite_idx=0;
|
||||
// The MSB bit of the next sprite to use for showing
|
||||
volatile char plex_sprite_msb=1;
|
||||
|
||||
// Initialize the multiplexer data structures
|
||||
void plexInit(char* screen) {
|
||||
plexSetScreen(screen);
|
||||
for(char i: 0..PLEX_COUNT-1) {
|
||||
PLEX_SORTED_IDX[i] = i;
|
||||
}
|
||||
}
|
||||
|
||||
// Set the address of the current screen used for setting sprite pointers (at screen+0x3f8)
|
||||
inline void plexSetScreen(char* screen) {
|
||||
PLEX_SCREEN_PTR = screen+0x3f8;
|
||||
}
|
||||
|
||||
// Ensure that the indices in PLEX_SORTED_IDX is sorted based on the y-positions in PLEX_YPOS
|
||||
// Assumes that the positions are nearly sorted already (as each sprite just moves a bit)
|
||||
// Uses an insertion sort:
|
||||
// 1. Moves a marker (m) from the start to end of the array. Every time the marker moves forward all elements before the marker are sorted correctly.
|
||||
// 2a. If the next element after the marker is larger that the current element
|
||||
// the marker can be moved forwards (as the sorting is correct).
|
||||
// 2b. If the next element after the marker is smaller than the current element:
|
||||
// elements before the marker are shifted right one at a time until encountering one smaller than the current one.
|
||||
// It is then inserted at the spot. Now the marker can move forward.
|
||||
void plexSort() {
|
||||
for(char m: 0..PLEX_COUNT-2) {
|
||||
char nxt_idx = PLEX_SORTED_IDX[m+1];
|
||||
char nxt_y = PLEX_YPOS[nxt_idx];
|
||||
if(nxt_y<PLEX_YPOS[PLEX_SORTED_IDX[m]]) {
|
||||
// Shift values until we encounter a value smaller than nxt_y
|
||||
char s = m;
|
||||
do {
|
||||
PLEX_SORTED_IDX[s+1] = PLEX_SORTED_IDX[s];
|
||||
s--;
|
||||
} while((s!=0xff) && (nxt_y<PLEX_YPOS[PLEX_SORTED_IDX[s]]));
|
||||
// store the mark at the found position
|
||||
s++;
|
||||
PLEX_SORTED_IDX[s] = nxt_idx;
|
||||
}
|
||||
}
|
||||
// Prepare for showing the sprites
|
||||
plex_show_idx = 0;
|
||||
plex_sprite_idx = 0;
|
||||
plex_sprite_msb = 1;
|
||||
plexFreePrepare();
|
||||
}
|
||||
|
||||
// Show the next sprite.
|
||||
// plexSort() prepares showing the sprites
|
||||
void plexShowSprite() {
|
||||
char plex_sprite_idx2 = plex_sprite_idx*2;
|
||||
char ypos = PLEX_YPOS[PLEX_SORTED_IDX[plex_show_idx]];
|
||||
SPRITES_YPOS[plex_sprite_idx2] = ypos;
|
||||
plexFreeAdd(ypos);
|
||||
PLEX_SCREEN_PTR[plex_sprite_idx] = PLEX_PTR[PLEX_SORTED_IDX[plex_show_idx]];
|
||||
char xpos_idx = PLEX_SORTED_IDX[plex_show_idx];
|
||||
SPRITES_XPOS[plex_sprite_idx2] = <PLEX_XPOS[xpos_idx];
|
||||
if(>PLEX_XPOS[xpos_idx]!=0) {
|
||||
*SPRITES_XMSB |= plex_sprite_msb;
|
||||
} else {
|
||||
*SPRITES_XMSB &= (0xff^plex_sprite_msb);
|
||||
}
|
||||
plex_sprite_idx = (plex_sprite_idx+1)&7;
|
||||
plex_show_idx++;
|
||||
plex_sprite_msb <<=1;
|
||||
if(plex_sprite_msb==0) {
|
||||
plex_sprite_msb = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Get the y-position of the next sprite to show
|
||||
inline char plexShowNextYpos() {
|
||||
return PLEX_YPOS[PLEX_SORTED_IDX[plex_show_idx]];
|
||||
}
|
||||
|
||||
// Contains the Y-position where each sprite is free again. PLEX_FREE_YPOS[s] holds the Y-position where sprite s is free to use again.
|
||||
char PLEX_FREE_YPOS[8];
|
||||
|
||||
// The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown.
|
||||
volatile char plex_free_next = 0;
|
||||
|
||||
// Prepare for a new frame. Initialize free to zero for all sprites.
|
||||
inline void plexFreePrepare() {
|
||||
for( char s: 0..7) {
|
||||
PLEX_FREE_YPOS[s] = 0;
|
||||
}
|
||||
plex_free_next = 0;
|
||||
}
|
||||
|
||||
// Get the Y-position where the next sprite to be shown is free to use.
|
||||
inline char plexFreeNextYpos() {
|
||||
return PLEX_FREE_YPOS[plex_free_next];
|
||||
}
|
||||
|
||||
// Update the data structure to reflect that a sprite has been shown. This sprite will be free again after 21 lines.
|
||||
inline void plexFreeAdd(char ypos) {
|
||||
PLEX_FREE_YPOS[plex_free_next] = ypos+21;
|
||||
plex_free_next = (plex_free_next+1)&7;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
// Put a 2x2 font into sprites and show it on screen
|
||||
import "c64"
|
||||
import "multiplexer-irq"
|
||||
import "multiplexer"
|
||||
|
||||
char * const CHARSET_DEFAULT = 0x1000;
|
||||
char * const FONT = 0x2000;
|
||||
|
@ -1,140 +0,0 @@
|
||||
// A flexible sprite multiplexer routine for 32 sprites.
|
||||
// Usage:
|
||||
// - Once:
|
||||
// - plexInit(screen): Initialize the data structures and set the screen address
|
||||
// Each frame:
|
||||
// - Set x-pos, y-pos and pointer in PLEX_XPOS[id], PLEX_YPOS[id], PLEX_PTR[id]
|
||||
// - plexSort() Sorts the sprites according to y-positions and prepares for showing them. This uses an insertion sort that is quite fast when the relative order of the sprites does not change very much.
|
||||
// - plexShowSprite() Shows the next sprite by copying values from PLEX_XXX[] to an actual sprite. Actual sprites are used round-robin. This should be called once for each of the 24 virtual sprites.
|
||||
// - plexFreeNextYpos() Returns the Y-position where the next sprite is available to be shown (ie. the next pos where the next sprite is no longer in use showing something else).
|
||||
// - plexShowNextYpos() Returns the Y-position of the next sprite to show.
|
||||
//
|
||||
// In practice a good method is to wait until the raster is beyond plexFreeNextYpos() and then call plexShowSprite(). Repeat until all 32 sprites have been shown.
|
||||
// TODO: Let the caller specify the number of sprites to use (or add PLEX_ENABLE[PLEX_COUNT])
|
||||
|
||||
import "c64"
|
||||
|
||||
// The number of sprites in the multiplexer
|
||||
const char PLEX_COUNT = 32;
|
||||
|
||||
// The x-positions of the multiplexer sprites (0x000-0x1ff)
|
||||
unsigned int PLEX_XPOS[PLEX_COUNT];
|
||||
|
||||
// The y-positions of the multiplexer sprites.
|
||||
char PLEX_YPOS[PLEX_COUNT];
|
||||
|
||||
// The sprite pointers for the multiplexed sprites
|
||||
char PLEX_PTR[PLEX_COUNT];
|
||||
|
||||
// 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_SORTED_IDX[PLEX_COUNT];
|
||||
|
||||
// Variables controlling the showing of sprites
|
||||
|
||||
// The index in the PLEX tables of the next sprite to show
|
||||
volatile char plex_show_idx=0;
|
||||
// The index the next sprite to use for showing (sprites are used round-robin)
|
||||
volatile char plex_sprite_idx=0;
|
||||
// The MSB bit of the next sprite to use for showing
|
||||
volatile char plex_sprite_msb=1;
|
||||
|
||||
// Initialize the multiplexer data structures
|
||||
void plexInit(char* screen) {
|
||||
plexSetScreen(screen);
|
||||
for(char i: 0..PLEX_COUNT-1) {
|
||||
PLEX_SORTED_IDX[i] = i;
|
||||
}
|
||||
}
|
||||
|
||||
// Set the address of the current screen used for setting sprite pointers (at screen+0x3f8)
|
||||
inline void plexSetScreen(char* screen) {
|
||||
PLEX_SCREEN_PTR = screen+0x3f8;
|
||||
}
|
||||
|
||||
// Ensure that the indices in PLEX_SORTED_IDX is sorted based on the y-positions in PLEX_YPOS
|
||||
// Assumes that the positions are nearly sorted already (as each sprite just moves a bit)
|
||||
// Uses an insertion sort:
|
||||
// 1. Moves a marker (m) from the start to end of the array. Every time the marker moves forward all elements before the marker are sorted correctly.
|
||||
// 2a. If the next element after the marker is larger that the current element
|
||||
// the marker can be moved forwards (as the sorting is correct).
|
||||
// 2b. If the next element after the marker is smaller than the current element:
|
||||
// elements before the marker are shifted right one at a time until encountering one smaller than the current one.
|
||||
// It is then inserted at the spot. Now the marker can move forward.
|
||||
void plexSort() {
|
||||
for(char m: 0..PLEX_COUNT-2) {
|
||||
char nxt_idx = PLEX_SORTED_IDX[m+1];
|
||||
char nxt_y = PLEX_YPOS[nxt_idx];
|
||||
if(nxt_y<PLEX_YPOS[PLEX_SORTED_IDX[m]]) {
|
||||
// Shift values until we encounter a value smaller than nxt_y
|
||||
char s = m;
|
||||
do {
|
||||
PLEX_SORTED_IDX[s+1] = PLEX_SORTED_IDX[s];
|
||||
s--;
|
||||
} while((s!=0xff) && (nxt_y<PLEX_YPOS[PLEX_SORTED_IDX[s]]));
|
||||
// store the mark at the found position
|
||||
s++;
|
||||
PLEX_SORTED_IDX[s] = nxt_idx;
|
||||
}
|
||||
}
|
||||
// Prepare for showing the sprites
|
||||
plex_show_idx = 0;
|
||||
plex_sprite_idx = 0;
|
||||
plex_sprite_msb = 1;
|
||||
plexFreePrepare();
|
||||
}
|
||||
|
||||
// Show the next sprite.
|
||||
// plexSort() prepares showing the sprites
|
||||
void plexShowSprite() {
|
||||
char plex_sprite_idx2 = plex_sprite_idx*2;
|
||||
char ypos = PLEX_YPOS[PLEX_SORTED_IDX[plex_show_idx]];
|
||||
SPRITES_YPOS[plex_sprite_idx2] = ypos;
|
||||
plexFreeAdd(ypos);
|
||||
PLEX_SCREEN_PTR[plex_sprite_idx] = PLEX_PTR[PLEX_SORTED_IDX[plex_show_idx]];
|
||||
char xpos_idx = PLEX_SORTED_IDX[plex_show_idx];
|
||||
SPRITES_XPOS[plex_sprite_idx2] = <PLEX_XPOS[xpos_idx];
|
||||
if(>PLEX_XPOS[xpos_idx]!=0) {
|
||||
*SPRITES_XMSB |= plex_sprite_msb;
|
||||
} else {
|
||||
*SPRITES_XMSB &= (0xff^plex_sprite_msb);
|
||||
}
|
||||
plex_sprite_idx = (plex_sprite_idx+1)&7;
|
||||
plex_show_idx++;
|
||||
plex_sprite_msb <<=1;
|
||||
if(plex_sprite_msb==0) {
|
||||
plex_sprite_msb = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Get the y-position of the next sprite to show
|
||||
inline char plexShowNextYpos() {
|
||||
return PLEX_YPOS[PLEX_SORTED_IDX[plex_show_idx]];
|
||||
}
|
||||
|
||||
// Contains the Y-position where each sprite is free again. PLEX_FREE_YPOS[s] holds the Y-position where sprite s is free to use again.
|
||||
char PLEX_FREE_YPOS[8];
|
||||
|
||||
// The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown.
|
||||
volatile char plex_free_next = 0;
|
||||
|
||||
// Prepare for a new frame. Initialize free to zero for all sprites.
|
||||
inline void plexFreePrepare() {
|
||||
for( char s: 0..7) {
|
||||
PLEX_FREE_YPOS[s] = 0;
|
||||
}
|
||||
plex_free_next = 0;
|
||||
}
|
||||
|
||||
// Get the Y-position where the next sprite to be shown is free to use.
|
||||
inline char plexFreeNextYpos() {
|
||||
return PLEX_FREE_YPOS[plex_free_next];
|
||||
}
|
||||
|
||||
// Update the data structure to reflect that a sprite has been shown. This sprite will be free again after 21 lines.
|
||||
inline void plexFreeAdd(char ypos) {
|
||||
PLEX_FREE_YPOS[plex_free_next] = ypos+21;
|
||||
plex_free_next = (plex_free_next+1)&7;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
// A simple usage of the flexible sprite multiplexer routine
|
||||
import "c64"
|
||||
import "multiplexer-irq"
|
||||
import "multiplexer"
|
||||
// Location of screen & sprites
|
||||
char* SCREEN = 0x0400;
|
||||
|
||||
@ -44,7 +44,7 @@ void init() {
|
||||
*IRQ_ENABLE = IRQ_RASTER;
|
||||
*IRQ_STATUS = IRQ_RASTER;
|
||||
*KERNEL_IRQ = &plex_irq;
|
||||
*VIC_CONTROL &=0x7f;
|
||||
*VIC_CONTROL &= 0x7f;
|
||||
*RASTER = 0x0;
|
||||
asm { cli }
|
||||
}
|
||||
@ -63,7 +63,7 @@ interrupt(kernel_min) void plex_irq() {
|
||||
if (plex_show_idx<PLEX_COUNT) {
|
||||
*RASTER = rasterY;
|
||||
} else {
|
||||
*RASTER = 0;
|
||||
*RASTER = 0x0;
|
||||
framedone = true;
|
||||
}
|
||||
*BORDERCOL = 0;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Same animation using a multiplexer
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(main)
|
||||
:BasicUpstart(__bbegin)
|
||||
.pc = $80d "Program"
|
||||
.label SPRITES_XPOS = $d000
|
||||
.label SPRITES_YPOS = $d001
|
||||
@ -28,17 +28,30 @@
|
||||
// The number of BOBs to render
|
||||
.const NUM_BOBS = $10
|
||||
.label COS = SIN+$40
|
||||
// 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 = SCREEN+$3f8
|
||||
// The MSB bit of the next sprite to use for showing
|
||||
.label plex_sprite_msb = 5
|
||||
// The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown.
|
||||
.label plex_free_next = 2
|
||||
// The index the next sprite to use for showing (sprites are used round-robin)
|
||||
.label plex_sprite_idx = 3
|
||||
.label plex_show_idx = $11
|
||||
.label plex_sprite_idx = $12
|
||||
.label plex_sprite_msb = $13
|
||||
.label plex_free_next = $14
|
||||
__bbegin:
|
||||
// plex_show_idx=0
|
||||
// The index in the PLEX tables of the next sprite to show
|
||||
// Prepare for showing the sprites
|
||||
.label plex_show_idx = 4
|
||||
lda #0
|
||||
sta.z plex_show_idx
|
||||
// plex_sprite_idx=0
|
||||
// The index the next sprite to use for showing (sprites are used round-robin)
|
||||
sta.z plex_sprite_idx
|
||||
// plex_sprite_msb=1
|
||||
// The MSB bit of the next sprite to use for showing
|
||||
lda #1
|
||||
sta.z plex_sprite_msb
|
||||
// plex_free_next = 0
|
||||
// The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown.
|
||||
lda #0
|
||||
sta.z plex_free_next
|
||||
jsr main
|
||||
rts
|
||||
main: {
|
||||
// asm
|
||||
sei
|
||||
@ -97,19 +110,19 @@ keyboard_matrix_read: {
|
||||
}
|
||||
// The main loop
|
||||
loop: {
|
||||
.label __1 = 7
|
||||
.label __2 = 7
|
||||
.label __5 = 7
|
||||
.label __6 = 7
|
||||
.label x = 7
|
||||
.label y = 7
|
||||
.label a = 3
|
||||
.label r = 2
|
||||
.label i = 4
|
||||
.label __1 = 5
|
||||
.label __2 = 5
|
||||
.label __5 = 5
|
||||
.label __6 = 5
|
||||
.label x = 5
|
||||
.label y = 5
|
||||
.label a = $e
|
||||
.label r = 7
|
||||
.label i = 2
|
||||
// Render Rotated BOBs
|
||||
.label angle = 6
|
||||
.label plexFreeNextYpos1_return = $12
|
||||
.label i1 = 9
|
||||
.label angle = 4
|
||||
.label plexFreeNextYpos1_return = $15
|
||||
.label i1 = 3
|
||||
lda #0
|
||||
sta.z angle
|
||||
__b2:
|
||||
@ -212,12 +225,6 @@ loop: {
|
||||
bne __b6
|
||||
lda #0
|
||||
sta.z i1
|
||||
lda #1
|
||||
sta.z plex_sprite_msb
|
||||
lda #0
|
||||
sta.z plex_show_idx
|
||||
sta.z plex_sprite_idx
|
||||
sta.z plex_free_next
|
||||
// Show the sprites
|
||||
__b7:
|
||||
// *BORDERCOL = BLACK
|
||||
@ -258,7 +265,7 @@ loop: {
|
||||
// Show the next sprite.
|
||||
// plexSort() prepares showing the sprites
|
||||
plexShowSprite: {
|
||||
.label plex_sprite_idx2 = $13
|
||||
.label plex_sprite_idx2 = $16
|
||||
// plex_sprite_idx2 = plex_sprite_idx*2
|
||||
lda.z plex_sprite_idx
|
||||
asl
|
||||
@ -277,13 +284,14 @@ plexShowSprite: {
|
||||
ldy.z plex_free_next
|
||||
sta PLEX_FREE_YPOS,y
|
||||
// plex_free_next+1
|
||||
ldx.z plex_free_next
|
||||
inx
|
||||
tya
|
||||
clc
|
||||
adc #1
|
||||
// (plex_free_next+1)&7
|
||||
and #7
|
||||
// plex_free_next = (plex_free_next+1)&7
|
||||
lda #7
|
||||
sax.z plex_free_next
|
||||
sta.z plex_free_next
|
||||
// PLEX_SCREEN_PTR[plex_sprite_idx] = PLEX_PTR[PLEX_SORTED_IDX[plex_show_idx]]
|
||||
ldx.z plex_show_idx
|
||||
ldy PLEX_SORTED_IDX,x
|
||||
lda PLEX_PTR,y
|
||||
ldx.z plex_sprite_idx
|
||||
@ -303,31 +311,33 @@ plexShowSprite: {
|
||||
// if(>PLEX_XPOS[xpos_idx]!=0)
|
||||
cmp #0
|
||||
bne __b1
|
||||
// $ff^plex_sprite_msb
|
||||
// 0xff^plex_sprite_msb
|
||||
lda #$ff
|
||||
eor.z plex_sprite_msb
|
||||
// *SPRITES_XMSB &= ($ff^plex_sprite_msb)
|
||||
// *SPRITES_XMSB &= (0xff^plex_sprite_msb)
|
||||
and SPRITES_XMSB
|
||||
sta SPRITES_XMSB
|
||||
__b2:
|
||||
// plex_sprite_idx+1
|
||||
ldx.z plex_sprite_idx
|
||||
inx
|
||||
// (plex_sprite_idx+1)&7
|
||||
txa
|
||||
and #7
|
||||
// plex_sprite_idx = (plex_sprite_idx+1)&7
|
||||
lda #7
|
||||
sax.z plex_sprite_idx
|
||||
sta.z plex_sprite_idx
|
||||
// plex_show_idx++;
|
||||
inc.z plex_show_idx
|
||||
// plex_sprite_msb *=2
|
||||
// plex_sprite_msb <<=1
|
||||
asl.z plex_sprite_msb
|
||||
// if(plex_sprite_msb==0)
|
||||
lda.z plex_sprite_msb
|
||||
cmp #0
|
||||
bne __b5
|
||||
bne __breturn
|
||||
// plex_sprite_msb = 1
|
||||
lda #1
|
||||
sta.z plex_sprite_msb
|
||||
rts
|
||||
__b5:
|
||||
__breturn:
|
||||
// }
|
||||
rts
|
||||
__b1:
|
||||
@ -347,9 +357,9 @@ plexShowSprite: {
|
||||
// elements before the marker are shifted right one at a time until encountering one smaller than the current one.
|
||||
// It is then inserted at the spot. Now the marker can move forward.
|
||||
plexSort: {
|
||||
.label nxt_idx = $13
|
||||
.label nxt_y = $14
|
||||
.label m = $12
|
||||
.label nxt_idx = $16
|
||||
.label nxt_y = $17
|
||||
.label m = $15
|
||||
lda #0
|
||||
sta.z m
|
||||
__b1:
|
||||
@ -372,7 +382,7 @@ plexSort: {
|
||||
sta PLEX_SORTED_IDX+1,x
|
||||
// s--;
|
||||
dex
|
||||
// while((s!=$ff) && (nxt_y<PLEX_YPOS[PLEX_SORTED_IDX[s]]))
|
||||
// while((s!=0xff) && (nxt_y<PLEX_YPOS[PLEX_SORTED_IDX[s]]))
|
||||
cpx #$ff
|
||||
beq __b4
|
||||
lda.z nxt_y
|
||||
@ -391,6 +401,15 @@ plexSort: {
|
||||
lda #PLEX_COUNT-2+1
|
||||
cmp.z m
|
||||
bne __b1
|
||||
// plex_show_idx = 0
|
||||
// Prepare for showing the sprites
|
||||
lda #0
|
||||
sta.z plex_show_idx
|
||||
// plex_sprite_idx = 0
|
||||
sta.z plex_sprite_idx
|
||||
// plex_sprite_msb = 1
|
||||
lda #1
|
||||
sta.z plex_sprite_msb
|
||||
ldx #0
|
||||
plexFreePrepare1___b1:
|
||||
// PLEX_FREE_YPOS[s] = 0
|
||||
@ -400,13 +419,15 @@ plexSort: {
|
||||
inx
|
||||
cpx #8
|
||||
bne plexFreePrepare1___b1
|
||||
// plex_free_next = 0
|
||||
sta.z plex_free_next
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// Fast multiply two signed bytes to a word result
|
||||
// mulf8s(signed byte register(A) a, signed byte register(X) b)
|
||||
mulf8s: {
|
||||
.label return = 7
|
||||
.label return = 5
|
||||
// mulf8u_prepare((byte)a)
|
||||
jsr mulf8u_prepare
|
||||
// mulf8s_prepared(b)
|
||||
@ -417,11 +438,11 @@ mulf8s: {
|
||||
}
|
||||
// Calculate fast multiply with a prepared unsigned byte to a word result
|
||||
// The prepared number is set by calling mulf8s_prepare(byte a)
|
||||
// mulf8s_prepared(signed byte zp($14) b)
|
||||
// mulf8s_prepared(signed byte zp($17) b)
|
||||
mulf8s_prepared: {
|
||||
.label memA = $fd
|
||||
.label m = 7
|
||||
.label b = $14
|
||||
.label m = 5
|
||||
.label b = $17
|
||||
// mulf8u_prepared((byte) b)
|
||||
lda.z b
|
||||
jsr mulf8u_prepared
|
||||
@ -457,7 +478,7 @@ mulf8s_prepared: {
|
||||
mulf8u_prepared: {
|
||||
.label resL = $fe
|
||||
.label memB = $ff
|
||||
.label return = 7
|
||||
.label return = 5
|
||||
// *memB = b
|
||||
sta memB
|
||||
// asm
|
||||
@ -498,7 +519,7 @@ mulf8u_prepare: {
|
||||
}
|
||||
// Initialize the program
|
||||
init: {
|
||||
.label i = 6
|
||||
.label i = 4
|
||||
// *D011 = VIC_DEN | VIC_RSEL | 3
|
||||
lda #VIC_DEN|VIC_RSEL|3
|
||||
sta D011
|
||||
@ -571,7 +592,7 @@ memset: {
|
||||
.const c = ' '
|
||||
.const num = $3e8
|
||||
.label end = str+num
|
||||
.label dst = 7
|
||||
.label dst = 5
|
||||
lda #<str
|
||||
sta.z dst
|
||||
lda #>str
|
||||
@ -601,17 +622,17 @@ memset: {
|
||||
// Initialize the mulf_sqr multiplication tables with f(x)=int(x*x/4)
|
||||
mulf_init: {
|
||||
// x/2
|
||||
.label c = 9
|
||||
.label c = 7
|
||||
// Counter used for determining x%2==0
|
||||
.label sqr1_hi = $a
|
||||
.label sqr1_hi = 8
|
||||
// Fill mulf_sqr1 = f(x) = int(x*x/4): If f(x) = x*x/4 then f(x+1) = f(x) + x/2 + 1/4
|
||||
.label sqr = $10
|
||||
.label sqr1_lo = 7
|
||||
.label sqr = $f
|
||||
.label sqr1_lo = 5
|
||||
// Decrease or increase x_255 - initially we decrease
|
||||
.label sqr2_hi = $e
|
||||
.label sqr2_lo = $c
|
||||
.label sqr2_hi = $c
|
||||
.label sqr2_lo = $a
|
||||
//Start with g(0)=f(255)
|
||||
.label dir = $12
|
||||
.label dir = $e
|
||||
ldx #0
|
||||
lda #<mulf_sqr1_hi+1
|
||||
sta.z sqr1_hi
|
||||
@ -751,7 +772,7 @@ plexInit: {
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// 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
|
||||
|
@ -2,452 +2,465 @@
|
||||
[0] phi()
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] phi()
|
||||
[2] call main
|
||||
[1] (volatile byte) plex_show_idx ← (byte) 0
|
||||
[2] (volatile byte) plex_sprite_idx ← (byte) 0
|
||||
[3] (volatile byte) plex_sprite_msb ← (byte) 1
|
||||
to:@2
|
||||
@2: scope:[] from @1
|
||||
[4] (volatile byte) plex_free_next ← (byte) 0
|
||||
to:@3
|
||||
@3: scope:[] from @2
|
||||
[5] phi()
|
||||
[6] call main
|
||||
to:@end
|
||||
@end: scope:[] from @1
|
||||
[3] phi()
|
||||
@end: scope:[] from @3
|
||||
[7] phi()
|
||||
|
||||
(void()) main()
|
||||
main: scope:[main] from @1
|
||||
main: scope:[main] from @3
|
||||
asm { sei }
|
||||
[5] call init
|
||||
[9] call init
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main
|
||||
[6] phi()
|
||||
[7] call loop
|
||||
[10] phi()
|
||||
[11] call loop
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1
|
||||
[8] phi()
|
||||
[9] call exit
|
||||
[12] phi()
|
||||
[13] call exit
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@2
|
||||
asm { cli }
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@3
|
||||
[11] return
|
||||
[15] return
|
||||
to:@return
|
||||
|
||||
(void()) exit()
|
||||
exit: scope:[exit] from main::@2
|
||||
[12] phi()
|
||||
[16] phi()
|
||||
to:exit::@1
|
||||
exit::@1: scope:[exit] from exit exit::@2
|
||||
[13] phi()
|
||||
[14] call keyboard_key_pressed
|
||||
[15] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0
|
||||
[17] phi()
|
||||
[18] call keyboard_key_pressed
|
||||
[19] (byte) keyboard_key_pressed::return#2 ← (byte) keyboard_key_pressed::return#0
|
||||
to:exit::@2
|
||||
exit::@2: scope:[exit] from exit::@1
|
||||
[16] (byte~) exit::$0 ← (byte) keyboard_key_pressed::return#2
|
||||
[17] if((byte) 0!=(byte~) exit::$0) goto exit::@1
|
||||
[20] (byte~) exit::$0 ← (byte) keyboard_key_pressed::return#2
|
||||
[21] if((byte) 0!=(byte~) exit::$0) goto exit::@1
|
||||
to:exit::@return
|
||||
exit::@return: scope:[exit] from exit::@2
|
||||
[18] return
|
||||
[22] return
|
||||
to:@return
|
||||
|
||||
(byte()) keyboard_key_pressed((byte) keyboard_key_pressed::key)
|
||||
keyboard_key_pressed: scope:[keyboard_key_pressed] from exit::@1 loop::@10
|
||||
[19] phi()
|
||||
[20] call keyboard_matrix_read
|
||||
[21] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0
|
||||
[23] phi()
|
||||
[24] call keyboard_matrix_read
|
||||
[25] (byte) keyboard_matrix_read::return#2 ← (byte) keyboard_matrix_read::return#0
|
||||
to:keyboard_key_pressed::@1
|
||||
keyboard_key_pressed::@1: scope:[keyboard_key_pressed] from keyboard_key_pressed
|
||||
[22] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2
|
||||
[23] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte*) keyboard_matrix_col_bitmask+(const byte) keyboard_key_pressed::colidx#0)
|
||||
[26] (byte~) keyboard_key_pressed::$2 ← (byte) keyboard_matrix_read::return#2
|
||||
[27] (byte) keyboard_key_pressed::return#0 ← (byte~) keyboard_key_pressed::$2 & *((const byte*) keyboard_matrix_col_bitmask+(const byte) keyboard_key_pressed::colidx#0)
|
||||
to:keyboard_key_pressed::@return
|
||||
keyboard_key_pressed::@return: scope:[keyboard_key_pressed] from keyboard_key_pressed::@1
|
||||
[24] return
|
||||
[28] return
|
||||
to:@return
|
||||
|
||||
(byte()) keyboard_matrix_read((byte) keyboard_matrix_read::rowid)
|
||||
keyboard_matrix_read: scope:[keyboard_matrix_read] from keyboard_key_pressed
|
||||
[25] *((const nomodify byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0)
|
||||
[26] (byte) keyboard_matrix_read::return#0 ← ~ *((const nomodify byte*) CIA1_PORT_B)
|
||||
[29] *((const nomodify byte*) CIA1_PORT_A) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0)
|
||||
[30] (byte) keyboard_matrix_read::return#0 ← ~ *((const nomodify byte*) CIA1_PORT_B)
|
||||
to:keyboard_matrix_read::@return
|
||||
keyboard_matrix_read::@return: scope:[keyboard_matrix_read] from keyboard_matrix_read
|
||||
[27] return
|
||||
[31] return
|
||||
to:@return
|
||||
|
||||
(void()) loop()
|
||||
loop: scope:[loop] from main::@1
|
||||
[28] phi()
|
||||
[32] phi()
|
||||
to:loop::@1
|
||||
loop::@1: scope:[loop] from loop loop::@15
|
||||
[29] (byte) loop::angle#6 ← phi( loop/(byte) 0 loop::@15/(byte) loop::angle#1 )
|
||||
[33] (byte) loop::angle#6 ← phi( loop/(byte) 0 loop::@15/(byte) loop::angle#1 )
|
||||
to:loop::@2
|
||||
loop::@2: scope:[loop] from loop::@1 loop::@2
|
||||
[30] if(*((const nomodify byte*) RASTER)<(byte) $d8) goto loop::@2
|
||||
[34] if(*((const nomodify byte*) RASTER)<(byte) $d8) goto loop::@2
|
||||
to:loop::@3
|
||||
loop::@3: scope:[loop] from loop::@2
|
||||
[31] *((const nomodify byte*) BORDERCOL) ← (byte) $f
|
||||
[32] (byte) loop::a#6 ← (byte) loop::angle#6
|
||||
[35] *((const nomodify byte*) BORDERCOL) ← (byte) $f
|
||||
[36] (byte) loop::a#6 ← (byte) loop::angle#6
|
||||
to:loop::@4
|
||||
loop::@4: scope:[loop] from loop::@12 loop::@3
|
||||
[33] (byte) loop::i#2 ← phi( loop::@12/(byte) loop::i#1 loop::@3/(byte) 0 )
|
||||
[33] (byte) loop::a#2 ← phi( loop::@12/(byte) loop::a#1 loop::@3/(byte) loop::a#6 )
|
||||
[33] (signed byte) loop::r#2 ← phi( loop::@12/(signed byte) loop::r#1 loop::@3/(signed byte) $1e )
|
||||
[34] *((const nomodify byte*) BORDERCOL) ← (byte) 6
|
||||
[35] (signed byte) mulf8s::a#0 ← (signed byte) loop::r#2
|
||||
[36] (signed byte) mulf8s::b#0 ← *((const signed byte*) COS + (byte) loop::a#2)
|
||||
[37] call mulf8s
|
||||
[38] (signed word) mulf8s::return#2 ← (signed word) mulf8s::return#0
|
||||
[37] (byte) loop::i#2 ← phi( loop::@12/(byte) loop::i#1 loop::@3/(byte) 0 )
|
||||
[37] (byte) loop::a#2 ← phi( loop::@12/(byte) loop::a#1 loop::@3/(byte) loop::a#6 )
|
||||
[37] (signed byte) loop::r#2 ← phi( loop::@12/(signed byte) loop::r#1 loop::@3/(signed byte) $1e )
|
||||
[38] *((const nomodify byte*) BORDERCOL) ← (byte) 6
|
||||
[39] (signed byte) mulf8s::a#0 ← (signed byte) loop::r#2
|
||||
[40] (signed byte) mulf8s::b#0 ← *((const signed byte*) COS + (byte) loop::a#2)
|
||||
[41] call mulf8s
|
||||
[42] (signed word) mulf8s::return#2 ← (signed word) mulf8s::return#0
|
||||
to:loop::@11
|
||||
loop::@11: scope:[loop] from loop::@4
|
||||
[39] (signed word~) loop::$1 ← (signed word) mulf8s::return#2
|
||||
[40] (signed word~) loop::$2 ← (signed word~) loop::$1 << (byte) 1
|
||||
[41] (signed word) loop::x#0 ← (signed word~) loop::$2 + (signed word)(number) $7d*(number) $100
|
||||
[42] (byte~) loop::$4 ← > (signed word) loop::x#0
|
||||
[43] (byte~) loop::$20 ← (byte) loop::i#2 << (byte) 1
|
||||
[44] *((const word*) PLEX_XPOS + (byte~) loop::$20) ← (byte~) loop::$4
|
||||
[45] (signed byte) mulf8s::a#1 ← (signed byte) loop::r#2
|
||||
[46] (signed byte) mulf8s::b#1 ← *((const signed byte*) SIN + (byte) loop::a#2)
|
||||
[47] call mulf8s
|
||||
[48] (signed word) mulf8s::return#3 ← (signed word) mulf8s::return#0
|
||||
[43] (signed word~) loop::$1 ← (signed word) mulf8s::return#2
|
||||
[44] (signed word~) loop::$2 ← (signed word~) loop::$1 << (byte) 1
|
||||
[45] (signed word) loop::x#0 ← (signed word~) loop::$2 + (signed word)(number) $7d*(number) $100
|
||||
[46] (byte~) loop::$4 ← > (signed word) loop::x#0
|
||||
[47] (byte~) loop::$20 ← (byte) loop::i#2 << (byte) 1
|
||||
[48] *((const word*) PLEX_XPOS + (byte~) loop::$20) ← (byte~) loop::$4
|
||||
[49] (signed byte) mulf8s::a#1 ← (signed byte) loop::r#2
|
||||
[50] (signed byte) mulf8s::b#1 ← *((const signed byte*) SIN + (byte) loop::a#2)
|
||||
[51] call mulf8s
|
||||
[52] (signed word) mulf8s::return#3 ← (signed word) mulf8s::return#0
|
||||
to:loop::@12
|
||||
loop::@12: scope:[loop] from loop::@11
|
||||
[49] (signed word~) loop::$5 ← (signed word) mulf8s::return#3
|
||||
[50] (signed word~) loop::$6 ← (signed word~) loop::$5 << (byte) 1
|
||||
[51] (signed word) loop::y#0 ← (signed word~) loop::$6 + (signed word)(number) $7d*(number) $100
|
||||
[52] (byte~) loop::$8 ← > (signed word) loop::y#0
|
||||
[53] *((const byte*) PLEX_YPOS + (byte) loop::i#2) ← (byte~) loop::$8
|
||||
[54] (byte) loop::a#1 ← (byte) loop::a#2 + (byte) $62
|
||||
[55] (signed byte) loop::r#1 ← (signed byte) loop::r#2 + (signed byte) 3
|
||||
[56] (byte) loop::i#1 ← ++ (byte) loop::i#2
|
||||
[57] if((byte) loop::i#1!=(const nomodify byte) NUM_BOBS-(byte) 1+(byte) 1) goto loop::@4
|
||||
[53] (signed word~) loop::$5 ← (signed word) mulf8s::return#3
|
||||
[54] (signed word~) loop::$6 ← (signed word~) loop::$5 << (byte) 1
|
||||
[55] (signed word) loop::y#0 ← (signed word~) loop::$6 + (signed word)(number) $7d*(number) $100
|
||||
[56] (byte~) loop::$8 ← > (signed word) loop::y#0
|
||||
[57] *((const byte*) PLEX_YPOS + (byte) loop::i#2) ← (byte~) loop::$8
|
||||
[58] (byte) loop::a#1 ← (byte) loop::a#2 + (byte) $62
|
||||
[59] (signed byte) loop::r#1 ← (signed byte) loop::r#2 + (signed byte) 3
|
||||
[60] (byte) loop::i#1 ← ++ (byte) loop::i#2
|
||||
[61] if((byte) loop::i#1!=(const nomodify byte) NUM_BOBS-(byte) 1+(byte) 1) goto loop::@4
|
||||
to:loop::@5
|
||||
loop::@5: scope:[loop] from loop::@12
|
||||
[58] *((const nomodify byte*) BORDERCOL) ← (byte) 3
|
||||
[59] call plexSort
|
||||
[62] *((const nomodify byte*) BORDERCOL) ← (byte) 3
|
||||
[63] call plexSort
|
||||
to:loop::@13
|
||||
loop::@13: scope:[loop] from loop::@5
|
||||
[60] (byte) loop::angle#1 ← (byte) loop::angle#6 + (byte) 3
|
||||
[61] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK
|
||||
[64] (byte) loop::angle#1 ← (byte) loop::angle#6 + (byte) 3
|
||||
[65] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK
|
||||
to:loop::@6
|
||||
loop::@6: scope:[loop] from loop::@13 loop::@6
|
||||
[62] (byte~) loop::$11 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8
|
||||
[63] if((byte~) loop::$11!=(byte) 0) goto loop::@6
|
||||
[66] (byte~) loop::$11 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8
|
||||
[67] if((byte~) loop::$11!=(byte) 0) goto loop::@6
|
||||
to:loop::@7
|
||||
loop::@7: scope:[loop] from loop::@14 loop::@6
|
||||
[64] (byte) loop::i1#5 ← phi( loop::@6/(byte) 0 loop::@14/(byte) loop::i1#1 )
|
||||
[64] (byte) plex_sprite_msb#43 ← phi( loop::@6/(byte) 1 loop::@14/(byte) plex_sprite_msb#16 )
|
||||
[64] (byte) plex_show_idx#43 ← phi( loop::@6/(byte) 0 loop::@14/(byte) plex_show_idx#15 )
|
||||
[64] (byte) plex_sprite_idx#43 ← phi( loop::@6/(byte) 0 loop::@14/(byte) plex_sprite_idx#15 )
|
||||
[64] (byte) plex_free_next#17 ← phi( loop::@6/(byte) 0 loop::@14/(byte) plex_free_next#13 )
|
||||
[65] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK
|
||||
[68] (byte) loop::i1#5 ← phi( loop::@6/(byte) 0 loop::@14/(byte) loop::i1#1 )
|
||||
[69] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK
|
||||
to:loop::plexFreeNextYpos1
|
||||
loop::plexFreeNextYpos1: scope:[loop] from loop::@7
|
||||
[66] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#17)
|
||||
[70] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next)
|
||||
to:loop::@8
|
||||
loop::@8: scope:[loop] from loop::@8 loop::plexFreeNextYpos1
|
||||
[67] if(*((const nomodify byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@8
|
||||
[71] if(*((const nomodify byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@8
|
||||
to:loop::@9
|
||||
loop::@9: scope:[loop] from loop::@8
|
||||
[68] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL)
|
||||
[69] call plexShowSprite
|
||||
[72] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL)
|
||||
[73] call plexShowSprite
|
||||
to:loop::@14
|
||||
loop::@14: scope:[loop] from loop::@9
|
||||
[70] (byte) loop::i1#1 ← ++ (byte) loop::i1#5
|
||||
[71] if((byte) loop::i1#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7
|
||||
[74] (byte) loop::i1#1 ← ++ (byte) loop::i1#5
|
||||
[75] if((byte) loop::i1#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7
|
||||
to:loop::@10
|
||||
loop::@10: scope:[loop] from loop::@14
|
||||
[72] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK
|
||||
[73] call keyboard_key_pressed
|
||||
[74] (byte) keyboard_key_pressed::return#3 ← (byte) keyboard_key_pressed::return#0
|
||||
[76] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK
|
||||
[77] call keyboard_key_pressed
|
||||
[78] (byte) keyboard_key_pressed::return#3 ← (byte) keyboard_key_pressed::return#0
|
||||
to:loop::@15
|
||||
loop::@15: scope:[loop] from loop::@10
|
||||
[75] (byte~) loop::$18 ← (byte) keyboard_key_pressed::return#3
|
||||
[76] if((byte) 0!=(byte~) loop::$18) goto loop::@return
|
||||
[79] (byte~) loop::$18 ← (byte) keyboard_key_pressed::return#3
|
||||
[80] if((byte) 0!=(byte~) loop::$18) goto loop::@return
|
||||
to:loop::@1
|
||||
loop::@return: scope:[loop] from loop::@15
|
||||
[77] return
|
||||
[81] return
|
||||
to:@return
|
||||
|
||||
(void()) plexShowSprite()
|
||||
plexShowSprite: scope:[plexShowSprite] from loop::@9
|
||||
[78] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#43 << (byte) 1
|
||||
[79] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#43))
|
||||
[80] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0
|
||||
[82] (byte) plexShowSprite::plex_sprite_idx2#0 ← (volatile byte) plex_sprite_idx << (byte) 1
|
||||
[83] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx))
|
||||
[84] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0
|
||||
to:plexShowSprite::plexFreeAdd1
|
||||
plexShowSprite::plexFreeAdd1: scope:[plexShowSprite] from plexShowSprite
|
||||
[81] (byte~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + (byte) $15
|
||||
[82] *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#17) ← (byte~) plexShowSprite::plexFreeAdd1_$0
|
||||
[83] (byte~) plexShowSprite::plexFreeAdd1_$1 ← (byte) plex_free_next#17 + (byte) 1
|
||||
[84] (byte) plex_free_next#13 ← (byte~) plexShowSprite::plexFreeAdd1_$1 & (byte) 7
|
||||
to:plexShowSprite::@4
|
||||
plexShowSprite::@4: scope:[plexShowSprite] from plexShowSprite::plexFreeAdd1
|
||||
[85] *((const byte*) PLEX_SCREEN_PTR#1 + (byte) plex_sprite_idx#43) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#43))
|
||||
[86] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#43)
|
||||
[87] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1
|
||||
[88] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11)
|
||||
[89] *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$2
|
||||
[90] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11)
|
||||
[91] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1
|
||||
[85] (byte~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + (byte) $15
|
||||
[86] *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) ← (byte~) plexShowSprite::plexFreeAdd1_$0
|
||||
[87] (byte~) plexShowSprite::plexFreeAdd1_$1 ← (volatile byte) plex_free_next + (byte) 1
|
||||
[88] (byte~) plexShowSprite::plexFreeAdd1_$2 ← (byte~) plexShowSprite::plexFreeAdd1_$1 & (byte) 7
|
||||
[89] (volatile byte) plex_free_next ← (byte~) plexShowSprite::plexFreeAdd1_$2
|
||||
to:plexShowSprite::@5
|
||||
plexShowSprite::@5: scope:[plexShowSprite] from plexShowSprite::plexFreeAdd1
|
||||
[90] *((const byte*) PLEX_SCREEN_PTR#1 + (volatile byte) plex_sprite_idx) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx))
|
||||
[91] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)
|
||||
[92] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1
|
||||
[93] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11)
|
||||
[94] *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$2
|
||||
[95] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11)
|
||||
[96] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1
|
||||
to:plexShowSprite::@3
|
||||
plexShowSprite::@3: scope:[plexShowSprite] from plexShowSprite::@4
|
||||
[92] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (byte) plex_sprite_msb#43
|
||||
[93] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9
|
||||
plexShowSprite::@3: scope:[plexShowSprite] from plexShowSprite::@5
|
||||
[97] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (volatile byte) plex_sprite_msb
|
||||
[98] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9
|
||||
to:plexShowSprite::@2
|
||||
plexShowSprite::@2: scope:[plexShowSprite] from plexShowSprite::@1 plexShowSprite::@3
|
||||
[94] (byte~) plexShowSprite::$5 ← (byte) plex_sprite_idx#43 + (byte) 1
|
||||
[95] (byte) plex_sprite_idx#15 ← (byte~) plexShowSprite::$5 & (byte) 7
|
||||
[96] (byte) plex_show_idx#15 ← ++ (byte) plex_show_idx#43
|
||||
[97] (byte) plex_sprite_msb#3 ← (byte) plex_sprite_msb#43 << (byte) 1
|
||||
[98] if((byte) plex_sprite_msb#3!=(byte) 0) goto plexShowSprite::@5
|
||||
[99] (byte~) plexShowSprite::$5 ← (volatile byte) plex_sprite_idx + (byte) 1
|
||||
[100] (byte~) plexShowSprite::$6 ← (byte~) plexShowSprite::$5 & (byte) 7
|
||||
[101] (volatile byte) plex_sprite_idx ← (byte~) plexShowSprite::$6
|
||||
[102] (volatile byte) plex_show_idx ← ++ (volatile byte) plex_show_idx
|
||||
[103] (volatile byte) plex_sprite_msb ← (volatile byte) plex_sprite_msb << (byte) 1
|
||||
[104] if((volatile byte) plex_sprite_msb!=(byte) 0) goto plexShowSprite::@return
|
||||
to:plexShowSprite::@4
|
||||
plexShowSprite::@4: scope:[plexShowSprite] from plexShowSprite::@2
|
||||
[105] (volatile byte) plex_sprite_msb ← (byte) 1
|
||||
to:plexShowSprite::@return
|
||||
plexShowSprite::@5: scope:[plexShowSprite] from plexShowSprite::@2
|
||||
[99] phi()
|
||||
to:plexShowSprite::@return
|
||||
plexShowSprite::@return: scope:[plexShowSprite] from plexShowSprite::@2 plexShowSprite::@5
|
||||
[100] (byte) plex_sprite_msb#16 ← phi( plexShowSprite::@5/(byte) plex_sprite_msb#3 plexShowSprite::@2/(byte) 1 )
|
||||
[101] return
|
||||
plexShowSprite::@return: scope:[plexShowSprite] from plexShowSprite::@2 plexShowSprite::@4
|
||||
[106] return
|
||||
to:@return
|
||||
plexShowSprite::@1: scope:[plexShowSprite] from plexShowSprite::@4
|
||||
[102] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (byte) plex_sprite_msb#43
|
||||
plexShowSprite::@1: scope:[plexShowSprite] from plexShowSprite::@5
|
||||
[107] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (volatile byte) plex_sprite_msb
|
||||
to:plexShowSprite::@2
|
||||
|
||||
(void()) plexSort()
|
||||
plexSort: scope:[plexSort] from loop::@5
|
||||
[103] phi()
|
||||
[108] phi()
|
||||
to:plexSort::@1
|
||||
plexSort::@1: scope:[plexSort] from plexSort plexSort::@2
|
||||
[104] (byte) plexSort::m#2 ← phi( plexSort/(byte) 0 plexSort::@2/(byte) plexSort::m#1 )
|
||||
[105] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2)
|
||||
[106] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0)
|
||||
[107] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2
|
||||
[109] (byte) plexSort::m#2 ← phi( plexSort/(byte) 0 plexSort::@2/(byte) plexSort::m#1 )
|
||||
[110] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2)
|
||||
[111] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0)
|
||||
[112] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2
|
||||
to:plexSort::@5
|
||||
plexSort::@5: scope:[plexSort] from plexSort::@1
|
||||
[108] (byte) plexSort::s#6 ← (byte) plexSort::m#2
|
||||
[113] (byte) plexSort::s#6 ← (byte) plexSort::m#2
|
||||
to:plexSort::@3
|
||||
plexSort::@3: scope:[plexSort] from plexSort::@5 plexSort::@6
|
||||
[109] (byte) plexSort::s#3 ← phi( plexSort::@6/(byte) plexSort::s#1 plexSort::@5/(byte) plexSort::s#6 )
|
||||
[110] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3)
|
||||
[111] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3
|
||||
[112] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4
|
||||
to:plexSort::@6
|
||||
plexSort::@6: scope:[plexSort] from plexSort::@3
|
||||
[113] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3
|
||||
plexSort::@3: scope:[plexSort] from plexSort::@5 plexSort::@7
|
||||
[114] (byte) plexSort::s#3 ← phi( plexSort::@7/(byte) plexSort::s#1 plexSort::@5/(byte) plexSort::s#6 )
|
||||
[115] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3)
|
||||
[116] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3
|
||||
[117] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4
|
||||
to:plexSort::@7
|
||||
plexSort::@7: scope:[plexSort] from plexSort::@3
|
||||
[118] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3
|
||||
to:plexSort::@4
|
||||
plexSort::@4: scope:[plexSort] from plexSort::@3 plexSort::@6
|
||||
[114] (byte) plexSort::s#2 ← ++ (byte) plexSort::s#1
|
||||
[115] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0
|
||||
plexSort::@4: scope:[plexSort] from plexSort::@3 plexSort::@7
|
||||
[119] (byte) plexSort::s#2 ← ++ (byte) plexSort::s#1
|
||||
[120] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0
|
||||
to:plexSort::@2
|
||||
plexSort::@2: scope:[plexSort] from plexSort::@1 plexSort::@4
|
||||
[116] (byte) plexSort::m#1 ← ++ (byte) plexSort::m#2
|
||||
[117] if((byte) plexSort::m#1!=(const nomodify byte) PLEX_COUNT-(byte) 2+(byte) 1) goto plexSort::@1
|
||||
[121] (byte) plexSort::m#1 ← ++ (byte) plexSort::m#2
|
||||
[122] if((byte) plexSort::m#1!=(const nomodify byte) PLEX_COUNT-(byte) 2+(byte) 1) goto plexSort::@1
|
||||
to:plexSort::@6
|
||||
plexSort::@6: scope:[plexSort] from plexSort::@2
|
||||
[123] (volatile byte) plex_show_idx ← (byte) 0
|
||||
[124] (volatile byte) plex_sprite_idx ← (byte) 0
|
||||
[125] (volatile byte) plex_sprite_msb ← (byte) 1
|
||||
to:plexSort::plexFreePrepare1
|
||||
plexSort::plexFreePrepare1: scope:[plexSort] from plexSort::@2
|
||||
[118] phi()
|
||||
plexSort::plexFreePrepare1: scope:[plexSort] from plexSort::@6
|
||||
[126] phi()
|
||||
to:plexSort::plexFreePrepare1_@1
|
||||
plexSort::plexFreePrepare1_@1: scope:[plexSort] from plexSort::plexFreePrepare1 plexSort::plexFreePrepare1_@1
|
||||
[119] (byte) plexSort::plexFreePrepare1_s#2 ← phi( plexSort::plexFreePrepare1/(byte) 0 plexSort::plexFreePrepare1_@1/(byte) plexSort::plexFreePrepare1_s#1 )
|
||||
[120] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0
|
||||
[121] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2
|
||||
[122] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1
|
||||
[127] (byte) plexSort::plexFreePrepare1_s#2 ← phi( plexSort::plexFreePrepare1/(byte) 0 plexSort::plexFreePrepare1_@1/(byte) plexSort::plexFreePrepare1_s#1 )
|
||||
[128] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0
|
||||
[129] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2
|
||||
[130] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1
|
||||
to:plexSort::plexFreePrepare1_@2
|
||||
plexSort::plexFreePrepare1_@2: scope:[plexSort] from plexSort::plexFreePrepare1_@1
|
||||
[131] (volatile byte) plex_free_next ← (byte) 0
|
||||
to:plexSort::@return
|
||||
plexSort::@return: scope:[plexSort] from plexSort::plexFreePrepare1_@1
|
||||
[123] return
|
||||
plexSort::@return: scope:[plexSort] from plexSort::plexFreePrepare1_@2
|
||||
[132] return
|
||||
to:@return
|
||||
|
||||
(signed word()) mulf8s((signed byte) mulf8s::a , (signed byte) mulf8s::b)
|
||||
mulf8s: scope:[mulf8s] from loop::@11 loop::@4
|
||||
[124] (signed byte) mulf8s::b#2 ← phi( loop::@11/(signed byte) mulf8s::b#1 loop::@4/(signed byte) mulf8s::b#0 )
|
||||
[124] (signed byte) mulf8s::mulf8s_prepare1_a#0 ← phi( loop::@11/(signed byte) mulf8s::a#1 loop::@4/(signed byte) mulf8s::a#0 )
|
||||
[133] (signed byte) mulf8s::b#2 ← phi( loop::@11/(signed byte) mulf8s::b#1 loop::@4/(signed byte) mulf8s::b#0 )
|
||||
[133] (signed byte) mulf8s::mulf8s_prepare1_a#0 ← phi( loop::@11/(signed byte) mulf8s::a#1 loop::@4/(signed byte) mulf8s::a#0 )
|
||||
to:mulf8s::mulf8s_prepare1
|
||||
mulf8s::mulf8s_prepare1: scope:[mulf8s] from mulf8s
|
||||
[125] (byte) mulf8u_prepare::a#0 ← (byte)(signed byte) mulf8s::mulf8s_prepare1_a#0
|
||||
[126] call mulf8u_prepare
|
||||
[134] (byte) mulf8u_prepare::a#0 ← (byte)(signed byte) mulf8s::mulf8s_prepare1_a#0
|
||||
[135] call mulf8u_prepare
|
||||
to:mulf8s::@1
|
||||
mulf8s::@1: scope:[mulf8s] from mulf8s::mulf8s_prepare1
|
||||
[127] (signed byte) mulf8s_prepared::b#0 ← (signed byte) mulf8s::b#2
|
||||
[128] call mulf8s_prepared
|
||||
[136] (signed byte) mulf8s_prepared::b#0 ← (signed byte) mulf8s::b#2
|
||||
[137] call mulf8s_prepared
|
||||
to:mulf8s::@2
|
||||
mulf8s::@2: scope:[mulf8s] from mulf8s::@1
|
||||
[129] (signed word) mulf8s::return#0 ← (signed word)(word) mulf8s_prepared::m#4
|
||||
[138] (signed word) mulf8s::return#0 ← (signed word)(word) mulf8s_prepared::m#4
|
||||
to:mulf8s::@return
|
||||
mulf8s::@return: scope:[mulf8s] from mulf8s::@2
|
||||
[130] return
|
||||
[139] return
|
||||
to:@return
|
||||
|
||||
(signed word()) mulf8s_prepared((signed byte) mulf8s_prepared::b)
|
||||
mulf8s_prepared: scope:[mulf8s_prepared] from mulf8s::@1
|
||||
[131] (byte) mulf8u_prepared::b#0 ← (byte)(signed byte) mulf8s_prepared::b#0
|
||||
[132] call mulf8u_prepared
|
||||
[133] (word) mulf8u_prepared::return#2 ← (word) mulf8u_prepared::return#0
|
||||
[140] (byte) mulf8u_prepared::b#0 ← (byte)(signed byte) mulf8s_prepared::b#0
|
||||
[141] call mulf8u_prepared
|
||||
[142] (word) mulf8u_prepared::return#2 ← (word) mulf8u_prepared::return#0
|
||||
to:mulf8s_prepared::@5
|
||||
mulf8s_prepared::@5: scope:[mulf8s_prepared] from mulf8s_prepared
|
||||
[134] (word) mulf8s_prepared::m#0 ← (word) mulf8u_prepared::return#2
|
||||
[135] if(*((const nomodify signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1
|
||||
[143] (word) mulf8s_prepared::m#0 ← (word) mulf8u_prepared::return#2
|
||||
[144] if(*((const nomodify signed byte*) mulf8s_prepared::memA)>=(signed byte) 0) goto mulf8s_prepared::@1
|
||||
to:mulf8s_prepared::@3
|
||||
mulf8s_prepared::@3: scope:[mulf8s_prepared] from mulf8s_prepared::@5
|
||||
[136] (byte~) mulf8s_prepared::$8 ← > (word) mulf8s_prepared::m#0
|
||||
[137] (byte~) mulf8s_prepared::$15 ← (byte~) mulf8s_prepared::$8 - (byte)(signed byte) mulf8s_prepared::b#0
|
||||
[138] (word) mulf8s_prepared::m#1 ← (word) mulf8s_prepared::m#0 hi= (byte~) mulf8s_prepared::$15
|
||||
[145] (byte~) mulf8s_prepared::$8 ← > (word) mulf8s_prepared::m#0
|
||||
[146] (byte~) mulf8s_prepared::$15 ← (byte~) mulf8s_prepared::$8 - (byte)(signed byte) mulf8s_prepared::b#0
|
||||
[147] (word) mulf8s_prepared::m#1 ← (word) mulf8s_prepared::m#0 hi= (byte~) mulf8s_prepared::$15
|
||||
to:mulf8s_prepared::@1
|
||||
mulf8s_prepared::@1: scope:[mulf8s_prepared] from mulf8s_prepared::@3 mulf8s_prepared::@5
|
||||
[139] (word) mulf8s_prepared::m#5 ← phi( mulf8s_prepared::@3/(word) mulf8s_prepared::m#1 mulf8s_prepared::@5/(word) mulf8s_prepared::m#0 )
|
||||
[140] if((signed byte) mulf8s_prepared::b#0>=(signed byte) 0) goto mulf8s_prepared::@2
|
||||
[148] (word) mulf8s_prepared::m#5 ← phi( mulf8s_prepared::@3/(word) mulf8s_prepared::m#1 mulf8s_prepared::@5/(word) mulf8s_prepared::m#0 )
|
||||
[149] if((signed byte) mulf8s_prepared::b#0>=(signed byte) 0) goto mulf8s_prepared::@2
|
||||
to:mulf8s_prepared::@4
|
||||
mulf8s_prepared::@4: scope:[mulf8s_prepared] from mulf8s_prepared::@1
|
||||
[141] (byte~) mulf8s_prepared::$12 ← > (word) mulf8s_prepared::m#5
|
||||
[142] (byte~) mulf8s_prepared::$16 ← (byte~) mulf8s_prepared::$12 - (byte)*((const nomodify signed byte*) mulf8s_prepared::memA)
|
||||
[143] (word) mulf8s_prepared::m#2 ← (word) mulf8s_prepared::m#5 hi= (byte~) mulf8s_prepared::$16
|
||||
[150] (byte~) mulf8s_prepared::$12 ← > (word) mulf8s_prepared::m#5
|
||||
[151] (byte~) mulf8s_prepared::$16 ← (byte~) mulf8s_prepared::$12 - (byte)*((const nomodify signed byte*) mulf8s_prepared::memA)
|
||||
[152] (word) mulf8s_prepared::m#2 ← (word) mulf8s_prepared::m#5 hi= (byte~) mulf8s_prepared::$16
|
||||
to:mulf8s_prepared::@2
|
||||
mulf8s_prepared::@2: scope:[mulf8s_prepared] from mulf8s_prepared::@1 mulf8s_prepared::@4
|
||||
[144] (word) mulf8s_prepared::m#4 ← phi( mulf8s_prepared::@1/(word) mulf8s_prepared::m#5 mulf8s_prepared::@4/(word) mulf8s_prepared::m#2 )
|
||||
[153] (word) mulf8s_prepared::m#4 ← phi( mulf8s_prepared::@1/(word) mulf8s_prepared::m#5 mulf8s_prepared::@4/(word) mulf8s_prepared::m#2 )
|
||||
to:mulf8s_prepared::@return
|
||||
mulf8s_prepared::@return: scope:[mulf8s_prepared] from mulf8s_prepared::@2
|
||||
[145] return
|
||||
[154] return
|
||||
to:@return
|
||||
|
||||
(word()) mulf8u_prepared((byte) mulf8u_prepared::b)
|
||||
mulf8u_prepared: scope:[mulf8u_prepared] from mulf8s_prepared
|
||||
[146] *((const nomodify byte*) mulf8u_prepared::memB) ← (byte) mulf8u_prepared::b#0
|
||||
[155] *((const nomodify byte*) mulf8u_prepared::memB) ← (byte) mulf8u_prepared::b#0
|
||||
asm { ldxmemB sec sm1: ldamulf_sqr1_lo,x sm2: sbcmulf_sqr2_lo,x staresL sm3: ldamulf_sqr1_hi,x sm4: sbcmulf_sqr2_hi,x stamemB }
|
||||
[148] (word) mulf8u_prepared::return#0 ← *((const nomodify byte*) mulf8u_prepared::memB) w= *((const nomodify byte*) mulf8u_prepared::resL)
|
||||
[157] (word) mulf8u_prepared::return#0 ← *((const nomodify byte*) mulf8u_prepared::memB) w= *((const nomodify byte*) mulf8u_prepared::resL)
|
||||
to:mulf8u_prepared::@return
|
||||
mulf8u_prepared::@return: scope:[mulf8u_prepared] from mulf8u_prepared
|
||||
[149] return
|
||||
[158] return
|
||||
to:@return
|
||||
|
||||
(void()) mulf8u_prepare((byte) mulf8u_prepare::a)
|
||||
mulf8u_prepare: scope:[mulf8u_prepare] from mulf8s::mulf8s_prepare1
|
||||
[150] *((const nomodify byte*) mulf8u_prepare::memA) ← (byte) mulf8u_prepare::a#0
|
||||
[159] *((const nomodify byte*) mulf8u_prepare::memA) ← (byte) mulf8u_prepare::a#0
|
||||
asm { ldamemA stamulf8u_prepared.sm1+1 stamulf8u_prepared.sm3+1 eor#$ff stamulf8u_prepared.sm2+1 stamulf8u_prepared.sm4+1 }
|
||||
to:mulf8u_prepare::@return
|
||||
mulf8u_prepare::@return: scope:[mulf8u_prepare] from mulf8u_prepare
|
||||
[152] return
|
||||
[161] return
|
||||
to:@return
|
||||
|
||||
(void()) init()
|
||||
init: scope:[init] from main
|
||||
[153] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3
|
||||
[154] call plexInit
|
||||
[162] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3
|
||||
[163] call plexInit
|
||||
to:init::@1
|
||||
init::@1: scope:[init] from init init::@1
|
||||
[155] (byte) init::i#2 ← phi( init::@1/(byte) init::i#1 init/(byte) 0 )
|
||||
[156] *((const byte*) PLEX_PTR + (byte) init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40
|
||||
[157] (byte~) init::$10 ← (byte) init::i#2 << (byte) 2
|
||||
[158] (byte~) init::$3 ← (byte~) init::$10 + (byte) init::i#2
|
||||
[159] (byte~) init::$4 ← (byte) $18 + (byte~) init::$3
|
||||
[160] (byte~) init::$9 ← (byte) init::i#2 << (byte) 1
|
||||
[161] *((const word*) PLEX_XPOS + (byte~) init::$9) ← (byte~) init::$4
|
||||
[162] (byte~) init::$5 ← (byte) init::i#2 << (byte) 3
|
||||
[163] (byte~) init::$6 ← (byte) $32 + (byte~) init::$5
|
||||
[164] *((const byte*) PLEX_YPOS + (byte) init::i#2) ← (byte~) init::$6
|
||||
[165] (byte) init::i#1 ← ++ (byte) init::i#2
|
||||
[166] if((byte) init::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto init::@1
|
||||
[164] (byte) init::i#2 ← phi( init::@1/(byte) init::i#1 init/(byte) 0 )
|
||||
[165] *((const byte*) PLEX_PTR + (byte) init::i#2) ← (byte)(const byte*) SPRITE/(byte) $40
|
||||
[166] (byte~) init::$10 ← (byte) init::i#2 << (byte) 2
|
||||
[167] (byte~) init::$3 ← (byte~) init::$10 + (byte) init::i#2
|
||||
[168] (byte~) init::$4 ← (byte) $18 + (byte~) init::$3
|
||||
[169] (byte~) init::$9 ← (byte) init::i#2 << (byte) 1
|
||||
[170] *((const word*) PLEX_XPOS + (byte~) init::$9) ← (byte~) init::$4
|
||||
[171] (byte~) init::$5 ← (byte) init::i#2 << (byte) 3
|
||||
[172] (byte~) init::$6 ← (byte) $32 + (byte~) init::$5
|
||||
[173] *((const byte*) PLEX_YPOS + (byte) init::i#2) ← (byte~) init::$6
|
||||
[174] (byte) init::i#1 ← ++ (byte) init::i#2
|
||||
[175] if((byte) init::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto init::@1
|
||||
to:init::@2
|
||||
init::@2: scope:[init] from init::@1
|
||||
[167] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff
|
||||
[176] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff
|
||||
to:init::@3
|
||||
init::@3: scope:[init] from init::@2 init::@3
|
||||
[168] (byte) init::i1#2 ← phi( init::@2/(byte) 0 init::@3/(byte) init::i1#1 )
|
||||
[169] *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN
|
||||
[170] (byte) init::i1#1 ← ++ (byte) init::i1#2
|
||||
[171] if((byte) init::i1#1!=(byte) 8) goto init::@3
|
||||
[177] (byte) init::i1#2 ← phi( init::@2/(byte) 0 init::@3/(byte) init::i1#1 )
|
||||
[178] *((const nomodify byte*) SPRITES_COLS + (byte) init::i1#2) ← (const nomodify byte) GREEN
|
||||
[179] (byte) init::i1#1 ← ++ (byte) init::i1#2
|
||||
[180] if((byte) init::i1#1!=(byte) 8) goto init::@3
|
||||
to:init::@4
|
||||
init::@4: scope:[init] from init::@3
|
||||
[172] phi()
|
||||
[173] call mulf_init
|
||||
[181] phi()
|
||||
[182] call mulf_init
|
||||
to:init::@5
|
||||
init::@5: scope:[init] from init::@4
|
||||
[174] phi()
|
||||
[175] call memset
|
||||
[183] phi()
|
||||
[184] call memset
|
||||
to:init::@return
|
||||
init::@return: scope:[init] from init::@5
|
||||
[176] return
|
||||
[185] return
|
||||
to:@return
|
||||
|
||||
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
|
||||
memset: scope:[memset] from init::@5
|
||||
[177] phi()
|
||||
[186] phi()
|
||||
to:memset::@1
|
||||
memset::@1: scope:[memset] from memset memset::@2
|
||||
[178] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@2/(byte*) memset::dst#1 )
|
||||
[179] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2
|
||||
[187] (byte*) memset::dst#2 ← phi( memset/(byte*)(const void*) memset::str#0 memset::@2/(byte*) memset::dst#1 )
|
||||
[188] if((byte*) memset::dst#2!=(const byte*) memset::end#0) goto memset::@2
|
||||
to:memset::@return
|
||||
memset::@return: scope:[memset] from memset::@1
|
||||
[180] return
|
||||
[189] return
|
||||
to:@return
|
||||
memset::@2: scope:[memset] from memset::@1
|
||||
[181] *((byte*) memset::dst#2) ← (const byte) memset::c#0
|
||||
[182] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
|
||||
[190] *((byte*) memset::dst#2) ← (const byte) memset::c#0
|
||||
[191] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
|
||||
to:memset::@1
|
||||
|
||||
(void()) mulf_init()
|
||||
mulf_init: scope:[mulf_init] from init::@4
|
||||
[183] phi()
|
||||
[192] phi()
|
||||
to:mulf_init::@1
|
||||
mulf_init::@1: scope:[mulf_init] from mulf_init mulf_init::@3
|
||||
[184] (byte) mulf_init::x_2#3 ← phi( mulf_init/(byte) 0 mulf_init::@3/(byte) mulf_init::x_2#2 )
|
||||
[184] (byte*) mulf_init::sqr1_hi#2 ← phi( mulf_init/(const byte*) mulf_sqr1_hi+(byte) 1 mulf_init::@3/(byte*) mulf_init::sqr1_hi#1 )
|
||||
[184] (word) mulf_init::sqr#4 ← phi( mulf_init/(word) 0 mulf_init::@3/(word) mulf_init::sqr#1 )
|
||||
[184] (byte) mulf_init::c#2 ← phi( mulf_init/(byte) 0 mulf_init::@3/(byte) mulf_init::c#1 )
|
||||
[184] (byte*) mulf_init::sqr1_lo#2 ← phi( mulf_init/(const byte*) mulf_sqr1_lo+(byte) 1 mulf_init::@3/(byte*) mulf_init::sqr1_lo#1 )
|
||||
[185] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2
|
||||
[193] (byte) mulf_init::x_2#3 ← phi( mulf_init/(byte) 0 mulf_init::@3/(byte) mulf_init::x_2#2 )
|
||||
[193] (byte*) mulf_init::sqr1_hi#2 ← phi( mulf_init/(const byte*) mulf_sqr1_hi+(byte) 1 mulf_init::@3/(byte*) mulf_init::sqr1_hi#1 )
|
||||
[193] (word) mulf_init::sqr#4 ← phi( mulf_init/(word) 0 mulf_init::@3/(word) mulf_init::sqr#1 )
|
||||
[193] (byte) mulf_init::c#2 ← phi( mulf_init/(byte) 0 mulf_init::@3/(byte) mulf_init::c#1 )
|
||||
[193] (byte*) mulf_init::sqr1_lo#2 ← phi( mulf_init/(const byte*) mulf_sqr1_lo+(byte) 1 mulf_init::@3/(byte*) mulf_init::sqr1_lo#1 )
|
||||
[194] if((byte*) mulf_init::sqr1_lo#2!=(const byte*) mulf_sqr1_lo+(word) $200) goto mulf_init::@2
|
||||
to:mulf_init::@5
|
||||
mulf_init::@5: scope:[mulf_init] from mulf_init::@1 mulf_init::@8
|
||||
[186] (byte) mulf_init::dir#2 ← phi( mulf_init::@8/(byte) mulf_init::dir#4 mulf_init::@1/(byte) $ff )
|
||||
[186] (byte*) mulf_init::sqr2_hi#2 ← phi( mulf_init::@8/(byte*) mulf_init::sqr2_hi#1 mulf_init::@1/(const byte*) mulf_sqr2_hi )
|
||||
[186] (byte) mulf_init::x_255#2 ← phi( mulf_init::@8/(byte) mulf_init::x_255#1 mulf_init::@1/(byte) -1 )
|
||||
[186] (byte*) mulf_init::sqr2_lo#2 ← phi( mulf_init::@8/(byte*) mulf_init::sqr2_lo#1 mulf_init::@1/(const byte*) mulf_sqr2_lo )
|
||||
[187] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@6
|
||||
[195] (byte) mulf_init::dir#2 ← phi( mulf_init::@8/(byte) mulf_init::dir#4 mulf_init::@1/(byte) $ff )
|
||||
[195] (byte*) mulf_init::sqr2_hi#2 ← phi( mulf_init::@8/(byte*) mulf_init::sqr2_hi#1 mulf_init::@1/(const byte*) mulf_sqr2_hi )
|
||||
[195] (byte) mulf_init::x_255#2 ← phi( mulf_init::@8/(byte) mulf_init::x_255#1 mulf_init::@1/(byte) -1 )
|
||||
[195] (byte*) mulf_init::sqr2_lo#2 ← phi( mulf_init::@8/(byte*) mulf_init::sqr2_lo#1 mulf_init::@1/(const byte*) mulf_sqr2_lo )
|
||||
[196] if((byte*) mulf_init::sqr2_lo#2!=(const byte*) mulf_sqr2_lo+(word) $1ff) goto mulf_init::@6
|
||||
to:mulf_init::@7
|
||||
mulf_init::@7: scope:[mulf_init] from mulf_init::@5
|
||||
[188] *((const byte*) mulf_sqr2_lo+(word) $1ff) ← *((const byte*) mulf_sqr1_lo+(word) $100)
|
||||
[189] *((const byte*) mulf_sqr2_hi+(word) $1ff) ← *((const byte*) mulf_sqr1_hi+(word) $100)
|
||||
[197] *((const byte*) mulf_sqr2_lo+(word) $1ff) ← *((const byte*) mulf_sqr1_lo+(word) $100)
|
||||
[198] *((const byte*) mulf_sqr2_hi+(word) $1ff) ← *((const byte*) mulf_sqr1_hi+(word) $100)
|
||||
to:mulf_init::@return
|
||||
mulf_init::@return: scope:[mulf_init] from mulf_init::@7
|
||||
[190] return
|
||||
[199] return
|
||||
to:@return
|
||||
mulf_init::@6: scope:[mulf_init] from mulf_init::@5
|
||||
[191] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte*) mulf_sqr1_lo + (byte) mulf_init::x_255#2)
|
||||
[192] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte*) mulf_sqr1_hi + (byte) mulf_init::x_255#2)
|
||||
[193] (byte*) mulf_init::sqr2_hi#1 ← ++ (byte*) mulf_init::sqr2_hi#2
|
||||
[194] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2
|
||||
[195] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@9
|
||||
[200] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte*) mulf_sqr1_lo + (byte) mulf_init::x_255#2)
|
||||
[201] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte*) mulf_sqr1_hi + (byte) mulf_init::x_255#2)
|
||||
[202] (byte*) mulf_init::sqr2_hi#1 ← ++ (byte*) mulf_init::sqr2_hi#2
|
||||
[203] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2
|
||||
[204] if((byte) mulf_init::x_255#1!=(byte) 0) goto mulf_init::@9
|
||||
to:mulf_init::@8
|
||||
mulf_init::@9: scope:[mulf_init] from mulf_init::@6
|
||||
[196] phi()
|
||||
[205] phi()
|
||||
to:mulf_init::@8
|
||||
mulf_init::@8: scope:[mulf_init] from mulf_init::@6 mulf_init::@9
|
||||
[197] (byte) mulf_init::dir#4 ← phi( mulf_init::@9/(byte) mulf_init::dir#2 mulf_init::@6/(byte) 1 )
|
||||
[198] (byte*) mulf_init::sqr2_lo#1 ← ++ (byte*) mulf_init::sqr2_lo#2
|
||||
[206] (byte) mulf_init::dir#4 ← phi( mulf_init::@9/(byte) mulf_init::dir#2 mulf_init::@6/(byte) 1 )
|
||||
[207] (byte*) mulf_init::sqr2_lo#1 ← ++ (byte*) mulf_init::sqr2_lo#2
|
||||
to:mulf_init::@5
|
||||
mulf_init::@2: scope:[mulf_init] from mulf_init::@1
|
||||
[199] (byte) mulf_init::c#1 ← ++ (byte) mulf_init::c#2
|
||||
[200] (byte~) mulf_init::$1 ← (byte) mulf_init::c#1 & (byte) 1
|
||||
[201] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@3
|
||||
[208] (byte) mulf_init::c#1 ← ++ (byte) mulf_init::c#2
|
||||
[209] (byte~) mulf_init::$1 ← (byte) mulf_init::c#1 & (byte) 1
|
||||
[210] if((byte~) mulf_init::$1!=(byte) 0) goto mulf_init::@3
|
||||
to:mulf_init::@4
|
||||
mulf_init::@4: scope:[mulf_init] from mulf_init::@2
|
||||
[202] (byte) mulf_init::x_2#1 ← ++ (byte) mulf_init::x_2#3
|
||||
[203] (word) mulf_init::sqr#2 ← ++ (word) mulf_init::sqr#4
|
||||
[211] (byte) mulf_init::x_2#1 ← ++ (byte) mulf_init::x_2#3
|
||||
[212] (word) mulf_init::sqr#2 ← ++ (word) mulf_init::sqr#4
|
||||
to:mulf_init::@3
|
||||
mulf_init::@3: scope:[mulf_init] from mulf_init::@2 mulf_init::@4
|
||||
[204] (byte) mulf_init::x_2#2 ← phi( mulf_init::@2/(byte) mulf_init::x_2#3 mulf_init::@4/(byte) mulf_init::x_2#1 )
|
||||
[204] (word) mulf_init::sqr#3 ← phi( mulf_init::@2/(word) mulf_init::sqr#4 mulf_init::@4/(word) mulf_init::sqr#2 )
|
||||
[205] (byte~) mulf_init::$4 ← < (word) mulf_init::sqr#3
|
||||
[206] *((byte*) mulf_init::sqr1_lo#2) ← (byte~) mulf_init::$4
|
||||
[207] (byte~) mulf_init::$5 ← > (word) mulf_init::sqr#3
|
||||
[208] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5
|
||||
[209] (byte*) mulf_init::sqr1_hi#1 ← ++ (byte*) mulf_init::sqr1_hi#2
|
||||
[210] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2
|
||||
[211] (byte*) mulf_init::sqr1_lo#1 ← ++ (byte*) mulf_init::sqr1_lo#2
|
||||
[213] (byte) mulf_init::x_2#2 ← phi( mulf_init::@2/(byte) mulf_init::x_2#3 mulf_init::@4/(byte) mulf_init::x_2#1 )
|
||||
[213] (word) mulf_init::sqr#3 ← phi( mulf_init::@2/(word) mulf_init::sqr#4 mulf_init::@4/(word) mulf_init::sqr#2 )
|
||||
[214] (byte~) mulf_init::$4 ← < (word) mulf_init::sqr#3
|
||||
[215] *((byte*) mulf_init::sqr1_lo#2) ← (byte~) mulf_init::$4
|
||||
[216] (byte~) mulf_init::$5 ← > (word) mulf_init::sqr#3
|
||||
[217] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$5
|
||||
[218] (byte*) mulf_init::sqr1_hi#1 ← ++ (byte*) mulf_init::sqr1_hi#2
|
||||
[219] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2
|
||||
[220] (byte*) mulf_init::sqr1_lo#1 ← ++ (byte*) mulf_init::sqr1_lo#2
|
||||
to:mulf_init::@1
|
||||
|
||||
(void()) plexInit((byte*) plexInit::screen)
|
||||
plexInit: scope:[plexInit] from init
|
||||
[212] phi()
|
||||
[221] phi()
|
||||
to:plexInit::plexSetScreen1
|
||||
plexInit::plexSetScreen1: scope:[plexInit] from plexInit
|
||||
[213] phi()
|
||||
[222] phi()
|
||||
to:plexInit::@1
|
||||
plexInit::@1: scope:[plexInit] from plexInit::@1 plexInit::plexSetScreen1
|
||||
[214] (byte) plexInit::i#2 ← phi( plexInit::@1/(byte) plexInit::i#1 plexInit::plexSetScreen1/(byte) 0 )
|
||||
[215] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2
|
||||
[216] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2
|
||||
[217] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1
|
||||
[223] (byte) plexInit::i#2 ← phi( plexInit::@1/(byte) plexInit::i#1 plexInit::plexSetScreen1/(byte) 0 )
|
||||
[224] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2
|
||||
[225] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2
|
||||
[226] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1
|
||||
to:plexInit::@return
|
||||
plexInit::@return: scope:[plexInit] from plexInit::@1
|
||||
[218] return
|
||||
[227] return
|
||||
to:@return
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,6 @@
|
||||
(label) @1
|
||||
(label) @2
|
||||
(label) @3
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(const nomodify byte) BLACK = (byte) 0
|
||||
@ -55,8 +57,8 @@
|
||||
(label) init::@5
|
||||
(label) init::@return
|
||||
(byte) init::i
|
||||
(byte) init::i#1 i zp[1]:6 1501.5
|
||||
(byte) init::i#2 i zp[1]:6 800.8000000000001
|
||||
(byte) init::i#1 i zp[1]:4 1501.5
|
||||
(byte) init::i#2 i zp[1]:4 800.8000000000001
|
||||
(byte) init::i1
|
||||
(byte) init::i1#1 reg byte x 1501.5
|
||||
(byte) init::i1#2 reg byte x 1501.5
|
||||
@ -83,14 +85,14 @@
|
||||
(byte) keyboard_matrix_read::rowid
|
||||
(const byte*) keyboard_matrix_row_bitmask[(number) 8] = { (byte) $fe, (byte) $fd, (byte) $fb, (byte) $f7, (byte) $ef, (byte) $df, (byte) $bf, (byte) $7f }
|
||||
(void()) loop()
|
||||
(signed word~) loop::$1 zp[2]:7 20002.0
|
||||
(signed word~) loop::$1 zp[2]:5 20002.0
|
||||
(byte~) loop::$11 reg byte a 20002.0
|
||||
(byte~) loop::$18 reg byte a 2002.0
|
||||
(signed word~) loop::$2 zp[2]:7 20002.0
|
||||
(signed word~) loop::$2 zp[2]:5 20002.0
|
||||
(byte~) loop::$20 reg byte a 20002.0
|
||||
(byte~) loop::$4 reg byte x 10001.0
|
||||
(signed word~) loop::$5 zp[2]:7 20002.0
|
||||
(signed word~) loop::$6 zp[2]:7 20002.0
|
||||
(signed word~) loop::$5 zp[2]:5 20002.0
|
||||
(signed word~) loop::$6 zp[2]:5 20002.0
|
||||
(byte~) loop::$8 reg byte a 20002.0
|
||||
(label) loop::@1
|
||||
(label) loop::@10
|
||||
@ -109,29 +111,29 @@
|
||||
(label) loop::@9
|
||||
(label) loop::@return
|
||||
(byte) loop::a
|
||||
(byte) loop::a#1 a zp[1]:3 5000.5
|
||||
(byte) loop::a#2 a zp[1]:3 1952.6190476190475
|
||||
(byte) loop::a#6 a zp[1]:3 2002.0
|
||||
(byte) loop::a#1 a zp[1]:14 5000.5
|
||||
(byte) loop::a#2 a zp[1]:14 1952.6190476190475
|
||||
(byte) loop::a#6 a zp[1]:14 2002.0
|
||||
(byte) loop::angle
|
||||
(byte) loop::angle#1 angle zp[1]:6 117.76470588235294
|
||||
(byte) loop::angle#6 angle zp[1]:6 96.87096774193549
|
||||
(byte) loop::angle#1 angle zp[1]:4 117.76470588235294
|
||||
(byte) loop::angle#6 angle zp[1]:4 96.87096774193549
|
||||
(byte) loop::i
|
||||
(byte) loop::i#1 i zp[1]:4 15001.5
|
||||
(byte) loop::i#2 i zp[1]:4 1739.304347826087
|
||||
(byte) loop::i#1 i zp[1]:2 15001.5
|
||||
(byte) loop::i#2 i zp[1]:2 1739.304347826087
|
||||
(byte) loop::i1
|
||||
(byte) loop::i1#1 i1 zp[1]:9 15001.5
|
||||
(byte) loop::i1#5 i1 zp[1]:9 3333.6666666666665
|
||||
(byte) loop::i1#1 i1 zp[1]:3 15001.5
|
||||
(byte) loop::i1#5 i1 zp[1]:3 3333.6666666666665
|
||||
(label) loop::plexFreeNextYpos1
|
||||
(byte) loop::plexFreeNextYpos1_return
|
||||
(byte) loop::plexFreeNextYpos1_return#0 plexFreeNextYpos1_return zp[1]:18 55001.0
|
||||
(byte) loop::plexFreeNextYpos1_return#0 plexFreeNextYpos1_return zp[1]:21 55001.0
|
||||
(signed byte) loop::r
|
||||
(signed byte) loop::r#1 r zp[1]:2 6667.333333333333
|
||||
(signed byte) loop::r#2 r zp[1]:2 1818.3636363636363
|
||||
(signed byte) loop::r#1 r zp[1]:7 6667.333333333333
|
||||
(signed byte) loop::r#2 r zp[1]:7 1818.3636363636363
|
||||
(byte) loop::rasterY
|
||||
(signed word) loop::x
|
||||
(signed word) loop::x#0 x zp[2]:7 20002.0
|
||||
(signed word) loop::x#0 x zp[2]:5 20002.0
|
||||
(signed word) loop::y
|
||||
(signed word) loop::y#0 y zp[2]:7 20002.0
|
||||
(signed word) loop::y#0 y zp[2]:5 20002.0
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
@ -144,8 +146,8 @@
|
||||
(byte) memset::c
|
||||
(const byte) memset::c#0 c = (byte) ' '
|
||||
(byte*) memset::dst
|
||||
(byte*) memset::dst#1 dst zp[2]:7 20002.0
|
||||
(byte*) memset::dst#2 dst zp[2]:7 13334.666666666666
|
||||
(byte*) memset::dst#1 dst zp[2]:5 20002.0
|
||||
(byte*) memset::dst#2 dst zp[2]:5 13334.666666666666
|
||||
(byte*) memset::end
|
||||
(const byte*) memset::end#0 end = (byte*)(const void*) memset::str#0+(const word) memset::num#0
|
||||
(word) memset::num
|
||||
@ -168,9 +170,9 @@
|
||||
(signed byte) mulf8s::mulf8s_prepare1_a
|
||||
(signed byte) mulf8s::mulf8s_prepare1_a#0 reg byte a 20002.0
|
||||
(signed word) mulf8s::return
|
||||
(signed word) mulf8s::return#0 return zp[2]:7 30000.75
|
||||
(signed word) mulf8s::return#2 return zp[2]:7 20002.0
|
||||
(signed word) mulf8s::return#3 return zp[2]:7 20002.0
|
||||
(signed word) mulf8s::return#0 return zp[2]:5 30000.75
|
||||
(signed word) mulf8s::return#2 return zp[2]:5 20002.0
|
||||
(signed word) mulf8s::return#3 return zp[2]:5 20002.0
|
||||
(signed word()) mulf8s_prepared((signed byte) mulf8s_prepared::b)
|
||||
(byte~) mulf8s_prepared::$12 reg byte a 2000002.0
|
||||
(byte~) mulf8s_prepared::$15 reg byte a 2000002.0
|
||||
@ -183,13 +185,13 @@
|
||||
(label) mulf8s_prepared::@5
|
||||
(label) mulf8s_prepared::@return
|
||||
(signed byte) mulf8s_prepared::b
|
||||
(signed byte) mulf8s_prepared::b#0 b zp[1]:20 110000.20000000001
|
||||
(signed byte) mulf8s_prepared::b#0 b zp[1]:23 110000.20000000001
|
||||
(word) mulf8s_prepared::m
|
||||
(word) mulf8s_prepared::m#0 m zp[2]:7 1000001.0
|
||||
(word) mulf8s_prepared::m#1 m zp[2]:7 2000002.0
|
||||
(word) mulf8s_prepared::m#2 m zp[2]:7 2000002.0
|
||||
(word) mulf8s_prepared::m#4 m zp[2]:7 666667.3333333334
|
||||
(word) mulf8s_prepared::m#5 m zp[2]:7 1250001.25
|
||||
(word) mulf8s_prepared::m#0 m zp[2]:5 1000001.0
|
||||
(word) mulf8s_prepared::m#1 m zp[2]:5 2000002.0
|
||||
(word) mulf8s_prepared::m#2 m zp[2]:5 2000002.0
|
||||
(word) mulf8s_prepared::m#4 m zp[2]:5 666667.3333333334
|
||||
(word) mulf8s_prepared::m#5 m zp[2]:5 1250001.25
|
||||
(const nomodify signed byte*) mulf8s_prepared::memA = (signed byte*) 253
|
||||
(signed word) mulf8s_prepared::return
|
||||
(void()) mulf8u_prepare((byte) mulf8u_prepare::a)
|
||||
@ -204,8 +206,8 @@
|
||||
(const nomodify byte*) mulf8u_prepared::memB = (byte*) 255
|
||||
(const nomodify byte*) mulf8u_prepared::resL = (byte*) 254
|
||||
(word) mulf8u_prepared::return
|
||||
(word) mulf8u_prepared::return#0 return zp[2]:7 3666667.333333333
|
||||
(word) mulf8u_prepared::return#2 return zp[2]:7 2000002.0
|
||||
(word) mulf8u_prepared::return#0 return zp[2]:5 3666667.333333333
|
||||
(word) mulf8u_prepared::return#2 return zp[2]:5 2000002.0
|
||||
(void()) mulf_init()
|
||||
(byte~) mulf_init::$1 reg byte a 20002.0
|
||||
(byte~) mulf_init::$4 reg byte a 20002.0
|
||||
@ -221,28 +223,28 @@
|
||||
(label) mulf_init::@9
|
||||
(label) mulf_init::@return
|
||||
(byte) mulf_init::c
|
||||
(byte) mulf_init::c#1 c zp[1]:9 2307.9230769230767
|
||||
(byte) mulf_init::c#2 c zp[1]:9 10001.0
|
||||
(byte) mulf_init::c#1 c zp[1]:7 2307.9230769230767
|
||||
(byte) mulf_init::c#2 c zp[1]:7 10001.0
|
||||
(byte) mulf_init::dir
|
||||
(byte) mulf_init::dir#2 dir zp[1]:18 3750.375
|
||||
(byte) mulf_init::dir#4 dir zp[1]:18 10001.0
|
||||
(byte) mulf_init::dir#2 dir zp[1]:14 3750.375
|
||||
(byte) mulf_init::dir#4 dir zp[1]:14 10001.0
|
||||
(word) mulf_init::sqr
|
||||
(word) mulf_init::sqr#1 sqr zp[2]:16 10001.0
|
||||
(word) mulf_init::sqr#2 sqr zp[2]:16 20002.0
|
||||
(word) mulf_init::sqr#3 sqr zp[2]:16 8334.166666666666
|
||||
(word) mulf_init::sqr#4 sqr zp[2]:16 5000.5
|
||||
(word) mulf_init::sqr#1 sqr zp[2]:15 10001.0
|
||||
(word) mulf_init::sqr#2 sqr zp[2]:15 20002.0
|
||||
(word) mulf_init::sqr#3 sqr zp[2]:15 8334.166666666666
|
||||
(word) mulf_init::sqr#4 sqr zp[2]:15 5000.5
|
||||
(byte*) mulf_init::sqr1_hi
|
||||
(byte*) mulf_init::sqr1_hi#1 sqr1_hi zp[2]:10 6667.333333333333
|
||||
(byte*) mulf_init::sqr1_hi#2 sqr1_hi zp[2]:10 2500.25
|
||||
(byte*) mulf_init::sqr1_hi#1 sqr1_hi zp[2]:8 6667.333333333333
|
||||
(byte*) mulf_init::sqr1_hi#2 sqr1_hi zp[2]:8 2500.25
|
||||
(byte*) mulf_init::sqr1_lo
|
||||
(byte*) mulf_init::sqr1_lo#1 sqr1_lo zp[2]:7 20002.0
|
||||
(byte*) mulf_init::sqr1_lo#2 sqr1_lo zp[2]:7 2857.4285714285716
|
||||
(byte*) mulf_init::sqr1_lo#1 sqr1_lo zp[2]:5 20002.0
|
||||
(byte*) mulf_init::sqr1_lo#2 sqr1_lo zp[2]:5 2857.4285714285716
|
||||
(byte*) mulf_init::sqr2_hi
|
||||
(byte*) mulf_init::sqr2_hi#1 sqr2_hi zp[2]:14 3333.6666666666665
|
||||
(byte*) mulf_init::sqr2_hi#2 sqr2_hi zp[2]:14 7500.75
|
||||
(byte*) mulf_init::sqr2_hi#1 sqr2_hi zp[2]:12 3333.6666666666665
|
||||
(byte*) mulf_init::sqr2_hi#2 sqr2_hi zp[2]:12 7500.75
|
||||
(byte*) mulf_init::sqr2_lo
|
||||
(byte*) mulf_init::sqr2_lo#1 sqr2_lo zp[2]:12 20002.0
|
||||
(byte*) mulf_init::sqr2_lo#2 sqr2_lo zp[2]:12 4444.888888888889
|
||||
(byte*) mulf_init::sqr2_lo#1 sqr2_lo zp[2]:10 20002.0
|
||||
(byte*) mulf_init::sqr2_lo#2 sqr2_lo zp[2]:10 4444.888888888889
|
||||
(byte) mulf_init::x_2
|
||||
(byte) mulf_init::x_2#1 reg byte x 10001.0
|
||||
(byte) mulf_init::x_2#2 reg byte x 5000.5
|
||||
@ -268,6 +270,7 @@
|
||||
(byte~) plexShowSprite::$2 reg byte a 200002.0
|
||||
(byte~) plexShowSprite::$3 reg byte a 200002.0
|
||||
(byte~) plexShowSprite::$5 reg byte x 200002.0
|
||||
(byte~) plexShowSprite::$6 reg byte a 200002.0
|
||||
(byte~) plexShowSprite::$9 reg byte a 200002.0
|
||||
(label) plexShowSprite::@1
|
||||
(label) plexShowSprite::@2
|
||||
@ -277,11 +280,12 @@
|
||||
(label) plexShowSprite::@return
|
||||
(label) plexShowSprite::plexFreeAdd1
|
||||
(byte~) plexShowSprite::plexFreeAdd1_$0 reg byte a 200002.0
|
||||
(byte~) plexShowSprite::plexFreeAdd1_$1 reg byte x 200002.0
|
||||
(byte~) plexShowSprite::plexFreeAdd1_$1 reg byte a 200002.0
|
||||
(byte~) plexShowSprite::plexFreeAdd1_$2 reg byte a 200002.0
|
||||
(byte) plexShowSprite::plexFreeAdd1_ypos
|
||||
(byte) plexShowSprite::plexFreeAdd1_ypos#0 reg byte a 150001.5
|
||||
(byte) plexShowSprite::plex_sprite_idx2
|
||||
(byte) plexShowSprite::plex_sprite_idx2#0 plex_sprite_idx2 zp[1]:19 27273.0
|
||||
(byte) plexShowSprite::plex_sprite_idx2#0 plex_sprite_idx2 zp[1]:22 25000.25
|
||||
(byte) plexShowSprite::xpos_idx
|
||||
(byte) plexShowSprite::xpos_idx#0 reg byte a 200002.0
|
||||
(byte) plexShowSprite::ypos
|
||||
@ -292,16 +296,18 @@
|
||||
(label) plexSort::@4
|
||||
(label) plexSort::@5
|
||||
(label) plexSort::@6
|
||||
(label) plexSort::@7
|
||||
(label) plexSort::@return
|
||||
(byte) plexSort::m
|
||||
(byte) plexSort::m#1 m zp[1]:18 1500001.5
|
||||
(byte) plexSort::m#2 m zp[1]:18 416667.0833333334
|
||||
(byte) plexSort::m#1 m zp[1]:21 1500001.5
|
||||
(byte) plexSort::m#2 m zp[1]:21 416667.0833333334
|
||||
(byte) plexSort::nxt_idx
|
||||
(byte) plexSort::nxt_idx#0 nxt_idx zp[1]:19 300000.30000000005
|
||||
(byte) plexSort::nxt_idx#0 nxt_idx zp[1]:22 300000.30000000005
|
||||
(byte) plexSort::nxt_y
|
||||
(byte) plexSort::nxt_y#0 nxt_y zp[1]:20 1500000.375
|
||||
(byte) plexSort::nxt_y#0 nxt_y zp[1]:23 1500000.375
|
||||
(label) plexSort::plexFreePrepare1
|
||||
(label) plexSort::plexFreePrepare1_@1
|
||||
(label) plexSort::plexFreePrepare1_@2
|
||||
(byte) plexSort::plexFreePrepare1_s
|
||||
(byte) plexSort::plexFreePrepare1_s#1 reg byte x 1500001.5
|
||||
(byte) plexSort::plexFreePrepare1_s#2 reg byte x 1500001.5
|
||||
@ -310,39 +316,33 @@
|
||||
(byte) plexSort::s#2 reg byte x 2000002.0
|
||||
(byte) plexSort::s#3 reg byte x 2.05000025E7
|
||||
(byte) plexSort::s#6 reg byte x 2000002.0
|
||||
(byte) plex_free_next
|
||||
(byte) plex_free_next#13 plex_free_next zp[1]:2 5000.090909090909
|
||||
(byte) plex_free_next#17 plex_free_next zp[1]:2 22000.4
|
||||
(byte) plex_show_idx
|
||||
(byte) plex_show_idx#15 plex_show_idx zp[1]:4 12222.444444444445
|
||||
(byte) plex_show_idx#43 plex_show_idx zp[1]:4 17083.541666666664
|
||||
(byte) plex_sprite_idx
|
||||
(byte) plex_sprite_idx#15 plex_sprite_idx zp[1]:3 11000.2
|
||||
(byte) plex_sprite_idx#43 plex_sprite_idx zp[1]:3 14091.090909090908
|
||||
(byte) plex_sprite_msb
|
||||
(byte) plex_sprite_msb#16 plex_sprite_msb zp[1]:5 22000.4
|
||||
(byte) plex_sprite_msb#3 plex_sprite_msb zp[1]:5 100001.0
|
||||
(byte) plex_sprite_msb#43 plex_sprite_msb zp[1]:5 12400.16
|
||||
(volatile byte) plex_free_next loadstore zp[1]:20 8205.307692307691
|
||||
(volatile byte) plex_show_idx loadstore zp[1]:17 10408.326530612245
|
||||
(volatile byte) plex_sprite_idx loadstore zp[1]:18 8913.195652173912
|
||||
(volatile byte) plex_sprite_msb loadstore zp[1]:19 12978.914893617019
|
||||
|
||||
zp[1]:2 [ plex_free_next#17 plex_free_next#13 loop::r#2 loop::r#1 ]
|
||||
zp[1]:3 [ plex_sprite_idx#43 plex_sprite_idx#15 loop::a#2 loop::a#1 loop::a#6 ]
|
||||
zp[1]:4 [ plex_show_idx#43 plex_show_idx#15 loop::i#2 loop::i#1 ]
|
||||
zp[1]:5 [ plex_sprite_msb#43 plex_sprite_msb#16 plex_sprite_msb#3 ]
|
||||
zp[1]:2 [ loop::i#2 loop::i#1 ]
|
||||
zp[1]:3 [ loop::i1#5 loop::i1#1 ]
|
||||
reg byte x [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ]
|
||||
reg byte x [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ]
|
||||
reg byte a [ mulf8s::mulf8s_prepare1_a#0 mulf8s::a#1 mulf8s::a#0 ]
|
||||
reg byte x [ mulf8s::b#2 mulf8s::b#1 mulf8s::b#0 ]
|
||||
zp[1]:6 [ init::i#2 init::i#1 loop::angle#6 loop::angle#1 ]
|
||||
zp[1]:4 [ init::i#2 init::i#1 loop::angle#6 loop::angle#1 ]
|
||||
reg byte x [ init::i1#2 init::i1#1 ]
|
||||
zp[2]:7 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 memset::dst#2 memset::dst#1 mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 mulf8s::return#0 mulf8u_prepared::return#2 mulf8s::return#2 loop::$1 mulf8s::return#3 loop::$5 mulf8u_prepared::return#0 loop::$2 loop::x#0 loop::$6 loop::y#0 ]
|
||||
zp[1]:9 [ mulf_init::c#2 mulf_init::c#1 loop::i1#5 loop::i1#1 ]
|
||||
zp[2]:10 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ]
|
||||
zp[2]:5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 memset::dst#2 memset::dst#1 mulf8s_prepared::m#4 mulf8s_prepared::m#5 mulf8s_prepared::m#1 mulf8s_prepared::m#0 mulf8s_prepared::m#2 mulf8s::return#0 mulf8u_prepared::return#2 mulf8s::return#2 loop::$1 mulf8s::return#3 loop::$5 mulf8u_prepared::return#0 loop::$2 loop::x#0 loop::$6 loop::y#0 ]
|
||||
zp[1]:7 [ mulf_init::c#2 mulf_init::c#1 loop::r#2 loop::r#1 ]
|
||||
zp[2]:8 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ]
|
||||
reg byte x [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ]
|
||||
zp[2]:12 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ]
|
||||
zp[2]:10 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ]
|
||||
reg byte x [ mulf_init::x_255#2 mulf_init::x_255#1 ]
|
||||
zp[2]:14 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ]
|
||||
zp[2]:16 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ]
|
||||
zp[2]:12 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ]
|
||||
zp[1]:14 [ mulf_init::dir#2 mulf_init::dir#4 loop::a#2 loop::a#1 loop::a#6 ]
|
||||
zp[2]:15 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ]
|
||||
reg byte x [ plexInit::i#2 plexInit::i#1 ]
|
||||
zp[1]:17 [ plex_show_idx ]
|
||||
zp[1]:18 [ plex_sprite_idx ]
|
||||
zp[1]:19 [ plex_sprite_msb ]
|
||||
zp[1]:20 [ plex_free_next ]
|
||||
reg byte a [ keyboard_key_pressed::return#2 ]
|
||||
reg byte a [ exit::$0 ]
|
||||
reg byte a [ keyboard_matrix_read::return#2 ]
|
||||
@ -353,22 +353,24 @@ reg byte x [ loop::$4 ]
|
||||
reg byte a [ loop::$20 ]
|
||||
reg byte a [ loop::$8 ]
|
||||
reg byte a [ loop::$11 ]
|
||||
zp[1]:18 [ loop::plexFreeNextYpos1_return#0 mulf_init::dir#2 mulf_init::dir#4 plexSort::m#2 plexSort::m#1 ]
|
||||
zp[1]:21 [ loop::plexFreeNextYpos1_return#0 plexSort::m#2 plexSort::m#1 ]
|
||||
reg byte a [ keyboard_key_pressed::return#3 ]
|
||||
reg byte a [ loop::$18 ]
|
||||
reg byte a [ plexShowSprite::plexFreeAdd1_ypos#0 ]
|
||||
reg byte a [ plexShowSprite::plexFreeAdd1_$0 ]
|
||||
reg byte x [ plexShowSprite::plexFreeAdd1_$1 ]
|
||||
reg byte a [ plexShowSprite::plexFreeAdd1_$1 ]
|
||||
reg byte a [ plexShowSprite::plexFreeAdd1_$2 ]
|
||||
reg byte a [ plexShowSprite::xpos_idx#0 ]
|
||||
reg byte x [ plexShowSprite::$11 ]
|
||||
reg byte a [ plexShowSprite::$2 ]
|
||||
reg byte a [ plexShowSprite::$3 ]
|
||||
reg byte a [ plexShowSprite::$9 ]
|
||||
reg byte x [ plexShowSprite::$5 ]
|
||||
zp[1]:19 [ plexSort::nxt_idx#0 plexShowSprite::plex_sprite_idx2#0 ]
|
||||
reg byte a [ plexShowSprite::$6 ]
|
||||
zp[1]:22 [ plexSort::nxt_idx#0 plexShowSprite::plex_sprite_idx2#0 ]
|
||||
reg byte x [ plexSort::s#2 ]
|
||||
reg byte a [ mulf8u_prepare::a#0 ]
|
||||
zp[1]:20 [ mulf8s_prepared::b#0 plexSort::nxt_y#0 ]
|
||||
zp[1]:23 [ mulf8s_prepared::b#0 plexSort::nxt_y#0 ]
|
||||
reg byte a [ mulf8u_prepared::b#0 ]
|
||||
reg byte a [ mulf8s_prepared::$8 ]
|
||||
reg byte a [ mulf8s_prepared::$15 ]
|
||||
|
@ -1,6 +1,6 @@
|
||||
// A simple usage of the flexible sprite multiplexer routine
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(main)
|
||||
:BasicUpstart(__bbegin)
|
||||
.pc = $80d "Program"
|
||||
.label SPRITES_XPOS = $d000
|
||||
.label SPRITES_YPOS = $d001
|
||||
@ -21,18 +21,31 @@
|
||||
// Location of screen & sprites
|
||||
.label SCREEN = $400
|
||||
.label SPRITE = $2000
|
||||
// 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 = SCREEN+$3f8
|
||||
// The MSB bit of the next sprite to use for showing
|
||||
.label plex_sprite_msb = 6
|
||||
// The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown.
|
||||
.label plex_free_next = 3
|
||||
// The index the next sprite to use for showing (sprites are used round-robin)
|
||||
.label plex_sprite_idx = 4
|
||||
.label plex_show_idx = 6
|
||||
.label plex_sprite_idx = 7
|
||||
.label plex_sprite_msb = 8
|
||||
.label plex_free_next = 9
|
||||
__bbegin:
|
||||
// plex_show_idx=0
|
||||
// The index in the PLEX tables of the next sprite to show
|
||||
// Prepare for showing the sprites
|
||||
.label plex_show_idx = 5
|
||||
lda #0
|
||||
sta.z plex_show_idx
|
||||
// plex_sprite_idx=0
|
||||
// The index the next sprite to use for showing (sprites are used round-robin)
|
||||
sta.z plex_sprite_idx
|
||||
// plex_sprite_msb=1
|
||||
// The MSB bit of the next sprite to use for showing
|
||||
lda #1
|
||||
sta.z plex_sprite_msb
|
||||
// plex_free_next = 0
|
||||
// The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown.
|
||||
lda #0
|
||||
sta.z plex_free_next
|
||||
// kickasm
|
||||
jsr main
|
||||
rts
|
||||
main: {
|
||||
// asm
|
||||
sei
|
||||
@ -48,7 +61,7 @@ loop: {
|
||||
// The current index into the y-sinus
|
||||
.label sin_idx = 2
|
||||
.label plexFreeNextYpos1_return = $a
|
||||
.label ss = 7
|
||||
.label ss = 3
|
||||
lda #0
|
||||
sta.z sin_idx
|
||||
__b2:
|
||||
@ -89,12 +102,6 @@ loop: {
|
||||
bne __b6
|
||||
lda #0
|
||||
sta.z ss
|
||||
lda #1
|
||||
sta.z plex_sprite_msb
|
||||
lda #0
|
||||
sta.z plex_show_idx
|
||||
sta.z plex_sprite_idx
|
||||
sta.z plex_free_next
|
||||
// Show the sprites
|
||||
__b7:
|
||||
// *BORDERCOL = BLACK
|
||||
@ -147,9 +154,11 @@ plexShowSprite: {
|
||||
// plex_free_next+1
|
||||
ldx.z plex_free_next
|
||||
inx
|
||||
// (plex_free_next+1)&7
|
||||
txa
|
||||
and #7
|
||||
// plex_free_next = (plex_free_next+1)&7
|
||||
lda #7
|
||||
sax.z plex_free_next
|
||||
sta.z plex_free_next
|
||||
// PLEX_SCREEN_PTR[plex_sprite_idx] = PLEX_PTR[PLEX_SORTED_IDX[plex_show_idx]]
|
||||
ldx.z plex_show_idx
|
||||
ldy PLEX_SORTED_IDX,x
|
||||
@ -171,31 +180,33 @@ plexShowSprite: {
|
||||
// if(>PLEX_XPOS[xpos_idx]!=0)
|
||||
cmp #0
|
||||
bne __b1
|
||||
// $ff^plex_sprite_msb
|
||||
// 0xff^plex_sprite_msb
|
||||
lda #$ff
|
||||
eor.z plex_sprite_msb
|
||||
// *SPRITES_XMSB &= ($ff^plex_sprite_msb)
|
||||
// *SPRITES_XMSB &= (0xff^plex_sprite_msb)
|
||||
and SPRITES_XMSB
|
||||
sta SPRITES_XMSB
|
||||
__b2:
|
||||
// plex_sprite_idx+1
|
||||
ldx.z plex_sprite_idx
|
||||
inx
|
||||
// (plex_sprite_idx+1)&7
|
||||
txa
|
||||
and #7
|
||||
// plex_sprite_idx = (plex_sprite_idx+1)&7
|
||||
lda #7
|
||||
sax.z plex_sprite_idx
|
||||
sta.z plex_sprite_idx
|
||||
// plex_show_idx++;
|
||||
inc.z plex_show_idx
|
||||
// plex_sprite_msb *=2
|
||||
// plex_sprite_msb <<=1
|
||||
asl.z plex_sprite_msb
|
||||
// if(plex_sprite_msb==0)
|
||||
lda.z plex_sprite_msb
|
||||
cmp #0
|
||||
bne __b5
|
||||
bne __breturn
|
||||
// plex_sprite_msb = 1
|
||||
lda #1
|
||||
sta.z plex_sprite_msb
|
||||
rts
|
||||
__b5:
|
||||
__breturn:
|
||||
// }
|
||||
rts
|
||||
__b1:
|
||||
@ -240,7 +251,7 @@ plexSort: {
|
||||
sta PLEX_SORTED_IDX+1,x
|
||||
// s--;
|
||||
dex
|
||||
// while((s!=$ff) && (nxt_y<PLEX_YPOS[PLEX_SORTED_IDX[s]]))
|
||||
// while((s!=0xff) && (nxt_y<PLEX_YPOS[PLEX_SORTED_IDX[s]]))
|
||||
cpx #$ff
|
||||
beq __b4
|
||||
lda.z nxt_y
|
||||
@ -259,6 +270,15 @@ plexSort: {
|
||||
lda #PLEX_COUNT-2+1
|
||||
cmp.z m
|
||||
bne __b1
|
||||
// plex_show_idx = 0
|
||||
// Prepare for showing the sprites
|
||||
lda #0
|
||||
sta.z plex_show_idx
|
||||
// plex_sprite_idx = 0
|
||||
sta.z plex_sprite_idx
|
||||
// plex_sprite_msb = 1
|
||||
lda #1
|
||||
sta.z plex_sprite_msb
|
||||
ldx #0
|
||||
plexFreePrepare1___b1:
|
||||
// PLEX_FREE_YPOS[s] = 0
|
||||
@ -268,13 +288,15 @@ plexSort: {
|
||||
inx
|
||||
cpx #8
|
||||
bne plexFreePrepare1___b1
|
||||
// plex_free_next = 0
|
||||
sta.z plex_free_next
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// Initialize the program
|
||||
init: {
|
||||
// Set the x-positions & pointers
|
||||
.label xp = 8
|
||||
.label xp = 4
|
||||
// *D011 = VIC_DEN | VIC_RSEL | 3
|
||||
lda #VIC_DEN|VIC_RSEL|3
|
||||
sta D011
|
||||
@ -340,7 +362,7 @@ plexInit: {
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// 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
|
||||
|
@ -2,219 +2,232 @@
|
||||
[0] phi()
|
||||
to:@1
|
||||
@1: scope:[] from @begin
|
||||
[1] (volatile byte) plex_show_idx ← (byte) 0
|
||||
[2] (volatile byte) plex_sprite_idx ← (byte) 0
|
||||
[3] (volatile byte) plex_sprite_msb ← (byte) 1
|
||||
to:@2
|
||||
@2: scope:[] from @1
|
||||
[4] (volatile byte) plex_free_next ← (byte) 0
|
||||
to:@3
|
||||
@3: scope:[] from @2
|
||||
kickasm(location (const byte*) SPRITE) {{ .var pic = LoadPicture("balloon.png", List().add($000000, $ffffff))
|
||||
.for (var y=0; y<21; y++)
|
||||
.for (var x=0;x<3; x++)
|
||||
.byte pic.getSinglecolorByte(x,y)
|
||||
}}
|
||||
to:@2
|
||||
@2: scope:[] from @1
|
||||
[2] phi()
|
||||
[3] call main
|
||||
to:@4
|
||||
@4: scope:[] from @3
|
||||
[6] phi()
|
||||
[7] call main
|
||||
to:@end
|
||||
@end: scope:[] from @2
|
||||
[4] phi()
|
||||
@end: scope:[] from @4
|
||||
[8] phi()
|
||||
|
||||
(void()) main()
|
||||
main: scope:[main] from @2
|
||||
main: scope:[main] from @4
|
||||
asm { sei }
|
||||
[6] call init
|
||||
[10] call init
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main
|
||||
[7] phi()
|
||||
[8] call loop
|
||||
[11] phi()
|
||||
[12] call loop
|
||||
to:main::@return
|
||||
main::@return: scope:[main] from main::@1
|
||||
[9] return
|
||||
[13] return
|
||||
to:@return
|
||||
|
||||
(void()) loop()
|
||||
loop: scope:[loop] from main::@1
|
||||
[10] phi()
|
||||
[14] phi()
|
||||
to:loop::@1
|
||||
loop::@1: scope:[loop] from loop loop::@10
|
||||
[11] (byte) loop::sin_idx#6 ← phi( loop/(byte) 0 loop::@10/(byte) loop::sin_idx#1 )
|
||||
[15] (byte) loop::sin_idx#6 ← phi( loop/(byte) 0 loop::@10/(byte) loop::sin_idx#1 )
|
||||
to:loop::@2
|
||||
loop::@2: scope:[loop] from loop::@1 loop::@2
|
||||
[12] if(*((const nomodify byte*) RASTER)!=(byte) $ff) goto loop::@2
|
||||
[16] if(*((const nomodify byte*) RASTER)!=(byte) $ff) goto loop::@2
|
||||
to:loop::@3
|
||||
loop::@3: scope:[loop] from loop::@2
|
||||
[13] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL)
|
||||
[14] (byte) loop::y_idx#4 ← (byte) loop::sin_idx#6
|
||||
[17] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL)
|
||||
[18] (byte) loop::y_idx#4 ← (byte) loop::sin_idx#6
|
||||
to:loop::@4
|
||||
loop::@4: scope:[loop] from loop::@3 loop::@4
|
||||
[15] (byte) loop::sy#2 ← phi( loop::@4/(byte) loop::sy#1 loop::@3/(byte) 0 )
|
||||
[15] (byte) loop::y_idx#2 ← phi( loop::@4/(byte) loop::y_idx#1 loop::@3/(byte) loop::y_idx#4 )
|
||||
[16] *((const byte*) PLEX_YPOS + (byte) loop::sy#2) ← *((const byte*) YSIN + (byte) loop::y_idx#2)
|
||||
[17] (byte) loop::y_idx#1 ← (byte) loop::y_idx#2 + (byte) 8
|
||||
[18] (byte) loop::sy#1 ← ++ (byte) loop::sy#2
|
||||
[19] if((byte) loop::sy#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@4
|
||||
[19] (byte) loop::sy#2 ← phi( loop::@4/(byte) loop::sy#1 loop::@3/(byte) 0 )
|
||||
[19] (byte) loop::y_idx#2 ← phi( loop::@4/(byte) loop::y_idx#1 loop::@3/(byte) loop::y_idx#4 )
|
||||
[20] *((const byte*) PLEX_YPOS + (byte) loop::sy#2) ← *((const byte*) YSIN + (byte) loop::y_idx#2)
|
||||
[21] (byte) loop::y_idx#1 ← (byte) loop::y_idx#2 + (byte) 8
|
||||
[22] (byte) loop::sy#1 ← ++ (byte) loop::sy#2
|
||||
[23] if((byte) loop::sy#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@4
|
||||
to:loop::@5
|
||||
loop::@5: scope:[loop] from loop::@4
|
||||
[20] (byte) loop::sin_idx#1 ← (byte) loop::sin_idx#6 + (byte) 1
|
||||
[21] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL)
|
||||
[22] call plexSort
|
||||
[24] (byte) loop::sin_idx#1 ← (byte) loop::sin_idx#6 + (byte) 1
|
||||
[25] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL)
|
||||
[26] call plexSort
|
||||
to:loop::@11
|
||||
loop::@11: scope:[loop] from loop::@5
|
||||
[23] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK
|
||||
[27] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK
|
||||
to:loop::@6
|
||||
loop::@6: scope:[loop] from loop::@11 loop::@6
|
||||
[24] (byte~) loop::$5 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8
|
||||
[25] if((byte~) loop::$5!=(byte) 0) goto loop::@6
|
||||
[28] (byte~) loop::$5 ← *((const nomodify byte*) D011) & (const nomodify byte) VIC_RST8
|
||||
[29] if((byte~) loop::$5!=(byte) 0) goto loop::@6
|
||||
to:loop::@7
|
||||
loop::@7: scope:[loop] from loop::@12 loop::@6
|
||||
[26] (byte) loop::ss#5 ← phi( loop::@6/(byte) 0 loop::@12/(byte) loop::ss#1 )
|
||||
[26] (byte) plex_sprite_msb#42 ← phi( loop::@6/(byte) 1 loop::@12/(byte) plex_sprite_msb#16 )
|
||||
[26] (byte) plex_show_idx#42 ← phi( loop::@6/(byte) 0 loop::@12/(byte) plex_show_idx#15 )
|
||||
[26] (byte) plex_sprite_idx#42 ← phi( loop::@6/(byte) 0 loop::@12/(byte) plex_sprite_idx#15 )
|
||||
[26] (byte) plex_free_next#17 ← phi( loop::@6/(byte) 0 loop::@12/(byte) plex_free_next#13 )
|
||||
[27] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK
|
||||
[30] (byte) loop::ss#5 ← phi( loop::@6/(byte) 0 loop::@12/(byte) loop::ss#1 )
|
||||
[31] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK
|
||||
to:loop::plexFreeNextYpos1
|
||||
loop::plexFreeNextYpos1: scope:[loop] from loop::@7
|
||||
[28] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#17)
|
||||
[32] (byte) loop::plexFreeNextYpos1_return#0 ← *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next)
|
||||
to:loop::@8
|
||||
loop::@8: scope:[loop] from loop::@8 loop::plexFreeNextYpos1
|
||||
[29] if(*((const nomodify byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@8
|
||||
[33] if(*((const nomodify byte*) RASTER)<(byte) loop::plexFreeNextYpos1_return#0) goto loop::@8
|
||||
to:loop::@9
|
||||
loop::@9: scope:[loop] from loop::@8
|
||||
[30] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL)
|
||||
[31] call plexShowSprite
|
||||
[34] *((const nomodify byte*) BORDERCOL) ← ++ *((const nomodify byte*) BORDERCOL)
|
||||
[35] call plexShowSprite
|
||||
to:loop::@12
|
||||
loop::@12: scope:[loop] from loop::@9
|
||||
[32] (byte) loop::ss#1 ← ++ (byte) loop::ss#5
|
||||
[33] if((byte) loop::ss#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7
|
||||
[36] (byte) loop::ss#1 ← ++ (byte) loop::ss#5
|
||||
[37] if((byte) loop::ss#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto loop::@7
|
||||
to:loop::@10
|
||||
loop::@10: scope:[loop] from loop::@12
|
||||
[34] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK
|
||||
[38] *((const nomodify byte*) BORDERCOL) ← (const nomodify byte) BLACK
|
||||
to:loop::@1
|
||||
|
||||
(void()) plexShowSprite()
|
||||
plexShowSprite: scope:[plexShowSprite] from loop::@9
|
||||
[35] (byte) plexShowSprite::plex_sprite_idx2#0 ← (byte) plex_sprite_idx#42 << (byte) 1
|
||||
[36] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#42))
|
||||
[37] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0
|
||||
[39] (byte) plexShowSprite::plex_sprite_idx2#0 ← (volatile byte) plex_sprite_idx << (byte) 1
|
||||
[40] (byte) plexShowSprite::plexFreeAdd1_ypos#0 ← *((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx))
|
||||
[41] *((const nomodify byte*) SPRITES_YPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte) plexShowSprite::plexFreeAdd1_ypos#0
|
||||
to:plexShowSprite::plexFreeAdd1
|
||||
plexShowSprite::plexFreeAdd1: scope:[plexShowSprite] from plexShowSprite
|
||||
[38] (byte~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + (byte) $15
|
||||
[39] *((const byte*) PLEX_FREE_YPOS + (byte) plex_free_next#17) ← (byte~) plexShowSprite::plexFreeAdd1_$0
|
||||
[40] (byte~) plexShowSprite::plexFreeAdd1_$1 ← (byte) plex_free_next#17 + (byte) 1
|
||||
[41] (byte) plex_free_next#13 ← (byte~) plexShowSprite::plexFreeAdd1_$1 & (byte) 7
|
||||
to:plexShowSprite::@4
|
||||
plexShowSprite::@4: scope:[plexShowSprite] from plexShowSprite::plexFreeAdd1
|
||||
[42] *((const byte*) PLEX_SCREEN_PTR#1 + (byte) plex_sprite_idx#42) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#42))
|
||||
[43] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (byte) plex_show_idx#42)
|
||||
[44] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1
|
||||
[45] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11)
|
||||
[46] *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$2
|
||||
[47] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11)
|
||||
[48] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1
|
||||
[42] (byte~) plexShowSprite::plexFreeAdd1_$0 ← (byte) plexShowSprite::plexFreeAdd1_ypos#0 + (byte) $15
|
||||
[43] *((const byte*) PLEX_FREE_YPOS + (volatile byte) plex_free_next) ← (byte~) plexShowSprite::plexFreeAdd1_$0
|
||||
[44] (byte~) plexShowSprite::plexFreeAdd1_$1 ← (volatile byte) plex_free_next + (byte) 1
|
||||
[45] (byte~) plexShowSprite::plexFreeAdd1_$2 ← (byte~) plexShowSprite::plexFreeAdd1_$1 & (byte) 7
|
||||
[46] (volatile byte) plex_free_next ← (byte~) plexShowSprite::plexFreeAdd1_$2
|
||||
to:plexShowSprite::@5
|
||||
plexShowSprite::@5: scope:[plexShowSprite] from plexShowSprite::plexFreeAdd1
|
||||
[47] *((const byte*) PLEX_SCREEN_PTR#1 + (volatile byte) plex_sprite_idx) ← *((const byte*) PLEX_PTR + *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx))
|
||||
[48] (byte) plexShowSprite::xpos_idx#0 ← *((const byte*) PLEX_SORTED_IDX + (volatile byte) plex_show_idx)
|
||||
[49] (byte~) plexShowSprite::$11 ← (byte) plexShowSprite::xpos_idx#0 << (byte) 1
|
||||
[50] (byte~) plexShowSprite::$2 ← < *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11)
|
||||
[51] *((const nomodify byte*) SPRITES_XPOS + (byte) plexShowSprite::plex_sprite_idx2#0) ← (byte~) plexShowSprite::$2
|
||||
[52] (byte~) plexShowSprite::$3 ← > *((const word*) PLEX_XPOS + (byte~) plexShowSprite::$11)
|
||||
[53] if((byte~) plexShowSprite::$3!=(byte) 0) goto plexShowSprite::@1
|
||||
to:plexShowSprite::@3
|
||||
plexShowSprite::@3: scope:[plexShowSprite] from plexShowSprite::@4
|
||||
[49] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (byte) plex_sprite_msb#42
|
||||
[50] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9
|
||||
plexShowSprite::@3: scope:[plexShowSprite] from plexShowSprite::@5
|
||||
[54] (byte~) plexShowSprite::$9 ← (byte) $ff ^ (volatile byte) plex_sprite_msb
|
||||
[55] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) & (byte~) plexShowSprite::$9
|
||||
to:plexShowSprite::@2
|
||||
plexShowSprite::@2: scope:[plexShowSprite] from plexShowSprite::@1 plexShowSprite::@3
|
||||
[51] (byte~) plexShowSprite::$5 ← (byte) plex_sprite_idx#42 + (byte) 1
|
||||
[52] (byte) plex_sprite_idx#15 ← (byte~) plexShowSprite::$5 & (byte) 7
|
||||
[53] (byte) plex_show_idx#15 ← ++ (byte) plex_show_idx#42
|
||||
[54] (byte) plex_sprite_msb#3 ← (byte) plex_sprite_msb#42 << (byte) 1
|
||||
[55] if((byte) plex_sprite_msb#3!=(byte) 0) goto plexShowSprite::@5
|
||||
[56] (byte~) plexShowSprite::$5 ← (volatile byte) plex_sprite_idx + (byte) 1
|
||||
[57] (byte~) plexShowSprite::$6 ← (byte~) plexShowSprite::$5 & (byte) 7
|
||||
[58] (volatile byte) plex_sprite_idx ← (byte~) plexShowSprite::$6
|
||||
[59] (volatile byte) plex_show_idx ← ++ (volatile byte) plex_show_idx
|
||||
[60] (volatile byte) plex_sprite_msb ← (volatile byte) plex_sprite_msb << (byte) 1
|
||||
[61] if((volatile byte) plex_sprite_msb!=(byte) 0) goto plexShowSprite::@return
|
||||
to:plexShowSprite::@4
|
||||
plexShowSprite::@4: scope:[plexShowSprite] from plexShowSprite::@2
|
||||
[62] (volatile byte) plex_sprite_msb ← (byte) 1
|
||||
to:plexShowSprite::@return
|
||||
plexShowSprite::@5: scope:[plexShowSprite] from plexShowSprite::@2
|
||||
[56] phi()
|
||||
to:plexShowSprite::@return
|
||||
plexShowSprite::@return: scope:[plexShowSprite] from plexShowSprite::@2 plexShowSprite::@5
|
||||
[57] (byte) plex_sprite_msb#16 ← phi( plexShowSprite::@5/(byte) plex_sprite_msb#3 plexShowSprite::@2/(byte) 1 )
|
||||
[58] return
|
||||
plexShowSprite::@return: scope:[plexShowSprite] from plexShowSprite::@2 plexShowSprite::@4
|
||||
[63] return
|
||||
to:@return
|
||||
plexShowSprite::@1: scope:[plexShowSprite] from plexShowSprite::@4
|
||||
[59] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (byte) plex_sprite_msb#42
|
||||
plexShowSprite::@1: scope:[plexShowSprite] from plexShowSprite::@5
|
||||
[64] *((const nomodify byte*) SPRITES_XMSB) ← *((const nomodify byte*) SPRITES_XMSB) | (volatile byte) plex_sprite_msb
|
||||
to:plexShowSprite::@2
|
||||
|
||||
(void()) plexSort()
|
||||
plexSort: scope:[plexSort] from loop::@5
|
||||
[60] phi()
|
||||
[65] phi()
|
||||
to:plexSort::@1
|
||||
plexSort::@1: scope:[plexSort] from plexSort plexSort::@2
|
||||
[61] (byte) plexSort::m#2 ← phi( plexSort/(byte) 0 plexSort::@2/(byte) plexSort::m#1 )
|
||||
[62] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2)
|
||||
[63] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0)
|
||||
[64] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2
|
||||
[66] (byte) plexSort::m#2 ← phi( plexSort/(byte) 0 plexSort::@2/(byte) plexSort::m#1 )
|
||||
[67] (byte) plexSort::nxt_idx#0 ← *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::m#2)
|
||||
[68] (byte) plexSort::nxt_y#0 ← *((const byte*) PLEX_YPOS + (byte) plexSort::nxt_idx#0)
|
||||
[69] if((byte) plexSort::nxt_y#0>=*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::m#2))) goto plexSort::@2
|
||||
to:plexSort::@5
|
||||
plexSort::@5: scope:[plexSort] from plexSort::@1
|
||||
[65] (byte) plexSort::s#6 ← (byte) plexSort::m#2
|
||||
[70] (byte) plexSort::s#6 ← (byte) plexSort::m#2
|
||||
to:plexSort::@3
|
||||
plexSort::@3: scope:[plexSort] from plexSort::@5 plexSort::@6
|
||||
[66] (byte) plexSort::s#3 ← phi( plexSort::@6/(byte) plexSort::s#1 plexSort::@5/(byte) plexSort::s#6 )
|
||||
[67] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3)
|
||||
[68] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3
|
||||
[69] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4
|
||||
to:plexSort::@6
|
||||
plexSort::@6: scope:[plexSort] from plexSort::@3
|
||||
[70] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3
|
||||
plexSort::@3: scope:[plexSort] from plexSort::@5 plexSort::@7
|
||||
[71] (byte) plexSort::s#3 ← phi( plexSort::@7/(byte) plexSort::s#1 plexSort::@5/(byte) plexSort::s#6 )
|
||||
[72] *((const byte*) PLEX_SORTED_IDX+(byte) 1 + (byte) plexSort::s#3) ← *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#3)
|
||||
[73] (byte) plexSort::s#1 ← -- (byte) plexSort::s#3
|
||||
[74] if((byte) plexSort::s#1==(byte) $ff) goto plexSort::@4
|
||||
to:plexSort::@7
|
||||
plexSort::@7: scope:[plexSort] from plexSort::@3
|
||||
[75] if((byte) plexSort::nxt_y#0<*((const byte*) PLEX_YPOS + *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#1))) goto plexSort::@3
|
||||
to:plexSort::@4
|
||||
plexSort::@4: scope:[plexSort] from plexSort::@3 plexSort::@6
|
||||
[71] (byte) plexSort::s#2 ← ++ (byte) plexSort::s#1
|
||||
[72] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0
|
||||
plexSort::@4: scope:[plexSort] from plexSort::@3 plexSort::@7
|
||||
[76] (byte) plexSort::s#2 ← ++ (byte) plexSort::s#1
|
||||
[77] *((const byte*) PLEX_SORTED_IDX + (byte) plexSort::s#2) ← (byte) plexSort::nxt_idx#0
|
||||
to:plexSort::@2
|
||||
plexSort::@2: scope:[plexSort] from plexSort::@1 plexSort::@4
|
||||
[73] (byte) plexSort::m#1 ← ++ (byte) plexSort::m#2
|
||||
[74] if((byte) plexSort::m#1!=(const nomodify byte) PLEX_COUNT-(byte) 2+(byte) 1) goto plexSort::@1
|
||||
[78] (byte) plexSort::m#1 ← ++ (byte) plexSort::m#2
|
||||
[79] if((byte) plexSort::m#1!=(const nomodify byte) PLEX_COUNT-(byte) 2+(byte) 1) goto plexSort::@1
|
||||
to:plexSort::@6
|
||||
plexSort::@6: scope:[plexSort] from plexSort::@2
|
||||
[80] (volatile byte) plex_show_idx ← (byte) 0
|
||||
[81] (volatile byte) plex_sprite_idx ← (byte) 0
|
||||
[82] (volatile byte) plex_sprite_msb ← (byte) 1
|
||||
to:plexSort::plexFreePrepare1
|
||||
plexSort::plexFreePrepare1: scope:[plexSort] from plexSort::@2
|
||||
[75] phi()
|
||||
plexSort::plexFreePrepare1: scope:[plexSort] from plexSort::@6
|
||||
[83] phi()
|
||||
to:plexSort::plexFreePrepare1_@1
|
||||
plexSort::plexFreePrepare1_@1: scope:[plexSort] from plexSort::plexFreePrepare1 plexSort::plexFreePrepare1_@1
|
||||
[76] (byte) plexSort::plexFreePrepare1_s#2 ← phi( plexSort::plexFreePrepare1/(byte) 0 plexSort::plexFreePrepare1_@1/(byte) plexSort::plexFreePrepare1_s#1 )
|
||||
[77] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0
|
||||
[78] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2
|
||||
[79] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1
|
||||
[84] (byte) plexSort::plexFreePrepare1_s#2 ← phi( plexSort::plexFreePrepare1/(byte) 0 plexSort::plexFreePrepare1_@1/(byte) plexSort::plexFreePrepare1_s#1 )
|
||||
[85] *((const byte*) PLEX_FREE_YPOS + (byte) plexSort::plexFreePrepare1_s#2) ← (byte) 0
|
||||
[86] (byte) plexSort::plexFreePrepare1_s#1 ← ++ (byte) plexSort::plexFreePrepare1_s#2
|
||||
[87] if((byte) plexSort::plexFreePrepare1_s#1!=(byte) 8) goto plexSort::plexFreePrepare1_@1
|
||||
to:plexSort::plexFreePrepare1_@2
|
||||
plexSort::plexFreePrepare1_@2: scope:[plexSort] from plexSort::plexFreePrepare1_@1
|
||||
[88] (volatile byte) plex_free_next ← (byte) 0
|
||||
to:plexSort::@return
|
||||
plexSort::@return: scope:[plexSort] from plexSort::plexFreePrepare1_@1
|
||||
[80] return
|
||||
plexSort::@return: scope:[plexSort] from plexSort::plexFreePrepare1_@2
|
||||
[89] return
|
||||
to:@return
|
||||
|
||||
(void()) init()
|
||||
init: scope:[init] from main
|
||||
[81] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3
|
||||
[82] call plexInit
|
||||
[90] *((const nomodify byte*) D011) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_RSEL|(byte) 3
|
||||
[91] call plexInit
|
||||
to:init::@1
|
||||
init::@1: scope:[init] from init init::@1
|
||||
[83] (word) init::xp#2 ← phi( init::@1/(word) init::xp#1 init/(word) $20 )
|
||||
[83] (byte) init::sx#2 ← phi( init::@1/(byte) init::sx#1 init/(byte) 0 )
|
||||
[84] *((const byte*) PLEX_PTR + (byte) init::sx#2) ← (byte)(const byte*) SPRITE/(byte) $40
|
||||
[85] (byte~) init::$5 ← (byte) init::sx#2 << (byte) 1
|
||||
[86] *((const word*) PLEX_XPOS + (byte~) init::$5) ← (word) init::xp#2
|
||||
[87] (word) init::xp#1 ← (word) init::xp#2 + (byte) 9
|
||||
[88] (byte) init::sx#1 ← ++ (byte) init::sx#2
|
||||
[89] if((byte) init::sx#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto init::@1
|
||||
[92] (word) init::xp#2 ← phi( init::@1/(word) init::xp#1 init/(word) $20 )
|
||||
[92] (byte) init::sx#2 ← phi( init::@1/(byte) init::sx#1 init/(byte) 0 )
|
||||
[93] *((const byte*) PLEX_PTR + (byte) init::sx#2) ← (byte)(const byte*) SPRITE/(byte) $40
|
||||
[94] (byte~) init::$5 ← (byte) init::sx#2 << (byte) 1
|
||||
[95] *((const word*) PLEX_XPOS + (byte~) init::$5) ← (word) init::xp#2
|
||||
[96] (word) init::xp#1 ← (word) init::xp#2 + (byte) 9
|
||||
[97] (byte) init::sx#1 ← ++ (byte) init::sx#2
|
||||
[98] if((byte) init::sx#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto init::@1
|
||||
to:init::@2
|
||||
init::@2: scope:[init] from init::@1
|
||||
[90] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff
|
||||
[99] *((const nomodify byte*) SPRITES_ENABLE) ← (byte) $ff
|
||||
to:init::@3
|
||||
init::@3: scope:[init] from init::@2 init::@3
|
||||
[91] (byte) init::ss#2 ← phi( init::@2/(byte) 0 init::@3/(byte) init::ss#1 )
|
||||
[92] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN
|
||||
[93] (byte) init::ss#1 ← ++ (byte) init::ss#2
|
||||
[94] if((byte) init::ss#1!=(byte) 8) goto init::@3
|
||||
[100] (byte) init::ss#2 ← phi( init::@2/(byte) 0 init::@3/(byte) init::ss#1 )
|
||||
[101] *((const nomodify byte*) SPRITES_COLS + (byte) init::ss#2) ← (const nomodify byte) GREEN
|
||||
[102] (byte) init::ss#1 ← ++ (byte) init::ss#2
|
||||
[103] if((byte) init::ss#1!=(byte) 8) goto init::@3
|
||||
to:init::@return
|
||||
init::@return: scope:[init] from init::@3
|
||||
[95] return
|
||||
[104] return
|
||||
to:@return
|
||||
|
||||
(void()) plexInit((byte*) plexInit::screen)
|
||||
plexInit: scope:[plexInit] from init
|
||||
[96] phi()
|
||||
[105] phi()
|
||||
to:plexInit::plexSetScreen1
|
||||
plexInit::plexSetScreen1: scope:[plexInit] from plexInit
|
||||
[97] phi()
|
||||
[106] phi()
|
||||
to:plexInit::@1
|
||||
plexInit::@1: scope:[plexInit] from plexInit::@1 plexInit::plexSetScreen1
|
||||
[98] (byte) plexInit::i#2 ← phi( plexInit::@1/(byte) plexInit::i#1 plexInit::plexSetScreen1/(byte) 0 )
|
||||
[99] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2
|
||||
[100] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2
|
||||
[101] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1
|
||||
[107] (byte) plexInit::i#2 ← phi( plexInit::@1/(byte) plexInit::i#1 plexInit::plexSetScreen1/(byte) 0 )
|
||||
[108] *((const byte*) PLEX_SORTED_IDX + (byte) plexInit::i#2) ← (byte) plexInit::i#2
|
||||
[109] (byte) plexInit::i#1 ← ++ (byte) plexInit::i#2
|
||||
[110] if((byte) plexInit::i#1!=(const nomodify byte) PLEX_COUNT-(byte) 1+(byte) 1) goto plexInit::@1
|
||||
to:plexInit::@return
|
||||
plexInit::@return: scope:[plexInit] from plexInit::@1
|
||||
[102] return
|
||||
[111] return
|
||||
to:@return
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,7 @@
|
||||
(label) @1
|
||||
(label) @2
|
||||
(label) @3
|
||||
(label) @4
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(const nomodify byte) BLACK = (byte) 0
|
||||
@ -44,8 +46,8 @@
|
||||
(byte) init::sx#1 reg byte x 1501.5
|
||||
(byte) init::sx#2 reg byte x 800.8
|
||||
(word) init::xp
|
||||
(word) init::xp#1 xp zp[2]:8 667.3333333333334
|
||||
(word) init::xp#2 xp zp[2]:8 750.75
|
||||
(word) init::xp#1 xp zp[2]:4 667.3333333333334
|
||||
(word) init::xp#2 xp zp[2]:4 750.75
|
||||
(void()) loop()
|
||||
(byte~) loop::$5 reg byte a 20002.0
|
||||
(label) loop::@1
|
||||
@ -68,8 +70,8 @@
|
||||
(byte) loop::sin_idx#1 sin_idx zp[1]:2 133.46666666666667
|
||||
(byte) loop::sin_idx#6 sin_idx zp[1]:2 333.6666666666667
|
||||
(byte) loop::ss
|
||||
(byte) loop::ss#1 ss zp[1]:7 15001.5
|
||||
(byte) loop::ss#5 ss zp[1]:7 3333.6666666666665
|
||||
(byte) loop::ss#1 ss zp[1]:3 15001.5
|
||||
(byte) loop::ss#5 ss zp[1]:3 3333.6666666666665
|
||||
(byte) loop::sy
|
||||
(byte) loop::sy#1 reg byte y 15001.5
|
||||
(byte) loop::sy#2 reg byte y 10001.0
|
||||
@ -94,6 +96,7 @@
|
||||
(byte~) plexShowSprite::$2 reg byte a 200002.0
|
||||
(byte~) plexShowSprite::$3 reg byte a 200002.0
|
||||
(byte~) plexShowSprite::$5 reg byte x 200002.0
|
||||
(byte~) plexShowSprite::$6 reg byte a 200002.0
|
||||
(byte~) plexShowSprite::$9 reg byte a 200002.0
|
||||
(label) plexShowSprite::@1
|
||||
(label) plexShowSprite::@2
|
||||
@ -104,10 +107,11 @@
|
||||
(label) plexShowSprite::plexFreeAdd1
|
||||
(byte~) plexShowSprite::plexFreeAdd1_$0 reg byte a 200002.0
|
||||
(byte~) plexShowSprite::plexFreeAdd1_$1 reg byte x 200002.0
|
||||
(byte~) plexShowSprite::plexFreeAdd1_$2 reg byte a 200002.0
|
||||
(byte) plexShowSprite::plexFreeAdd1_ypos
|
||||
(byte) plexShowSprite::plexFreeAdd1_ypos#0 reg byte a 150001.5
|
||||
(byte) plexShowSprite::plex_sprite_idx2
|
||||
(byte) plexShowSprite::plex_sprite_idx2#0 plex_sprite_idx2 zp[1]:11 27273.0
|
||||
(byte) plexShowSprite::plex_sprite_idx2#0 plex_sprite_idx2 zp[1]:11 25000.25
|
||||
(byte) plexShowSprite::xpos_idx
|
||||
(byte) plexShowSprite::xpos_idx#0 reg byte a 200002.0
|
||||
(byte) plexShowSprite::ypos
|
||||
@ -118,6 +122,7 @@
|
||||
(label) plexSort::@4
|
||||
(label) plexSort::@5
|
||||
(label) plexSort::@6
|
||||
(label) plexSort::@7
|
||||
(label) plexSort::@return
|
||||
(byte) plexSort::m
|
||||
(byte) plexSort::m#1 m zp[1]:10 1500001.5
|
||||
@ -128,6 +133,7 @@
|
||||
(byte) plexSort::nxt_y#0 nxt_y zp[1]:12 1500000.375
|
||||
(label) plexSort::plexFreePrepare1
|
||||
(label) plexSort::plexFreePrepare1_@1
|
||||
(label) plexSort::plexFreePrepare1_@2
|
||||
(byte) plexSort::plexFreePrepare1_s
|
||||
(byte) plexSort::plexFreePrepare1_s#1 reg byte x 1500001.5
|
||||
(byte) plexSort::plexFreePrepare1_s#2 reg byte x 1500001.5
|
||||
@ -136,45 +142,38 @@
|
||||
(byte) plexSort::s#2 reg byte x 2000002.0
|
||||
(byte) plexSort::s#3 reg byte x 2.05000025E7
|
||||
(byte) plexSort::s#6 reg byte x 2000002.0
|
||||
(byte) plex_free_next
|
||||
(byte) plex_free_next#13 plex_free_next zp[1]:3 5000.090909090909
|
||||
(byte) plex_free_next#17 plex_free_next zp[1]:3 22000.4
|
||||
(byte) plex_show_idx
|
||||
(byte) plex_show_idx#15 plex_show_idx zp[1]:5 12222.444444444445
|
||||
(byte) plex_show_idx#42 plex_show_idx zp[1]:5 17083.541666666664
|
||||
(byte) plex_sprite_idx
|
||||
(byte) plex_sprite_idx#15 plex_sprite_idx zp[1]:4 11000.2
|
||||
(byte) plex_sprite_idx#42 plex_sprite_idx zp[1]:4 14091.090909090908
|
||||
(byte) plex_sprite_msb
|
||||
(byte) plex_sprite_msb#16 plex_sprite_msb zp[1]:6 22000.4
|
||||
(byte) plex_sprite_msb#3 plex_sprite_msb zp[1]:6 100001.0
|
||||
(byte) plex_sprite_msb#42 plex_sprite_msb zp[1]:6 12400.16
|
||||
(volatile byte) plex_free_next loadstore zp[1]:9 8421.236842105262
|
||||
(volatile byte) plex_show_idx loadstore zp[1]:6 10625.166666666664
|
||||
(volatile byte) plex_sprite_idx loadstore zp[1]:7 9111.266666666666
|
||||
(volatile byte) plex_sprite_msb loadstore zp[1]:8 13261.065217391304
|
||||
|
||||
zp[1]:2 [ loop::sin_idx#6 loop::sin_idx#1 ]
|
||||
reg byte x [ loop::y_idx#2 loop::y_idx#1 loop::y_idx#4 ]
|
||||
reg byte y [ loop::sy#2 loop::sy#1 ]
|
||||
zp[1]:3 [ plex_free_next#17 plex_free_next#13 ]
|
||||
zp[1]:4 [ plex_sprite_idx#42 plex_sprite_idx#15 ]
|
||||
zp[1]:5 [ plex_show_idx#42 plex_show_idx#15 ]
|
||||
zp[1]:6 [ plex_sprite_msb#42 plex_sprite_msb#16 plex_sprite_msb#3 ]
|
||||
zp[1]:7 [ loop::ss#5 loop::ss#1 ]
|
||||
zp[1]:3 [ loop::ss#5 loop::ss#1 ]
|
||||
reg byte x [ plexSort::s#3 plexSort::s#1 plexSort::s#6 ]
|
||||
reg byte x [ plexSort::plexFreePrepare1_s#2 plexSort::plexFreePrepare1_s#1 ]
|
||||
reg byte x [ init::sx#2 init::sx#1 ]
|
||||
zp[2]:8 [ init::xp#2 init::xp#1 ]
|
||||
zp[2]:4 [ init::xp#2 init::xp#1 ]
|
||||
reg byte x [ init::ss#2 init::ss#1 ]
|
||||
reg byte x [ plexInit::i#2 plexInit::i#1 ]
|
||||
zp[1]:6 [ plex_show_idx ]
|
||||
zp[1]:7 [ plex_sprite_idx ]
|
||||
zp[1]:8 [ plex_sprite_msb ]
|
||||
zp[1]:9 [ plex_free_next ]
|
||||
reg byte a [ loop::$5 ]
|
||||
zp[1]:10 [ loop::plexFreeNextYpos1_return#0 plexSort::m#2 plexSort::m#1 ]
|
||||
reg byte a [ plexShowSprite::plexFreeAdd1_ypos#0 ]
|
||||
reg byte a [ plexShowSprite::plexFreeAdd1_$0 ]
|
||||
reg byte x [ plexShowSprite::plexFreeAdd1_$1 ]
|
||||
reg byte a [ plexShowSprite::plexFreeAdd1_$2 ]
|
||||
reg byte a [ plexShowSprite::xpos_idx#0 ]
|
||||
reg byte x [ plexShowSprite::$11 ]
|
||||
reg byte a [ plexShowSprite::$2 ]
|
||||
reg byte a [ plexShowSprite::$3 ]
|
||||
reg byte a [ plexShowSprite::$9 ]
|
||||
reg byte x [ plexShowSprite::$5 ]
|
||||
reg byte a [ plexShowSprite::$6 ]
|
||||
zp[1]:11 [ plexSort::nxt_idx#0 plexShowSprite::plex_sprite_idx2#0 ]
|
||||
zp[1]:12 [ plexSort::nxt_y#0 ]
|
||||
reg byte x [ plexSort::s#2 ]
|
||||
|
@ -256,7 +256,7 @@ init: {
|
||||
sta KERNEL_IRQ
|
||||
lda #>plex_irq
|
||||
sta KERNEL_IRQ+1
|
||||
// *VIC_CONTROL &=0x7f
|
||||
// *VIC_CONTROL &= 0x7f
|
||||
lda #$7f
|
||||
and VIC_CONTROL
|
||||
sta VIC_CONTROL
|
||||
@ -314,7 +314,7 @@ plex_irq: {
|
||||
lda.z plex_show_idx
|
||||
cmp #PLEX_COUNT
|
||||
bcc __b1
|
||||
// *RASTER = 0
|
||||
// *RASTER = 0x0
|
||||
lda #0
|
||||
sta RASTER
|
||||
// framedone = true
|
||||
|
@ -3942,7 +3942,7 @@ init: {
|
||||
sta KERNEL_IRQ
|
||||
lda #>plex_irq
|
||||
sta KERNEL_IRQ+1
|
||||
// *VIC_CONTROL &=0x7f
|
||||
// *VIC_CONTROL &= 0x7f
|
||||
// [73] *((const nomodify byte*) VIC_CONTROL) ← *((const nomodify byte*) VIC_CONTROL) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2
|
||||
lda #$7f
|
||||
and VIC_CONTROL
|
||||
@ -4036,7 +4036,7 @@ plex_irq: {
|
||||
cmp #PLEX_COUNT
|
||||
bcc __b1
|
||||
// plex_irq::@5
|
||||
// *RASTER = 0
|
||||
// *RASTER = 0x0
|
||||
// [94] *((const nomodify byte*) RASTER) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
||||
lda #0
|
||||
sta RASTER
|
||||
|
Loading…
x
Reference in New Issue
Block a user