Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
started Mattel Aquarius version
#1
i also started Mattel Aquarius target - <!-- m --><a class="postlink" href="http://atariage.com/forums/topic/213965-aquarius-stuff-from-boriels-zx-basic-compiler-first-attempt/">http://atariage.com/forums/topic/213965 ... t-attempt/</a><!-- m --> - soon i'll share some updates about this, as far i can get help from the Aquarius retro-development community! Smile
Reply
#2
Here is the Windows batch file to get the Aquarius Example compiled to a Binary.

On Windows you need to install the ddprogram used by this script
I've removed the part of the script calling MESS to launch with the created ROM file.
My mess threw fits from command line about missing the boot roms it needed, that it didn't cry about with normal launching.
I just ran this code again and it didn't work. I get an 8K binary at least but Viritual Aquarius and Mess don't care for it.
Too tired to go on tonight.

Code:
REM Windows Batch to compile Boriel's ZX BASIC
REM To Aquarius Computer System Rom

REM remove old build
rm example01.asm example01.rom

REM ZXB is the main SDK executable. It can act both as a compiler or as a translator:
zxb library/aquariusromheader.bas --org=0x0000

REM copy header into temp file
dd ibs=1 count=16 skip=0 if=aquariusromheader.bin of=example01.tmr

REM rm removes objects
rm aquariusromheader.bin

REM compiling the basic program to cartridge memory
zxb example01.bas --asm --org=0xE010
zxb example01.bas --org=0xE010
cat example01.bin >> example01.tmr

REM create an 8K empty file
dd if=Null of=_dummybytes.bin bs=8192 count=1 seek=8192

REM fill the empty with the temp
cat _dummybytes.bin >> example01.tmr

REM clean up old build files
rm _dummybytes.bin example01.bin

REM write 8k of temp file to ROM file
dd ibs=1 count=8192 skip=0 if=example01.tmr of=example01.rom
rm example01.tmr
Reply
#3
Ok this should work now. Had to learn some batch script and some bash script and now it should compile on Windows with these .bat files and on linux(mac?) with the .bs files.

It does leave a bunch of build files, for now.
Here's what the no rm version looks like.

Code:
REM Windows Batch Compiler Script
REM For Boriel's ZX BASIC to Aquarius Computer Catridge ROM
REM No RM version 1.0 January 13 2014

REM Write Null file, very important
ECHO NULL > Null

REM ZXB is the main SDK executable. It can act both as a compiler or as a translator:
REM http://www.boriel.com/en/software/the-zx-basic-compiler/

REM this command creates a binary machine code compilation of the 8k catridge header
REM see library/aquarisromheader16kb.bas for bigger cart.
zxb library/aquariusromheader.bas --org=0x0000

REM copy 16 BYTES header   into temp files
dd ibs=1 count=16 skip=16 if=aquariusromheader.bin of=example01.tmr

REM compiling the basic program to cartridge memory
zxb example01.bas --asm --org=0xE010
zxb example01.bas --org=0xE010

REM append rom header binary to assembly code binary
copy example01.tmr /b + example01.bin /b example01.tmr

REM create an 8K empty file my settings may be wrong.
dd if=Null of=_dummybytes.bin bs=8192 count=1 seek=1

REM append the temp binary data with space to fill the 8k rom
copy example01.tmr /b + /b _dummybytes.bin example01.tmr /b

REM cleaning  up old build files  
REM rm _dummybytes.bin example01.bin

ECHO Writing only 8k of TMR binary to ROM file
dd ibs=1 count=8192 skip=0 if=example01.tmr of=example01.rom

Join the Discussion at Atariage
I think this stuff could really help get things rolling where we are stuck at writing ROMS from z88 development kit
More discussion on that at Atari

See the version just before this version in action.
[Image: 6ZPnmxE.gif]

WOOOHOO.
Reply
#4
I definitley would like to include these in the ZX BASIC official distribution, but allowing --arch=other-architecture.
What do you think?

Of course this will be credited to you. The idea (already explained) is to allow people to submit patches and extensions to the bitbucket repository (similar to github).
Reply
#5
Yes of course I'm sure nitrofurano wanted to get this into the official build.
Where ever he may be now.
He did all the hard work, I just got that batch for windows working.

I think some more steps should be taken on the batch files to clean up the extra build files.

Or do you think you can do that binary building in your code??
I wonder if ZX BASIC can do it?

I just got here, I don't know nothin'.
Big Grin
Reply
#6
Pset Wrote:Or do you think you can do that binary building in your code??
I wonder if ZX BASIC can do it?

I just got here, I don't know nothin'.
Big Grin
The idea is that: ZXBASIC directly building MSX binaries by issueing --arch=msx (for example). 8)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)