mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-05-28 08:41:30 +00:00
ecs: set up for nes
This commit is contained in:
parent
07c0ae2f9c
commit
9351406450
|
@ -156,3 +156,31 @@ take up at least one byte if stateful
|
||||||
might need free list
|
might need free list
|
||||||
need jump table?
|
need jump table?
|
||||||
you'd like to change "mode" from any event
|
you'd like to change "mode" from any event
|
||||||
|
|
||||||
|
need constant folding, set arrays from other exprs
|
||||||
|
|
||||||
|
a = [Sprite,-Player]
|
||||||
|
foreach a do begin
|
||||||
|
xpos = ypos
|
||||||
|
end
|
||||||
|
|
||||||
|
on gowest do with x:[Location]
|
||||||
|
---
|
||||||
|
ldy {{<room}}
|
||||||
|
lda {{<Room:west}},y
|
||||||
|
sta {{<room}}
|
||||||
|
---
|
||||||
|
on preframe do
|
||||||
|
with y=[SpriteSlot] limit 2
|
||||||
|
with x=y.sprite
|
||||||
|
---
|
||||||
|
lda {{<xpos}}
|
||||||
|
{{!SetHorizPos}}
|
||||||
|
---
|
||||||
|
on preframe do
|
||||||
|
foreach x=[Missile,HasXpos]
|
||||||
|
---
|
||||||
|
lda {{<xpos}}
|
||||||
|
ldy {{<index}}
|
||||||
|
{{!SetHorizPos}}
|
||||||
|
---
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { ECSCompiler } from "../../common/ecs/compiler";
|
||||||
import { Dialect_CA65, ECSError, EntityManager } from "../../common/ecs/ecs";
|
import { Dialect_CA65, ECSError, EntityManager } from "../../common/ecs/ecs";
|
||||||
import { CompileError } from "../../common/tokenizer";
|
import { CompileError } from "../../common/tokenizer";
|
||||||
import { CodeListingMap } from "../../common/workertypes";
|
import { CodeListingMap } from "../../common/workertypes";
|
||||||
import { BuildStep, BuildStepResult, gatherFiles, getWorkFileAsString, putWorkFile, staleFiles } from "../workermain";
|
import { BuildStep, BuildStepResult, fixParamsWithDefines, gatherFiles, getWorkFileAsString, putWorkFile, staleFiles } from "../workermain";
|
||||||
|
|
||||||
export function assembleECS(step: BuildStep): BuildStepResult {
|
export function assembleECS(step: BuildStep): BuildStepResult {
|
||||||
let em = new EntityManager(new Dialect_CA65()); // TODO
|
let em = new EntityManager(new Dialect_CA65()); // TODO
|
||||||
|
@ -15,6 +15,7 @@ export function assembleECS(step: BuildStep): BuildStepResult {
|
||||||
var destpath = step.prefix + '.ca65';
|
var destpath = step.prefix + '.ca65';
|
||||||
if (staleFiles(step, [destpath])) {
|
if (staleFiles(step, [destpath])) {
|
||||||
let code = getWorkFileAsString(step.path);
|
let code = getWorkFileAsString(step.path);
|
||||||
|
fixParamsWithDefines(step.path, step.params);
|
||||||
try {
|
try {
|
||||||
compiler.debuginfo = true;
|
compiler.debuginfo = true;
|
||||||
compiler.parseFile(code, step.path);
|
compiler.parseFile(code, step.path);
|
||||||
|
@ -37,7 +38,7 @@ export function assembleECS(step: BuildStep): BuildStepResult {
|
||||||
nexttool: "ca65",
|
nexttool: "ca65",
|
||||||
path: destpath,
|
path: destpath,
|
||||||
args: [destpath],
|
args: [destpath],
|
||||||
files: [destpath, 'vcs-ca65.h'], //TODO
|
files: [destpath].concat(step.files),
|
||||||
listings
|
listings
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1135,7 +1135,8 @@ var TOOL_PRELOADFS = {
|
||||||
'fastbasic': '65-atari8',
|
'fastbasic': '65-atari8',
|
||||||
'silice': 'Silice',
|
'silice': 'Silice',
|
||||||
'wiz': 'wiz',
|
'wiz': 'wiz',
|
||||||
'ecs': '65-none', // TODO: support multiple platforms
|
'ecs-vcs': '65-none', // TODO: support multiple platforms
|
||||||
|
'ecs-nes': '65-nes', // TODO: support multiple platforms
|
||||||
}
|
}
|
||||||
|
|
||||||
//const waitFor = delay => new Promise(resolve => setTimeout(resolve, delay)); // for testing
|
//const waitFor = delay => new Promise(resolve => setTimeout(resolve, delay)); // for testing
|
||||||
|
|
Loading…
Reference in New Issue
Block a user