mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2025-02-19 23:29:06 +00:00
ecs: fold common subroutines, align/page crossing
This commit is contained in:
parent
a87dbf03cf
commit
349c45d7c0
@ -237,7 +237,6 @@ export class ECSCompiler extends Tokenizer {
|
|||||||
// TODO: include modifiers in error msg
|
// TODO: include modifiers in error msg
|
||||||
const select = this.expectTokens(SELECT_TYPE).str as SelectType; // TODO: type check?
|
const select = this.expectTokens(SELECT_TYPE).str as SelectType; // TODO: type check?
|
||||||
const all_modifiers = ['critical','asc','desc']; // TODO
|
const all_modifiers = ['critical','asc','desc']; // TODO
|
||||||
const modifiers = this.parseModifiers(all_modifiers);
|
|
||||||
let query = undefined;
|
let query = undefined;
|
||||||
let join = undefined;
|
let join = undefined;
|
||||||
if (select == 'once') {
|
if (select == 'once') {
|
||||||
@ -253,12 +252,18 @@ export class ECSCompiler extends Tokenizer {
|
|||||||
if (!query) { this.compileError(`A "${select}" query can't include a limit.`); }
|
if (!query) { this.compileError(`A "${select}" query can't include a limit.`); }
|
||||||
else query.limit = this.expectInteger();
|
else query.limit = this.expectInteger();
|
||||||
}
|
}
|
||||||
|
const modifiers = this.parseModifiers(all_modifiers);
|
||||||
|
let fitbytes = undefined;
|
||||||
|
if (this.ifToken('fit')) {
|
||||||
|
fitbytes = this.expectInteger();
|
||||||
|
}
|
||||||
let context : ActionContext = { scope: null, system };
|
let context : ActionContext = { scope: null, system };
|
||||||
|
// parse --- code ---
|
||||||
let text = this.parseCode(context);
|
let text = this.parseCode(context);
|
||||||
let direction = undefined;
|
let direction = undefined;
|
||||||
if (modifiers['asc']) direction = 'asc';
|
if (modifiers['asc']) direction = 'asc';
|
||||||
else if (modifiers['desc']) direction = 'desc';
|
else if (modifiers['desc']) direction = 'desc';
|
||||||
let action = { text, event, query, join, select, direction };
|
let action = { text, event, query, join, select, direction, fitbytes };
|
||||||
if (modifiers['critical']) (action as ActionWithJoin).critical = true;
|
if (modifiers['critical']) (action as ActionWithJoin).critical = true;
|
||||||
return action as ActionWithJoin;
|
return action as ActionWithJoin;
|
||||||
}
|
}
|
||||||
|
@ -125,6 +125,7 @@ export interface ActionBase extends SourceLocated {
|
|||||||
event: string;
|
event: string;
|
||||||
text: string;
|
text: string;
|
||||||
critical?: boolean;
|
critical?: boolean;
|
||||||
|
fitbytes?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ActionOnce extends ActionBase {
|
export interface ActionOnce extends ActionBase {
|
||||||
@ -297,12 +298,6 @@ export class Dialect_CA65 {
|
|||||||
datasymbol(component: ComponentType, field: DataField, eid: number, bitofs: number) {
|
datasymbol(component: ComponentType, field: DataField, eid: number, bitofs: number) {
|
||||||
return `${component.name}_${field.name}_e${eid}_b${bitofs}`;
|
return `${component.name}_${field.name}_e${eid}_b${bitofs}`;
|
||||||
}
|
}
|
||||||
code() {
|
|
||||||
return `.code\n`;
|
|
||||||
}
|
|
||||||
bss() {
|
|
||||||
return `.bss\n`;
|
|
||||||
}
|
|
||||||
debug_file(path: string) {
|
debug_file(path: string) {
|
||||||
return `.dbg file, "${path}", 0, 0`
|
return `.dbg file, "${path}", 0, 0`
|
||||||
}
|
}
|
||||||
@ -316,6 +311,22 @@ export class Dialect_CA65 {
|
|||||||
return `.endscope\n${name}__Start = ${name}::__Start`
|
return `.endscope\n${name}__Start = ${name}::__Start`
|
||||||
// TODO: scope__start = scope::start
|
// TODO: scope__start = scope::start
|
||||||
}
|
}
|
||||||
|
align(value: number) {
|
||||||
|
return `.align ${value}`;
|
||||||
|
}
|
||||||
|
alignSegmentStart() {
|
||||||
|
return this.label('__ALIGNORIGIN');
|
||||||
|
}
|
||||||
|
warningIfMoreThan(bytes: number, startlabel: string) {
|
||||||
|
return `
|
||||||
|
.assert (* - ${startlabel}) <= ${bytes}, error, "${startlabel} does not fit in ${bytes} bytes!"`
|
||||||
|
}
|
||||||
|
alignIfLessThan(bytes: number) {
|
||||||
|
return `
|
||||||
|
.if <(* - __ALIGNORIGIN) > 256-${bytes}
|
||||||
|
.align $100
|
||||||
|
.endif`
|
||||||
|
}
|
||||||
segment(segtype: 'rodata' | 'bss' | 'code') {
|
segment(segtype: 'rodata' | 'bss' | 'code') {
|
||||||
if (segtype == 'bss') {
|
if (segtype == 'bss') {
|
||||||
return `.zeropage`;
|
return `.zeropage`;
|
||||||
@ -590,6 +601,7 @@ class ActionEval {
|
|||||||
entities : Entity[];
|
entities : Entity[];
|
||||||
tmplabel = '';
|
tmplabel = '';
|
||||||
label : string;
|
label : string;
|
||||||
|
//used = new Set<string>(); // TODO
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
readonly scope: EntityScope,
|
readonly scope: EntityScope,
|
||||||
@ -842,6 +854,7 @@ class ActionEval {
|
|||||||
__arg(args: string[]) {
|
__arg(args: string[]) {
|
||||||
let argindex = parseInt(args[0] || '0');
|
let argindex = parseInt(args[0] || '0');
|
||||||
let argvalue = this.eventargs[argindex] || '';
|
let argvalue = this.eventargs[argindex] || '';
|
||||||
|
//this.used.add(`arg_${argindex}_${argvalue}`);
|
||||||
return argvalue;
|
return argvalue;
|
||||||
}
|
}
|
||||||
__bss_init(args: string[]) {
|
__bss_init(args: string[]) {
|
||||||
@ -996,6 +1009,22 @@ class ActionEval {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
isSubroutineSized(code: string) {
|
||||||
|
// TODO?
|
||||||
|
if (code.length > 20000) return false;
|
||||||
|
if (code.split('.dbg line').length >= 4) return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class EventCodeStats {
|
||||||
|
constructor(
|
||||||
|
public readonly inst: SystemInstance,
|
||||||
|
public readonly action: Action,
|
||||||
|
public readonly code: string,
|
||||||
|
public readonly symbol: string,
|
||||||
|
) { }
|
||||||
|
count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class EntityScope implements SourceLocated {
|
export class EntityScope implements SourceLocated {
|
||||||
@ -1009,12 +1038,15 @@ export class EntityScope implements SourceLocated {
|
|||||||
rodata = new ConstDataSegment();
|
rodata = new ConstDataSegment();
|
||||||
code = new CodeSegment();
|
code = new CodeSegment();
|
||||||
componentsInScope = new Set();
|
componentsInScope = new Set();
|
||||||
eventSeq = 0;
|
|
||||||
resources = new Set<string>();
|
resources = new Set<string>();
|
||||||
state = new ActionCPUState();
|
state = new ActionCPUState();
|
||||||
isDemo = false;
|
isDemo = false;
|
||||||
filePath = '';
|
filePath = '';
|
||||||
|
|
||||||
|
eventSeq : number;
|
||||||
|
eventStats : { [key:string] : EventCodeStats };
|
||||||
|
inCritical = 0;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public readonly em: EntityManager,
|
public readonly em: EntityManager,
|
||||||
public readonly dialect: Dialect_CA65,
|
public readonly dialect: Dialect_CA65,
|
||||||
@ -1276,7 +1308,7 @@ export class EntityScope implements SourceLocated {
|
|||||||
}
|
}
|
||||||
this.eventSeq++;
|
this.eventSeq++;
|
||||||
// generate code
|
// generate code
|
||||||
let code = this.dialect.code() + '\n';
|
let code = '';
|
||||||
if (codelabel) { code += this.dialect.label(codelabel) + '\n'; }
|
if (codelabel) { code += this.dialect.label(codelabel) + '\n'; }
|
||||||
let eventCount = 0;
|
let eventCount = 0;
|
||||||
let instances = this.instances.filter(inst => systems.includes(inst.system));
|
let instances = this.instances.filter(inst => systems.includes(inst.system));
|
||||||
@ -1289,23 +1321,22 @@ export class EntityScope implements SourceLocated {
|
|||||||
// TODO: keep event tree
|
// TODO: keep event tree
|
||||||
let codeeval = new ActionEval(this, inst, action, args || []);
|
let codeeval = new ActionEval(this, inst, action, args || []);
|
||||||
codeeval.begin();
|
codeeval.begin();
|
||||||
|
if (action.critical) this.inCritical++;
|
||||||
|
let eventcode = codeeval.codeToString();
|
||||||
|
if (action.critical) this.inCritical--;
|
||||||
|
if (!this.inCritical && codeeval.isSubroutineSized(eventcode)) {
|
||||||
|
// TODO: label rewriting messes this up
|
||||||
|
let estats = this.eventStats[eventcode];
|
||||||
|
if (!estats) {
|
||||||
|
estats = this.eventStats[eventcode] = new EventCodeStats(
|
||||||
|
inst, action, eventcode, codeeval.label);
|
||||||
|
}
|
||||||
|
estats.count++;
|
||||||
|
if (action.critical) estats.count++; // always make critical event subroutines
|
||||||
|
}
|
||||||
let s = '';
|
let s = '';
|
||||||
s += this.dialect.comment(`start action ${sys.name} ${inst.id} ${event}`); // TODO
|
s += this.dialect.comment(`start action ${sys.name} ${inst.id} ${event}`); // TODO
|
||||||
if (action.critical) {
|
s += eventcode;
|
||||||
// TODO: bin-packing, share identical code
|
|
||||||
let sublabel = `${codeeval.label}__sub`;
|
|
||||||
let lines = [
|
|
||||||
this.dialect.segment('rodata'),
|
|
||||||
this.dialect.label(sublabel),
|
|
||||||
codeeval.codeToString(),
|
|
||||||
this.dialect.return(),
|
|
||||||
this.dialect.code(),
|
|
||||||
this.dialect.call(sublabel)
|
|
||||||
];
|
|
||||||
s += lines.join('\n');
|
|
||||||
} else {
|
|
||||||
s += codeeval.codeToString();
|
|
||||||
}
|
|
||||||
s += this.dialect.comment(`end action ${sys.name} ${inst.id} ${event}`);
|
s += this.dialect.comment(`end action ${sys.name} ${inst.id} ${event}`);
|
||||||
code += s;
|
code += s;
|
||||||
// TODO: check that this happens once?
|
// TODO: check that this happens once?
|
||||||
@ -1378,6 +1409,8 @@ export class EntityScope implements SourceLocated {
|
|||||||
this.allocateROData(this.rodata);
|
this.allocateROData(this.rodata);
|
||||||
}
|
}
|
||||||
private generateCode() {
|
private generateCode() {
|
||||||
|
this.eventSeq = 0;
|
||||||
|
this.eventStats = {};
|
||||||
let isMainScope = this.parent == null;
|
let isMainScope = this.parent == null;
|
||||||
let start;
|
let start;
|
||||||
let initsys = this.em.getSystemByName('Init');
|
let initsys = this.em.getSystemByName('Init');
|
||||||
@ -1387,6 +1420,7 @@ export class EntityScope implements SourceLocated {
|
|||||||
} else {
|
} else {
|
||||||
start = this.generateCodeForEvent('start');
|
start = this.generateCodeForEvent('start');
|
||||||
}
|
}
|
||||||
|
start = this.replaceSubroutines(start);
|
||||||
this.code.addCodeFragment(start);
|
this.code.addCodeFragment(start);
|
||||||
for (let sub of Array.from(this.resources.values())) {
|
for (let sub of Array.from(this.resources.values())) {
|
||||||
if (!this.getSystemInstanceNamed(sub)) {
|
if (!this.getSystemInstanceNamed(sub)) {
|
||||||
@ -1395,10 +1429,40 @@ export class EntityScope implements SourceLocated {
|
|||||||
this.newSystemInstanceWithDefaults(sys);
|
this.newSystemInstanceWithDefaults(sys);
|
||||||
}
|
}
|
||||||
let code = this.generateCodeForEvent(sub, [], sub);
|
let code = this.generateCodeForEvent(sub, [], sub);
|
||||||
this.code.addCodeFragment(code);
|
this.code.addCodeFragment(code); // TODO: should be rodata?
|
||||||
}
|
}
|
||||||
//this.showStats();
|
//this.showStats();
|
||||||
}
|
}
|
||||||
|
replaceSubroutines(code: string) {
|
||||||
|
// TODO: bin-packing for critical code
|
||||||
|
let allsubs : string[] = [];
|
||||||
|
for (let stats of Object.values(this.eventStats)) {
|
||||||
|
if (stats.count > 1) {
|
||||||
|
if (allsubs.length == 0) {
|
||||||
|
allsubs = [
|
||||||
|
this.dialect.segment('rodata'),
|
||||||
|
this.dialect.alignSegmentStart()
|
||||||
|
]
|
||||||
|
} else if (stats.action.fitbytes) {
|
||||||
|
allsubs.push(this.dialect.alignIfLessThan(stats.action.fitbytes));
|
||||||
|
}
|
||||||
|
code = (code as any).replaceAll(stats.code, this.dialect.call(stats.symbol));
|
||||||
|
let substart = stats.symbol;
|
||||||
|
let sublines = [
|
||||||
|
this.dialect.segment('rodata'),
|
||||||
|
this.dialect.label(substart),
|
||||||
|
stats.code,
|
||||||
|
this.dialect.return(),
|
||||||
|
];
|
||||||
|
if (stats.action.fitbytes) {
|
||||||
|
sublines.push(this.dialect.warningIfMoreThan(stats.action.fitbytes, substart));
|
||||||
|
}
|
||||||
|
allsubs = allsubs.concat(sublines);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
code += allsubs.join('\n');
|
||||||
|
return code;
|
||||||
|
}
|
||||||
showStats() {
|
showStats() {
|
||||||
for (let inst of this.instances) {
|
for (let inst of this.instances) {
|
||||||
// TODO?
|
// TODO?
|
||||||
|
@ -7,8 +7,6 @@ Xpos_x_b0:
|
|||||||
.res 1
|
.res 1
|
||||||
.code
|
.code
|
||||||
__Start:
|
__Start:
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action move 1 start
|
;;; start action move 1 start
|
||||||
|
|
||||||
|
@ -48,8 +48,6 @@ Main__INITDATA:
|
|||||||
.byte 36
|
.byte 36
|
||||||
.byte 86
|
.byte 86
|
||||||
__Start:
|
__Start:
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Init 9 main_init
|
;;; start action Init 9 main_init
|
||||||
|
|
||||||
@ -67,15 +65,11 @@ __BRK:
|
|||||||
dey
|
dey
|
||||||
bne :-
|
bne :-
|
||||||
; initialize data segment
|
; initialize data segment
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action FrameLoop 1 start
|
;;; start action FrameLoop 1 start
|
||||||
|
|
||||||
FrameLoop__start__2__NextFrame:
|
FrameLoop__start__2__NextFrame:
|
||||||
FRAME_START
|
FRAME_START
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Kernel6Digit 2 preframe
|
;;; start action Kernel6Digit 2 preframe
|
||||||
|
|
||||||
@ -128,8 +122,6 @@ Kernel6Digit__preframe__3__Loop:
|
|||||||
;;; end action Kernel6Digit 2 preframe
|
;;; end action Kernel6Digit 2 preframe
|
||||||
|
|
||||||
KERNEL_START
|
KERNEL_START
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Kernel6Digit 2 kernel
|
;;; start action Kernel6Digit 2 kernel
|
||||||
|
|
||||||
@ -222,8 +214,6 @@ Kernel6Digit__kernel__5__BigLoop:
|
|||||||
Kernel2Digit__kernel__7__Loop:
|
Kernel2Digit__kernel__7__Loop:
|
||||||
ldx #0
|
ldx #0
|
||||||
sta WSYNC
|
sta WSYNC
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Kernel2Digit 4 compute2digit
|
;;; start action Kernel2Digit 4 compute2digit
|
||||||
|
|
||||||
@ -236,8 +226,6 @@ Kernel2Digit__kernel__7__Loop:
|
|||||||
asl
|
asl
|
||||||
asl
|
asl
|
||||||
asl
|
asl
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Kernel2Digit 4 fetchdigit
|
;;; start action Kernel2Digit 4 fetchdigit
|
||||||
|
|
||||||
@ -256,8 +244,6 @@ Kernel2Digit__kernel__7__Loop:
|
|||||||
and #$f0
|
and #$f0
|
||||||
lsr
|
lsr
|
||||||
sty PF1 ; store 2nd pf
|
sty PF1 ; store 2nd pf
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Kernel2Digit 4 fetchdigit
|
;;; start action Kernel2Digit 4 fetchdigit
|
||||||
|
|
||||||
@ -275,8 +261,6 @@ Kernel2Digit__kernel__7__Loop:
|
|||||||
;;; end action Kernel2Digit 4 compute2digit
|
;;; end action Kernel2Digit 4 compute2digit
|
||||||
|
|
||||||
inx
|
inx
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Kernel2Digit 4 compute2digit
|
;;; start action Kernel2Digit 4 compute2digit
|
||||||
|
|
||||||
@ -289,8 +273,6 @@ Kernel2Digit__kernel__7__Loop:
|
|||||||
asl
|
asl
|
||||||
asl
|
asl
|
||||||
asl
|
asl
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Kernel2Digit 4 fetchdigit
|
;;; start action Kernel2Digit 4 fetchdigit
|
||||||
|
|
||||||
@ -309,8 +291,6 @@ Kernel2Digit__kernel__7__Loop:
|
|||||||
and #$f0
|
and #$f0
|
||||||
lsr
|
lsr
|
||||||
sty PF1 ; store 2nd pf
|
sty PF1 ; store 2nd pf
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Kernel2Digit 4 fetchdigit
|
;;; start action Kernel2Digit 4 fetchdigit
|
||||||
|
|
||||||
@ -336,20 +316,14 @@ Kernel2Digit__kernel__7__Loop:
|
|||||||
;;; end action Kernel2Digit 4 kernel
|
;;; end action Kernel2Digit 4 kernel
|
||||||
|
|
||||||
KERNEL_END
|
KERNEL_END
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action JoyButton 6 postframe
|
;;; start action JoyButton 6 postframe
|
||||||
|
|
||||||
lda INPT4 ;read button input
|
lda INPT4 ;read button input
|
||||||
bmi JoyButton__postframe__14__NotPressed
|
bmi JoyButton__postframe__14__NotPressed
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action IncScore 8 joybutton
|
;;; start action IncScore 8 joybutton
|
||||||
|
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action BCDMath 7 AddBCD4
|
;;; start action BCDMath 7 AddBCD4
|
||||||
|
|
||||||
@ -382,8 +356,6 @@ JoyButton__postframe__14__NotPressed:
|
|||||||
;;; end action JoyButton 6 postframe
|
;;; end action JoyButton 6 postframe
|
||||||
|
|
||||||
FRAME_END
|
FRAME_END
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
jmp FrameLoop__start__2__NextFrame ; loop to next frame
|
jmp FrameLoop__start__2__NextFrame ; loop to next frame
|
||||||
|
|
||||||
@ -397,8 +369,6 @@ VecBRK: .word Main::__BRK
|
|||||||
|
|
||||||
;;; end action Init 9 main_init
|
;;; end action Init 9 main_init
|
||||||
|
|
||||||
.code
|
|
||||||
|
|
||||||
FontTable:
|
FontTable:
|
||||||
|
|
||||||
;;; start action FontTable 3 FontTable
|
;;; start action FontTable 3 FontTable
|
||||||
@ -413,8 +383,6 @@ FontTable:
|
|||||||
|
|
||||||
;;; end action FontTable 3 FontTable
|
;;; end action FontTable 3 FontTable
|
||||||
|
|
||||||
.code
|
|
||||||
|
|
||||||
FontTablePF:
|
FontTablePF:
|
||||||
|
|
||||||
;;; start action FontTablePF 5 FontTablePF
|
;;; start action FontTablePF 5 FontTablePF
|
||||||
|
@ -115,8 +115,6 @@ Main__INITDATA:
|
|||||||
.byte 2
|
.byte 2
|
||||||
.byte 3
|
.byte 3
|
||||||
__Start:
|
__Start:
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Init 10 main_init
|
;;; start action Init 10 main_init
|
||||||
|
|
||||||
@ -134,15 +132,11 @@ __BRK:
|
|||||||
dey
|
dey
|
||||||
bne :-
|
bne :-
|
||||||
; initialize data segment
|
; initialize data segment
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action FrameLoop 1 start
|
;;; start action FrameLoop 1 start
|
||||||
|
|
||||||
FrameLoop__start__2__NextFrame:
|
FrameLoop__start__2__NextFrame:
|
||||||
FRAME_START
|
FRAME_START
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Kernel2Sprite 2 preframe
|
;;; start action Kernel2Sprite 2 preframe
|
||||||
|
|
||||||
@ -256,8 +250,6 @@ SetXPos__preframe__9____each:
|
|||||||
ldx SpriteSlot_sprite_b0,y
|
ldx SpriteSlot_sprite_b0,y
|
||||||
|
|
||||||
lda HasXpos_xpos_b0,x
|
lda HasXpos_xpos_b0,x
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action SetHorizPos 7 SetHorizPos
|
;;; start action SetHorizPos 7 SetHorizPos
|
||||||
|
|
||||||
@ -300,8 +292,6 @@ SetXPos__preframe__9____exit:
|
|||||||
;;; end action SetXPos 6 preframe
|
;;; end action SetXPos 6 preframe
|
||||||
|
|
||||||
KERNEL_START
|
KERNEL_START
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Kernel2Sprite 2 kernel
|
;;; start action Kernel2Sprite 2 kernel
|
||||||
|
|
||||||
@ -316,8 +306,6 @@ SetXPos__preframe__9____exit:
|
|||||||
|
|
||||||
ldy #192
|
ldy #192
|
||||||
Kernel2Sprite__kernel__14__LVScan:
|
Kernel2Sprite__kernel__14__LVScan:
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Kernel2Sprite 2 scanline
|
;;; start action Kernel2Sprite 2 scanline
|
||||||
|
|
||||||
@ -354,8 +342,6 @@ Kernel2Sprite__scanline__15__DoDraw2:
|
|||||||
;;; end action Kernel2Sprite 2 scanline
|
;;; end action Kernel2Sprite 2 scanline
|
||||||
|
|
||||||
dey ; next scanline
|
dey ; next scanline
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Kernel2Sprite 2 scanline
|
;;; start action Kernel2Sprite 2 scanline
|
||||||
|
|
||||||
@ -407,8 +393,6 @@ Kernel2Sprite__scanline__17__DoDraw2:
|
|||||||
;;; end action Kernel2Sprite 2 kernel
|
;;; end action Kernel2Sprite 2 kernel
|
||||||
|
|
||||||
KERNEL_END
|
KERNEL_END
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Joystick 3 postframe
|
;;; start action Joystick 3 postframe
|
||||||
|
|
||||||
@ -425,8 +409,6 @@ Joystick__postframe__21____each:
|
|||||||
|
|
||||||
asl Joystick__3__tmp+0
|
asl Joystick__3__tmp+0
|
||||||
bcs Joystick__postframe__21__SkipMoveRight
|
bcs Joystick__postframe__21__SkipMoveRight
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action MoveJoyX 4 joyright
|
;;; start action MoveJoyX 4 joyright
|
||||||
|
|
||||||
@ -443,8 +425,6 @@ MoveJoyX__joyright__22__nomove:
|
|||||||
Joystick__postframe__21__SkipMoveRight:
|
Joystick__postframe__21__SkipMoveRight:
|
||||||
asl Joystick__3__tmp+0
|
asl Joystick__3__tmp+0
|
||||||
bcs Joystick__postframe__21__SkipMoveLeft
|
bcs Joystick__postframe__21__SkipMoveLeft
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action MoveJoyX 4 joyleft
|
;;; start action MoveJoyX 4 joyleft
|
||||||
|
|
||||||
@ -460,8 +440,6 @@ MoveJoyX__joyleft__23__nomove:
|
|||||||
Joystick__postframe__21__SkipMoveLeft:
|
Joystick__postframe__21__SkipMoveLeft:
|
||||||
asl Joystick__3__tmp+0
|
asl Joystick__3__tmp+0
|
||||||
bcs Joystick__postframe__21__SkipMoveDown
|
bcs Joystick__postframe__21__SkipMoveDown
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action MoveJoyY 5 joydown
|
;;; start action MoveJoyY 5 joydown
|
||||||
|
|
||||||
@ -478,8 +456,6 @@ MoveJoyY__joydown__24__nomove:
|
|||||||
Joystick__postframe__21__SkipMoveDown:
|
Joystick__postframe__21__SkipMoveDown:
|
||||||
asl Joystick__3__tmp+0
|
asl Joystick__3__tmp+0
|
||||||
bcs Joystick__postframe__21__SkipMoveUp
|
bcs Joystick__postframe__21__SkipMoveUp
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action MoveJoyY 5 joyup
|
;;; start action MoveJoyY 5 joyup
|
||||||
|
|
||||||
@ -559,8 +535,6 @@ SpriteHider__postframe__28____exit:
|
|||||||
;;; end action SpriteHider 9 postframe
|
;;; end action SpriteHider 9 postframe
|
||||||
|
|
||||||
FRAME_END
|
FRAME_END
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
jmp FrameLoop__start__2__NextFrame ; loop to next frame
|
jmp FrameLoop__start__2__NextFrame ; loop to next frame
|
||||||
|
|
||||||
|
@ -115,8 +115,6 @@ Main__INITDATA:
|
|||||||
.byte 0
|
.byte 0
|
||||||
.byte 0
|
.byte 0
|
||||||
__Start:
|
__Start:
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Init 10 main_init
|
;;; start action Init 10 main_init
|
||||||
|
|
||||||
@ -134,15 +132,11 @@ __BRK:
|
|||||||
dey
|
dey
|
||||||
bne :-
|
bne :-
|
||||||
; initialize data segment
|
; initialize data segment
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action FrameLoop 1 start
|
;;; start action FrameLoop 1 start
|
||||||
|
|
||||||
FrameLoop__start__2__NextFrame:
|
FrameLoop__start__2__NextFrame:
|
||||||
FRAME_START
|
FRAME_START
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Kernel2Sprite 2 preframe
|
;;; start action Kernel2Sprite 2 preframe
|
||||||
|
|
||||||
@ -241,8 +235,6 @@ SetXPos__preframe__9____each:
|
|||||||
ldx SpriteSlot_sprite_b0,y
|
ldx SpriteSlot_sprite_b0,y
|
||||||
|
|
||||||
lda HasXpos_xpos_b0,x
|
lda HasXpos_xpos_b0,x
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action SetHorizPos 7 SetHorizPos
|
;;; start action SetHorizPos 7 SetHorizPos
|
||||||
|
|
||||||
@ -285,8 +277,6 @@ SetXPos__preframe__9____exit:
|
|||||||
;;; end action SetXPos 6 preframe
|
;;; end action SetXPos 6 preframe
|
||||||
|
|
||||||
KERNEL_START
|
KERNEL_START
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Kernel2Sprite 2 kernel
|
;;; start action Kernel2Sprite 2 kernel
|
||||||
|
|
||||||
@ -332,8 +322,6 @@ DoDraw2:
|
|||||||
|
|
||||||
ldy #192
|
ldy #192
|
||||||
Kernel2Sprite__kernel__14__LVScan:
|
Kernel2Sprite__kernel__14__LVScan:
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Kernel2Sprite 2 scanline1
|
;;; start action Kernel2Sprite 2 scanline1
|
||||||
|
|
||||||
@ -341,8 +329,6 @@ Kernel2Sprite__kernel__14__LVScan:
|
|||||||
|
|
||||||
Kernel2Sprite__kernel__14__DrawLine 1 ; macro: draw scanline w/ WSYNC
|
Kernel2Sprite__kernel__14__DrawLine 1 ; macro: draw scanline w/ WSYNC
|
||||||
dey ; next scanline
|
dey ; next scanline
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
Kernel2Sprite__kernel__14__DrawLine 0 ; macro: draw scanline no WSYNC
|
Kernel2Sprite__kernel__14__DrawLine 0 ; macro: draw scanline no WSYNC
|
||||||
dey ; next scanline
|
dey ; next scanline
|
||||||
@ -361,8 +347,6 @@ Kernel2Sprite__kernel__14__LVScan:
|
|||||||
;;; end action Kernel2Sprite 2 kernel
|
;;; end action Kernel2Sprite 2 kernel
|
||||||
|
|
||||||
KERNEL_END
|
KERNEL_END
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Joystick 3 postframe
|
;;; start action Joystick 3 postframe
|
||||||
|
|
||||||
@ -379,8 +363,6 @@ Joystick__postframe__18____each:
|
|||||||
|
|
||||||
asl Joystick__3__tmp+0
|
asl Joystick__3__tmp+0
|
||||||
bcs Joystick__postframe__18__SkipMoveRight
|
bcs Joystick__postframe__18__SkipMoveRight
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action MoveJoyX 4 joyright
|
;;; start action MoveJoyX 4 joyright
|
||||||
|
|
||||||
@ -397,8 +379,6 @@ MoveJoyX__joyright__19__nomove:
|
|||||||
Joystick__postframe__18__SkipMoveRight:
|
Joystick__postframe__18__SkipMoveRight:
|
||||||
asl Joystick__3__tmp+0
|
asl Joystick__3__tmp+0
|
||||||
bcs Joystick__postframe__18__SkipMoveLeft
|
bcs Joystick__postframe__18__SkipMoveLeft
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action MoveJoyX 4 joyleft
|
;;; start action MoveJoyX 4 joyleft
|
||||||
|
|
||||||
@ -414,8 +394,6 @@ MoveJoyX__joyleft__20__nomove:
|
|||||||
Joystick__postframe__18__SkipMoveLeft:
|
Joystick__postframe__18__SkipMoveLeft:
|
||||||
asl Joystick__3__tmp+0
|
asl Joystick__3__tmp+0
|
||||||
bcs Joystick__postframe__18__SkipMoveDown
|
bcs Joystick__postframe__18__SkipMoveDown
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action MoveJoyY 5 joydown
|
;;; start action MoveJoyY 5 joydown
|
||||||
|
|
||||||
@ -432,8 +410,6 @@ MoveJoyY__joydown__21__nomove:
|
|||||||
Joystick__postframe__18__SkipMoveDown:
|
Joystick__postframe__18__SkipMoveDown:
|
||||||
asl Joystick__3__tmp+0
|
asl Joystick__3__tmp+0
|
||||||
bcs Joystick__postframe__18__SkipMoveUp
|
bcs Joystick__postframe__18__SkipMoveUp
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action MoveJoyY 5 joyup
|
;;; start action MoveJoyY 5 joyup
|
||||||
|
|
||||||
@ -513,8 +489,6 @@ SpriteHider__postframe__25____exit:
|
|||||||
;;; end action SpriteHider 9 postframe
|
;;; end action SpriteHider 9 postframe
|
||||||
|
|
||||||
FRAME_END
|
FRAME_END
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
jmp FrameLoop__start__2__NextFrame ; loop to next frame
|
jmp FrameLoop__start__2__NextFrame ; loop to next frame
|
||||||
|
|
||||||
|
@ -627,8 +627,6 @@ Main__INITDATA:
|
|||||||
.byte 0
|
.byte 0
|
||||||
.byte 0
|
.byte 0
|
||||||
__Start:
|
__Start:
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Init 11 main_init
|
;;; start action Init 11 main_init
|
||||||
|
|
||||||
@ -646,15 +644,11 @@ __BRK:
|
|||||||
dey
|
dey
|
||||||
bne :-
|
bne :-
|
||||||
; initialize data segment
|
; initialize data segment
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action FrameLoop 1 start
|
;;; start action FrameLoop 1 start
|
||||||
|
|
||||||
FrameLoop__start__2__NextFrame:
|
FrameLoop__start__2__NextFrame:
|
||||||
FRAME_START
|
FRAME_START
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Kernel2Sprite 2 preframe
|
;;; start action Kernel2Sprite 2 preframe
|
||||||
|
|
||||||
@ -768,8 +762,6 @@ SetXPos__preframe__9____each:
|
|||||||
ldx SpriteSlot_sprite_b0,y
|
ldx SpriteSlot_sprite_b0,y
|
||||||
|
|
||||||
lda HasXpos_xpos_b0,x
|
lda HasXpos_xpos_b0,x
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action SetHorizPos 9 SetHorizPos
|
;;; start action SetHorizPos 9 SetHorizPos
|
||||||
|
|
||||||
@ -824,8 +816,6 @@ SetXPos__preframe__9____exit:
|
|||||||
;;; end action VersatilePlayfield 10 preframe
|
;;; end action VersatilePlayfield 10 preframe
|
||||||
|
|
||||||
KERNEL_START
|
KERNEL_START
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Kernel2Sprite 2 kernel
|
;;; start action Kernel2Sprite 2 kernel
|
||||||
|
|
||||||
@ -840,8 +830,6 @@ SetXPos__preframe__9____exit:
|
|||||||
|
|
||||||
ldy #192
|
ldy #192
|
||||||
Kernel2Sprite__kernel__15__LVScan:
|
Kernel2Sprite__kernel__15__LVScan:
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Kernel2Sprite 2 scanline
|
;;; start action Kernel2Sprite 2 scanline
|
||||||
|
|
||||||
@ -896,8 +884,6 @@ Kernel2Sprite__scanline__16__DoDraw2:
|
|||||||
;;; end action VersatilePlayfield 10 scanline
|
;;; end action VersatilePlayfield 10 scanline
|
||||||
|
|
||||||
dey ; next scanline
|
dey ; next scanline
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Kernel2Sprite 2 scanline
|
;;; start action Kernel2Sprite 2 scanline
|
||||||
|
|
||||||
@ -967,8 +953,6 @@ Kernel2Sprite__scanline__20__DoDraw2:
|
|||||||
;;; end action Kernel2Sprite 2 kernel
|
;;; end action Kernel2Sprite 2 kernel
|
||||||
|
|
||||||
KERNEL_END
|
KERNEL_END
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Joystick 3 postframe
|
;;; start action Joystick 3 postframe
|
||||||
|
|
||||||
@ -982,8 +966,6 @@ Kernel2Sprite__scanline__20__DoDraw2:
|
|||||||
|
|
||||||
asl Joystick__3__tmp+0
|
asl Joystick__3__tmp+0
|
||||||
bcs Joystick__postframe__26__SkipMoveRight
|
bcs Joystick__postframe__26__SkipMoveRight
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action JoyFaceDirection 4 joyright
|
;;; start action JoyFaceDirection 4 joyright
|
||||||
|
|
||||||
@ -1000,8 +982,6 @@ Kernel2Sprite__scanline__20__DoDraw2:
|
|||||||
adc #2
|
adc #2
|
||||||
cmp #142
|
cmp #142
|
||||||
jcc SuperFly__joyright__28__nomove
|
jcc SuperFly__joyright__28__nomove
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action SuperFly 5 goeast
|
;;; start action SuperFly 5 goeast
|
||||||
|
|
||||||
@ -1020,8 +1000,6 @@ SuperFly__joyright__28__nomove:
|
|||||||
Joystick__postframe__26__SkipMoveRight:
|
Joystick__postframe__26__SkipMoveRight:
|
||||||
asl Joystick__3__tmp+0
|
asl Joystick__3__tmp+0
|
||||||
bcs Joystick__postframe__26__SkipMoveLeft
|
bcs Joystick__postframe__26__SkipMoveLeft
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action JoyFaceDirection 4 joyleft
|
;;; start action JoyFaceDirection 4 joyleft
|
||||||
|
|
||||||
@ -1037,8 +1015,6 @@ Joystick__postframe__26__SkipMoveRight:
|
|||||||
sec
|
sec
|
||||||
sbc #2
|
sbc #2
|
||||||
jcs SuperFly__joyleft__31__nomove
|
jcs SuperFly__joyleft__31__nomove
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action SuperFly 5 gowest
|
;;; start action SuperFly 5 gowest
|
||||||
|
|
||||||
@ -1057,8 +1033,6 @@ SuperFly__joyleft__31__nomove:
|
|||||||
Joystick__postframe__26__SkipMoveLeft:
|
Joystick__postframe__26__SkipMoveLeft:
|
||||||
asl Joystick__3__tmp+0
|
asl Joystick__3__tmp+0
|
||||||
bcs Joystick__postframe__26__SkipMoveDown
|
bcs Joystick__postframe__26__SkipMoveDown
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action SuperFly 5 joydown
|
;;; start action SuperFly 5 joydown
|
||||||
|
|
||||||
@ -1067,8 +1041,6 @@ Joystick__postframe__26__SkipMoveLeft:
|
|||||||
adc #2
|
adc #2
|
||||||
cmp #220
|
cmp #220
|
||||||
jcc SuperFly__joydown__33__nomove
|
jcc SuperFly__joydown__33__nomove
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action SuperFly 5 gosouth
|
;;; start action SuperFly 5 gosouth
|
||||||
|
|
||||||
@ -1087,8 +1059,6 @@ SuperFly__joydown__33__nomove:
|
|||||||
Joystick__postframe__26__SkipMoveDown:
|
Joystick__postframe__26__SkipMoveDown:
|
||||||
asl Joystick__3__tmp+0
|
asl Joystick__3__tmp+0
|
||||||
bcs Joystick__postframe__26__SkipMoveUp
|
bcs Joystick__postframe__26__SkipMoveUp
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action SuperFly 5 joyup
|
;;; start action SuperFly 5 joyup
|
||||||
|
|
||||||
@ -1096,8 +1066,6 @@ Joystick__postframe__26__SkipMoveDown:
|
|||||||
sec
|
sec
|
||||||
sbc #2
|
sbc #2
|
||||||
jcs SuperFly__joyup__35__nomove
|
jcs SuperFly__joyup__35__nomove
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action SuperFly 5 gonorth
|
;;; start action SuperFly 5 gonorth
|
||||||
|
|
||||||
@ -1122,8 +1090,6 @@ Joystick__postframe__26__SkipMoveUp:
|
|||||||
ldx #0
|
ldx #0
|
||||||
BadMove__postframe__37____each:
|
BadMove__postframe__37____each:
|
||||||
|
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action JoyFaceDirection 4 joyright
|
;;; start action JoyFaceDirection 4 joyright
|
||||||
|
|
||||||
@ -1140,8 +1106,6 @@ BadMove__postframe__37____each:
|
|||||||
adc #1
|
adc #1
|
||||||
cmp #142
|
cmp #142
|
||||||
jcc SuperFly__joyright__39__nomove
|
jcc SuperFly__joyright__39__nomove
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action SuperFly 5 goeast
|
;;; start action SuperFly 5 goeast
|
||||||
|
|
||||||
@ -1199,8 +1163,6 @@ RoomShuffle__postframe__41__exit:
|
|||||||
;;; end action VersatilePlayfield 10 postframe
|
;;; end action VersatilePlayfield 10 postframe
|
||||||
|
|
||||||
FRAME_END
|
FRAME_END
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
jmp FrameLoop__start__2__NextFrame ; loop to next frame
|
jmp FrameLoop__start__2__NextFrame ; loop to next frame
|
||||||
|
|
||||||
|
@ -142,8 +142,6 @@ Bitmap48_bitmap5_e2_b0:
|
|||||||
Bitmap48_height_b0:
|
Bitmap48_height_b0:
|
||||||
.byte 14
|
.byte 14
|
||||||
__Start:
|
__Start:
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Init 4 main_init
|
;;; start action Init 4 main_init
|
||||||
|
|
||||||
@ -155,20 +153,14 @@ __Reset:
|
|||||||
__BRK:
|
__BRK:
|
||||||
CLEAN_START
|
CLEAN_START
|
||||||
; initialize data segment
|
; initialize data segment
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action FrameLoop 1 start
|
;;; start action FrameLoop 1 start
|
||||||
|
|
||||||
FrameLoop__start__2__NextFrame:
|
FrameLoop__start__2__NextFrame:
|
||||||
FRAME_START
|
FRAME_START
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action StaticKernel 3 preframe
|
;;; start action StaticKernel 3 preframe
|
||||||
|
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Kernel48Pixel 2 kernelsetup
|
;;; start action Kernel48Pixel 2 kernelsetup
|
||||||
|
|
||||||
@ -197,8 +189,6 @@ FrameLoop__start__2__NextFrame:
|
|||||||
;;; end action StaticKernel 3 preframe
|
;;; end action StaticKernel 3 preframe
|
||||||
|
|
||||||
KERNEL_START
|
KERNEL_START
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action StaticKernel 3 kernel
|
;;; start action StaticKernel 3 kernel
|
||||||
|
|
||||||
@ -206,8 +196,6 @@ FrameLoop__start__2__NextFrame:
|
|||||||
StaticKernel__kernel__9____each:
|
StaticKernel__kernel__9____each:
|
||||||
|
|
||||||
sta WSYNC
|
sta WSYNC
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Kernel48Pixel 2 kernelsetup
|
;;; start action Kernel48Pixel 2 kernelsetup
|
||||||
|
|
||||||
@ -292,8 +280,6 @@ StaticKernel__kernelsetup__13____skipxhi:
|
|||||||
|
|
||||||
;;; end action StaticKernel 3 kernelsetup
|
;;; end action StaticKernel 3 kernelsetup
|
||||||
|
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Kernel48Pixel 2 kerneldraw
|
;;; start action Kernel48Pixel 2 kerneldraw
|
||||||
|
|
||||||
@ -355,12 +341,8 @@ StaticKernel__kernel__9____exit:
|
|||||||
;;; end action StaticKernel 3 kernel
|
;;; end action StaticKernel 3 kernel
|
||||||
|
|
||||||
KERNEL_END
|
KERNEL_END
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
FRAME_END
|
FRAME_END
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
jmp FrameLoop__start__2__NextFrame ; loop to next frame
|
jmp FrameLoop__start__2__NextFrame ; loop to next frame
|
||||||
|
|
||||||
|
@ -44,8 +44,6 @@ Main__INITDATA:
|
|||||||
.byte 0
|
.byte 0
|
||||||
.byte 0
|
.byte 0
|
||||||
__Start:
|
__Start:
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Init 7 main_init
|
;;; start action Init 7 main_init
|
||||||
|
|
||||||
@ -62,20 +60,14 @@ __BRK:
|
|||||||
dey
|
dey
|
||||||
bne :-
|
bne :-
|
||||||
; initialize data segment
|
; initialize data segment
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action FrameLoop 1 start
|
;;; start action FrameLoop 1 start
|
||||||
|
|
||||||
FrameLoop__start__2__NextFrame:
|
FrameLoop__start__2__NextFrame:
|
||||||
FRAME_START
|
FRAME_START
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action StaticKernel 4 preframe
|
;;; start action StaticKernel 4 preframe
|
||||||
|
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action StaticKernel 4 kernelsetup
|
;;; start action StaticKernel 4 kernelsetup
|
||||||
|
|
||||||
@ -96,8 +88,6 @@ FrameLoop__start__2__NextFrame:
|
|||||||
;;; end action StaticKernel 4 preframe
|
;;; end action StaticKernel 4 preframe
|
||||||
|
|
||||||
KERNEL_START
|
KERNEL_START
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action StaticKernel 4 kernel
|
;;; start action StaticKernel 4 kernel
|
||||||
|
|
||||||
@ -105,8 +95,6 @@ FrameLoop__start__2__NextFrame:
|
|||||||
StaticKernel__kernel__7____each:
|
StaticKernel__kernel__7____each:
|
||||||
|
|
||||||
sta WSYNC
|
sta WSYNC
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action StaticKernel 4 kernelsetup
|
;;; start action StaticKernel 4 kernelsetup
|
||||||
|
|
||||||
@ -164,15 +152,11 @@ StaticKernel__kernel__7____exit:
|
|||||||
;;; end action StaticKernel 4 kernel
|
;;; end action StaticKernel 4 kernel
|
||||||
|
|
||||||
KERNEL_END
|
KERNEL_END
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action JoyButton 5 postframe
|
;;; start action JoyButton 5 postframe
|
||||||
|
|
||||||
lda INPT4 ;read button input
|
lda INPT4 ;read button input
|
||||||
bmi JoyButton__postframe__11__NotPressed
|
bmi JoyButton__postframe__11__NotPressed
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Local 6 joybutton
|
;;; start action Local 6 joybutton
|
||||||
|
|
||||||
@ -186,15 +170,11 @@ JoyButton__postframe__11__NotPressed:
|
|||||||
;;; end action JoyButton 5 postframe
|
;;; end action JoyButton 5 postframe
|
||||||
|
|
||||||
FRAME_END
|
FRAME_END
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action ResetSwitch 2 nextframe
|
;;; start action ResetSwitch 2 nextframe
|
||||||
|
|
||||||
lsr SWCHB ; test Game Reset switch
|
lsr SWCHB ; test Game Reset switch
|
||||||
bcs ResetSwitch__nextframe__13__NoStart
|
bcs ResetSwitch__nextframe__13__NoStart
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action ResetConsole 3 resetswitch
|
;;; start action ResetConsole 3 resetswitch
|
||||||
|
|
||||||
|
@ -44,8 +44,6 @@ Main__INITDATA:
|
|||||||
.byte 0
|
.byte 0
|
||||||
.byte 0
|
.byte 0
|
||||||
__Start:
|
__Start:
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Init 7 main_init
|
;;; start action Init 7 main_init
|
||||||
|
|
||||||
@ -63,20 +61,14 @@ __BRK:
|
|||||||
dey
|
dey
|
||||||
bne :-
|
bne :-
|
||||||
; initialize data segment
|
; initialize data segment
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action FrameLoop 1 start
|
;;; start action FrameLoop 1 start
|
||||||
|
|
||||||
FrameLoop__start__2__NextFrame:
|
FrameLoop__start__2__NextFrame:
|
||||||
FRAME_START
|
FRAME_START
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action StaticKernel 4 preframe
|
;;; start action StaticKernel 4 preframe
|
||||||
|
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action StaticKernel 4 kernelsetup
|
;;; start action StaticKernel 4 kernelsetup
|
||||||
|
|
||||||
@ -97,8 +89,6 @@ FrameLoop__start__2__NextFrame:
|
|||||||
;;; end action StaticKernel 4 preframe
|
;;; end action StaticKernel 4 preframe
|
||||||
|
|
||||||
KERNEL_START
|
KERNEL_START
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action StaticKernel 4 kernel
|
;;; start action StaticKernel 4 kernel
|
||||||
|
|
||||||
@ -106,8 +96,6 @@ FrameLoop__start__2__NextFrame:
|
|||||||
StaticKernel__kernel__7____each:
|
StaticKernel__kernel__7____each:
|
||||||
|
|
||||||
sta WSYNC
|
sta WSYNC
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action StaticKernel 4 kernelsetup
|
;;; start action StaticKernel 4 kernelsetup
|
||||||
|
|
||||||
@ -149,8 +137,6 @@ StaticKernel__kernelsetup__10____skipxlo:
|
|||||||
|
|
||||||
;;; end action StaticKernel 4 kernelsetup
|
;;; end action StaticKernel 4 kernelsetup
|
||||||
|
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action StaticKernel 4 kerneldraw
|
;;; start action StaticKernel 4 kerneldraw
|
||||||
|
|
||||||
@ -173,15 +159,11 @@ StaticKernel__kernel__7____exit:
|
|||||||
;;; end action StaticKernel 4 kernel
|
;;; end action StaticKernel 4 kernel
|
||||||
|
|
||||||
KERNEL_END
|
KERNEL_END
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action JoyButton 5 postframe
|
;;; start action JoyButton 5 postframe
|
||||||
|
|
||||||
lda INPT4 ;read button input
|
lda INPT4 ;read button input
|
||||||
bmi JoyButton__postframe__12__NotPressed
|
bmi JoyButton__postframe__12__NotPressed
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action Local 6 joybutton
|
;;; start action Local 6 joybutton
|
||||||
|
|
||||||
@ -195,15 +177,11 @@ JoyButton__postframe__12__NotPressed:
|
|||||||
;;; end action JoyButton 5 postframe
|
;;; end action JoyButton 5 postframe
|
||||||
|
|
||||||
FRAME_END
|
FRAME_END
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action ResetSwitch 2 nextframe
|
;;; start action ResetSwitch 2 nextframe
|
||||||
|
|
||||||
lsr SWCHB ; test Game Reset switch
|
lsr SWCHB ; test Game Reset switch
|
||||||
bcs ResetSwitch__nextframe__14__NoStart
|
bcs ResetSwitch__nextframe__14__NoStart
|
||||||
.code
|
|
||||||
|
|
||||||
|
|
||||||
;;; start action ResetConsole 3 resetswitch
|
;;; start action ResetConsole 3 resetswitch
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user