In a similar project as the ZX Spectrum emulator I worked on earlier, here is a feature that allows building ZX Spectrum binaries from ZGE projects.
I don't know if anyone have any use for this but once I had the idea I knew I had to try to implement it
It is very limited so far but I hope to improve it further later on.
- It supports a subset of the ZGE scripting language, where "int" is the only supported data type and is treated as a unsigned 16-bit integer.
- No ZGE components (except storing bitmaps in Bitmap component, and other binary data in File component)
If anyone wants to try it you can download it here: http://www.zgameeditor.org/files/ZGameEditor_beta.zip
Then open Z80Example project in Projects subfolder. Build the .z80 file (file format that is compatible with ZX Spectrum emulators) using "Build Z80" menu item in project menu.
Screenshot below shows .z80 file generated by ZGE running in zesarux emulator.
Z80 ZX Spectrum build support (+ Sega Master System and Vectrex)
Moderator: Moderators
Z80 ZX Spectrum build support (+ Sega Master System and Vectrex)
- Attachments
-
- zge_z80.PNG (220.9 KiB) Viewed 12519 times
Re: Z80 ZX Spectrum build support
I've continued to improve this and now added another Z80-target: Sega Master System (SMS).
I found a nice tutorial for SMS here that I converted to ZGE: https://www.smspower.org/maxim/HowToPro ... lOnOnePage
Apparently Sega Game Gear almost has the same specification as Master System so that means ZGE can support that too.
Screenshot below shows MEKA Sega Master System emulator run a rom-file generated by ZGE.
I found a nice tutorial for SMS here that I converted to ZGE: https://www.smspower.org/maxim/HowToPro ... lOnOnePage
Apparently Sega Game Gear almost has the same specification as Master System so that means ZGE can support that too.
Screenshot below shows MEKA Sega Master System emulator run a rom-file generated by ZGE.
- Attachments
-
- zge_sms.png (1.27 MiB) Viewed 12495 times
Re: Z80 ZX Spectrum build support
Wow, I did not expect Z80 building in ZGE (or any similar tool, actually). Very cool! I'd love to make a Master System game.
Now if only I could compile ZGE on Free Pascal and have a native Linux version of both runtime and editor. Did that ever turn out to work?
Now if only I could compile ZGE on Free Pascal and have a native Linux version of both runtime and editor. Did that ever turn out to work?
Re: Z80 ZX Spectrum build support
Hej Ville,
Super cool & wild idea! Some notes regarding the Master System / Game Gear target.
- Non-Japanese ROMs actually require a header at the end, which includes a ROM size descriptor nibble .. so ROMs needs to be padded.
- The VDP can only handle VRAM writes every 29 cycles outside of the VBlank period, therefore your print routine only works during VBlank.
The easiest way to implement a waitVsync is to check bit 7 of "in a,($BF)" in a tight loop. The only danger is that when you call that from inside the VBlank there's no way of knowing how many cycles you have left. A alternative would be to push PC onto the stack, EI & HALT .. and then pop back from the $38 interrupt vector.
K
Super cool & wild idea! Some notes regarding the Master System / Game Gear target.
- Non-Japanese ROMs actually require a header at the end, which includes a ROM size descriptor nibble .. so ROMs needs to be padded.
- The VDP can only handle VRAM writes every 29 cycles outside of the VBlank period, therefore your print routine only works during VBlank.
The easiest way to implement a waitVsync is to check bit 7 of "in a,($BF)" in a tight loop. The only danger is that when you call that from inside the VBlank there's no way of knowing how many cycles you have left. A alternative would be to push PC onto the stack, EI & HALT .. and then pop back from the $38 interrupt vector.
K
Re: Z80 ZX Spectrum build support (and Sega Master System)
Thanks for the link, I'll make a note of that. I just made the minimal file that the emulator accepted at this point
I guess that is why the tutorial writes the text before turning on the display. I've never done any coding for SMS before so I know absolutely nothing about it. It would be cool to expand the project so it displays a sprite. Do you have any SMS experience yourself?
The editor has quite a number of Windows dependencies and I don't have the motivation to port it myself (I'm a happy Windows user ). So your best bet is running the editor in Wine and build the runtime for Linux usingFreepascal.
Re: Z80 ZX Spectrum build support (and Sega Master System)
Kjell helped create a sprite example for Sega Master System so I've replaced the demo project in the installer.
- Attachments
-
- zge_sms.png (1.23 MiB) Viewed 11778 times
Re: Z80 ZX Spectrum build support (and Sega Master System)
Motorola 6809 CPU support with Vectrex platform mostly working now . I noticed MAME have excellent built-in debugger for 6809 and I will probably use this for any additional retro development.
- Attachments
-
- zge_vectrex.png (635.18 KiB) Viewed 11425 times
Re: Z80 ZX Spectrum build support (+ Sega Master System and Vectrex)
Small update: Functions defined in ZLibrary does no longer need to be defined as "inline" to work. This will be translated to the native function calls using "call/jsr" in the binary. Not sure what to implement next, have anyone any suggestions? It would be cool if someone tried to make a small game for one of these platforms to test this better, maybe a "Snake" game or similar .