rm brod.zip
rm example01.asm
rm brod/*
rmdir brod
mkdir brod





dd bs=$((0x8000)) count=1 if=/dev/zero of=dummy32k.bin





#- zxb.py example01.zxb --asm --org=$((0x0000))
#- zxb.py example01.zxb --org=$((0x0000))
zxb.py library/smsboot.bas --org=1024
dd ibs=1 count=$((0x0069)) skip=$((0x0000)) if=smsboot.bin of=smsboot2.bin

zxb.py example01.zxb --heap-size=128 --asm --org=$((0x0069))
zxb.py example01.zxb --heap-size=128 --org=$((0x0069))


cat example01.bin >> smsboot2.bin
rm example01.bin
mv smsboot2.bin example01.bin

cat dummy32k.bin >> example01.bin
dd ibs=1 count=$((0x2000)) skip=$((0x0000)) if=example01.bin of=brod/brod00.bin
dd bs=$((0x2000)) count=1 if=/dev/zero of=brod/brod10.bin
dd bs=$((0x2000)) count=1 if=/dev/zero of=brod/brod11.bin
dd bs=$((0x2000)) count=1 if=/dev/zero of=brod/brod12.bin
dd bs=$((0x2000)) count=1 if=/dev/zero of=brod/brod13.bin

#ROM_START( brod )
#ROM_REGION( 0x20000, "maincpu", 0 )
#ROM_LOAD( "brod00.bin", 0x0000, 0x2000, CRC(cbd6653f) SHA1(18b9134529a1e56c6e90f3bcef5102d5d4b352e3) )
#ROM_FILL( 0x2000, 0x2000, 0x00 )
#ROM_LOAD( "brod10.bin", 0x4000, 0x2000, CRC(9c25d44a) SHA1(f78c7e5b4e6f9fe34f81dc574ca335f70b61e68d) )
#ROM_LOAD( "brod11.bin", 0x6000, 0x2000, CRC(f6505a16) SHA1(3b2ccca78fd83855003cc752766df83b19f89364) )
#ROM_LOAD( "brod12.bin", 0x8000, 0x2000, CRC(94e53d47) SHA1(698415c5e25528e3b1dcab7471cc98c1dc9cb335) )
#ROM_LOAD( "brod13.bin", 0xa000, 0x2000, CRC(1177cd17) SHA1(58c5c09a7b857ce6311339c4d0f4d8c1a7e232a3) )
#ROM_END





#zxb.py library/charmap01.zxi --org=$((0x0000))
#cat dummy32k.bin >> charmap01.bin
#dd ibs=1 count=$((0x2000)) skip=$((0x0010)) if=charmap01.bin of=brod/pp_e01.rom
#rm charmap01.bin

#zxb.py library/spritemap01.zxi --org=$((0x0000))
#cat dummy32k.bin >> spritemap01.bin
#dd ibs=1 count=$((0x2000)) skip=$((0x0010)) if=spritemap01.bin of=brod/pp_e02.rom
#rm spritemap01.bin



#zxb.py library/palette01.bas --org=$((0x0000))
#cat dummy32k.bin >> palette01.bin
#dd ibs=1 count=$((0x0020)) skip=$((0x0010)) if=palette01.bin of=brod/brod.3j
#rm palette01.bin
#dd bs=$((0x0020)) count=1 if=/dev/urandom of=brod/brod.3j


#- clut01.zxi might need to be different files
#zxb.py library/clut01.zxi --org=$((0x0000))
#cat dummy32k.bin >> clut01.bin
#dd ibs=1 count=$((0x0200)) skip=$((0x0010)) if=clut01.bin of=clut01b.bin
#rm clut01.bin
#dd ibs=1 count=$((0x0100)) skip=$((0x0000)) if=clut01b.bin of=brod/brod.5h
#dd ibs=1 count=$((0x0100)) skip=$((0x0100)) if=clut01b.bin of=brod/brod.11j
#rm clut01b.bin

#????
#dd bs=256 count=1 if=/dev/zero of=brod/82s126.1m
#dd bs=256 count=1 if=/dev/zero of=brod/82s126.3m

rm smsboot.bin dummy32k.bin example01.bin

zip -r brod brod
rm brod/*
rmdir brod

mame -w -video soft -resolution0 512x512 -rp ./ brod




#ROM_START( brod )
#ROM_REGION( 0x20000, "maincpu", 0 )
#ROM_LOAD( "brod00.bin", 0x0000, 0x2000, CRC(cbd6653f) SHA1(18b9134529a1e56c6e90f3bcef5102d5d4b352e3) )
#ROM_FILL( 0x2000, 0x2000, 0x00 )
#ROM_LOAD( "brod10.bin", 0x4000, 0x2000, CRC(9c25d44a) SHA1(f78c7e5b4e6f9fe34f81dc574ca335f70b61e68d) )
#ROM_LOAD( "brod11.bin", 0x6000, 0x2000, CRC(f6505a16) SHA1(3b2ccca78fd83855003cc752766df83b19f89364) )
#ROM_LOAD( "brod12.bin", 0x8000, 0x2000, CRC(94e53d47) SHA1(698415c5e25528e3b1dcab7471cc98c1dc9cb335) )
#ROM_LOAD( "brod13.bin", 0xa000, 0x2000, CRC(1177cd17) SHA1(58c5c09a7b857ce6311339c4d0f4d8c1a7e232a3) )
#ROM_END






