Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
first attempt on trying to make an msx1 .rom from zxbasic
#1
hi again!

Finally, i tried my first attempt, unsuccessfully, on trying to create a .rom msx file with Boriel's zxbasic compiler, based on what i started at <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:MSX">http://www.boriel.com/wiki/en/index.php/ZX_BASIC:MSX</a><!-- m --> . The idea for this test is only trying a simple thing like having a grey background and a red border, and clean the screen, nothing more, only for testing.

This can be frustrating at first, but maybe approaches like this can help on extending the target hardware, and how can help it being more flexible, as Boriel also wanted.

i tried with this:

code.bas
Code:
# include "lib/msx_color.bas"
# include "lib/msx1_cls.bas"
msxcolor(3,14,8)
msx1cls()
lp1:
  goto lp1

lib/msx_color.bas
Code:
sub msxcolor(vink,vpaper,vborder as ubyte)
  poke 0F3E9h,vink      :rem- forclr
  poke 0F3EAh,vpaper    :rem- bakclr
  poke 0F3EBh,vborder   :rem- borclr
  end sub

lib/msx1_cls.bas
Code:
sub msx1cls():
  asm
    call 00c3h   ;-cls
    end asm
  end sub

compileandcreaterom.sh (a bash script for creating the .rom file - sorry, i'm linux-only...)
Code:
#!/bin/bash
#- compiles a Boriel's zxbasic code to a 8kb msx .rom file
zxb.py code.bas
echo -e '\x41\x42\x04\x80\c' > _tmp.bin
cat code.bin >> _tmp.bin
echo -e 'somedescriptionoftheromfilehere' >> _tmp.bin
for i in {1..8192}; do echo -e '\x00\c' >> _tmp.bin; done
split -b 8k _tmp.bin
mv xaa code.rom
rm xab xac code.bin _tmp.bin
openmsx code.rom

maybe the .rom doesn't run because zxbasic-compiler puts some zxspectrum-based "garbage", that lacks this .rom can be executed, which i don't know how to optimize or walk around on this?

if someone here also have experience on coding on msx, any help is welcome.

btw, Boriel, how far were successful your attempts on creating amstrad-cpc with a similar method?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)