I were starting to create files with random or hex-edited content similar to pacman.zip (mame), and also using the information from - <!-- m --><a class="postlink" href="http://www.ascotti.org/programming/pie/hardware.htm">http://www.ascotti.org/programming/pie/hardware.htm</a><!-- m --> - and i'm starting to know how this machine works (but i didn't start to code anything yet on zxbasic-compiler for that)
(overally, pacman.6e , *.6f, *.6h and *.6j are 4 4kb files for the program (a 16kb limit splitted into 4), pacman.5e is the character set (4kb), pacman.5f is the sprite set (4kb), 82s123.7f the palette (32 bytes - it's from a colourspace similar used on msx2-screen8 or UzeBox ), and 82s126.4a the clut (how the palette is arranged in groups of 4 colours - 256 bytes) - and i think 82s126.1m and *.3m are related to sound (256 bytes each) )
This machine seems to be not that plenty of ram memory (it's an arcade machine from 1980), around 4kb at most, which 2k is for displaying patterns (and the bitmaps (background patterns (8x8 characters), sprites (16x16) ) are stored in 8kb of rom somewhere else)
So, it seems that almost 2k of free ram makes it difficult to deal with the stack point, isn't it? and anyway, must we set that into a specific area, like 0x07EF, before the code starts? how much ram much we count with like on a regular use of functions and routines, and which care must we have?
My alien breeder program seems to lock up, on pass two through the data - on fight 27, too.
Not sure if this is a compiler error, or my messing up - though adding one to a dimensioned variable (the line it seems to stop on) shouldn't be too stressful.
Locks up on this bit:
Code:
print at 21,16;2
alienRankings(i+1,SCORE)=alienRankings(i+1,SCORE)+1
END IF
print at 21,17,"+"
It prints the 2, and doesn't print the "+".
What I don't understand is why it locks up on the 3rd loop round? There's nothing different there, which is why I suspect there's a compiler error.
How about a addition?
Usually the variable type is allways float by default, and you can change the type of variables using DIM variable AS Type. Would it be possible to change the default type from float to different type (except String), using DEFAULT directive. E.g. DEFAULT UINTEGER will change the type of all uninitialised variables from Float to Uinteger.
during the process of using zxbasic-compiler for creating stuff for mc1000/gem1000/charlemagne, besides having problem with rnd, i'm also having problems when dealing with string processing (like using libraries for drawing text)
<!-- m --><a class="postlink" href="http://dl.dropbox.com/u/795795/retrocoding/mc1000/_solitario_mc1000_20120830161950.zip">http://dl.dropbox.com/u/795795/retrocod ... 161950.zip</a><!-- m -->
there you have the .wav which opens on Mess emulator ('mess mc1000' or 'mess mc1000 -ramsize 48k' - scrolllock+insert for accessing tab - enter 'tload' - and select and play the .wav file in the tab options - it takes almost 2 minutes loading ) - there is the source code as well
i don't know if the string commands are related to zx-spectrum rom routines, stack issues, or something else
if more people here is trying to use zxbasic-compiler for creating binary or assembly stuff targeting other hardware than zx-spectrum, please share your feedback - and what and how code must be tested, and issues fixed or avoided
At <!-- m --><a class="postlink" href="https://www.facebook.com/groups/mc1000/">https://www.facebook.com/groups/mc1000/</a><!-- m -->, Emerson Costa (ensjo) is helping me a lot on the mc1000 version of zxbasic-compiler , but as soon he sent to me a library in asm with equ, zxbasic-compiler didn't recognize it.
Is that planned a support for equ, and how simple/possible is to add this? (it seems to be like associating variable names to values inside the asm code, just like variables on the basic code?)
well, mc1000/gem1000 is a pretty rare 8bit hardware, but its zxbasic-compiler version is on the way:
<!-- m --><a class="postlink" href="https://www.facebook.com/groups/mc1000/">https://www.facebook.com/groups/mc1000/</a><!-- m -->
(messages are in portuguese, but people could use translators for that, and since the conversation is mostly technical there, it seems to be not that hard to understand)
btw, some information of it is being collected here: <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:GEM-1000">http://www.boriel.com/wiki/en/index.php ... C:GEM-1000</a><!-- m -->
(an interesting fact of this machine is it uses the same display processor as Dragon32/Coco2 (a good start for these machines for when a 6809/6502 version of zxbasic-compiler appears) , the same sound processor as msx, nes and sms, and the same z80 processor as zx-spectrum and etc.! )