mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2025-02-18 00:30:43 +00:00
6809: updated lwasm for raw targets (.asm extension)
This commit is contained in:
parent
1a062650ad
commit
4f05ea487b
1
src/worker/lib/williams-defender
Symbolic link
1
src/worker/lib/williams-defender
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
williams
|
@ -132,9 +132,11 @@ export function assembleLWASM(step: BuildStep): BuildStepResult {
|
|||||||
gatherFiles(step, { mainFilePath: "main.s" });
|
gatherFiles(step, { mainFilePath: "main.s" });
|
||||||
var objpath = step.prefix + ".o";
|
var objpath = step.prefix + ".o";
|
||||||
var lstpath = step.prefix + ".lst";
|
var lstpath = step.prefix + ".lst";
|
||||||
|
const isRaw = step.path.endsWith('.asm');
|
||||||
if (staleFiles(step, [objpath, lstpath])) {
|
if (staleFiles(step, [objpath, lstpath])) {
|
||||||
var objout, lstout;
|
var objout, lstout;
|
||||||
var args = ['-9', '--obj', '-I/share/asminc', '-o' + objpath, '-l' + lstpath, step.path];
|
var args = ['-9', '-I/share/asminc', '-o' + objpath, '-l' + lstpath, step.path];
|
||||||
|
args.push(isRaw ? '-r' : '--obj');
|
||||||
var LWASM: EmscriptenModule = emglobal.lwasm({
|
var LWASM: EmscriptenModule = emglobal.lwasm({
|
||||||
instantiateWasm: moduleInstFn('lwasm'),
|
instantiateWasm: moduleInstFn('lwasm'),
|
||||||
noInitialRun: true,
|
noInitialRun: true,
|
||||||
@ -153,6 +155,11 @@ export function assembleLWASM(step: BuildStep): BuildStepResult {
|
|||||||
lstout = FS.readFile(lstpath, { encoding: 'utf8' });
|
lstout = FS.readFile(lstpath, { encoding: 'utf8' });
|
||||||
putWorkFile(objpath, objout);
|
putWorkFile(objpath, objout);
|
||||||
putWorkFile(lstpath, lstout);
|
putWorkFile(lstpath, lstout);
|
||||||
|
if (isRaw) {
|
||||||
|
return {
|
||||||
|
output: objout
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
linktool: "lwlink",
|
linktool: "lwlink",
|
||||||
|
@ -127,9 +127,17 @@ var PLATFORM_PARAMS = {
|
|||||||
data_start: 0x9800,
|
data_start: 0x9800,
|
||||||
data_size: 0x2800,
|
data_size: 0x2800,
|
||||||
stack_end: 0xc000,
|
stack_end: 0xc000,
|
||||||
//extra_compile_args: ['--vectrex'],
|
|
||||||
extra_link_files: ['williams.scr', 'libcmoc-crt-vec.a', 'libcmoc-std-vec.a'],
|
extra_link_files: ['williams.scr', 'libcmoc-crt-vec.a', 'libcmoc-std-vec.a'],
|
||||||
extra_link_args: ['-swilliams.scr', '-lcmoc-crt-vec', '-lcmoc-std-vec'],
|
extra_link_args: ['-swilliams.scr', '-lcmoc-crt-vec', '-lcmoc-std-vec'],
|
||||||
|
extra_compile_files: ['assert.h','cmoc.h','stdarg.h','vectrex.h','stdlib.h','bios.h'],
|
||||||
|
},
|
||||||
|
'williams-defender': {
|
||||||
|
arch: '6809',
|
||||||
|
code_start: 0x0,
|
||||||
|
rom_size: 0xc000,
|
||||||
|
data_start: 0x9800,
|
||||||
|
data_size: 0x2800,
|
||||||
|
stack_end: 0xc000,
|
||||||
},
|
},
|
||||||
'williams-z80': {
|
'williams-z80': {
|
||||||
arch: 'z80',
|
arch: 'z80',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user