Page 1 of 2

Maziacs / Bugziacs Conversion for QL

Posted: Sat May 15, 2021 6:36 pm
by spkr
One of my childhood games that stuck with me is Maziacs https://en.wikipedia.org/wiki/Maziacs . I loved it quite a bit, its simple, yet challenging and nicely executed. One of my scenebuddies was playing around with a Z80 to M68K converter, and did a conversion a little while ago for Atari ST, called Bugziacs https://www.pouet.net/prod.php?which=81412. He made a little writeup about the process http://beyondbrown.mooo.com/post/bugziacs/.

The converter opens up the possibility of doing (more) ZX conversions to M68k.

Ive been having a little look into adapting the Atari ST conversion for the QL. The main challenges are getting the executable in an acceptable size (<96kb if Im right) and getting the codebase all PC-relative. Im making decent progress, so I suppose input (keyboard en joystick) are up sooner rather than later.

Re: Maziacs / Bugziacs Conversion for QL

Posted: Sat May 15, 2021 8:53 pm
by vanpeebles
Loved that game as a kid, the animation when you fought was class :lol:

Re: Maziacs / Bugziacs Conversion for QL

Posted: Sun May 16, 2021 2:33 pm
by Derek_Stewart
Hi,

The link to the web page about Z80 to M68K makes interesting reading.

Years ago I started writing a set of macros for QMAC assembler to define Z80 and 6502 mneumontics.

The idea was to take a Z80 assembley language source file and include the Z80-M68K macros, which would allow the QMAC assembler to assemble the Z80 source file, with a little extra work on the M68K side. This I never finished.

I also wondered if a Z80 or 6502 mneumontics could be written as QL Prodecedures and Functions and compiled with Qliberator, as QL extenstions. So that the Z80, 6502 file could be run as an interpreted file, or compiled.

This might be slow, but a ZX Spectrum running 2Mhz, might be slower than a QL running a compiled version of the assembler code at 8Mhz plus, Q68 40Mhz...

Re: Maziacs / Bugziacs Conversion for QL

Posted: Mon May 17, 2021 9:57 am
by spkr
Hiho,

I made a little progress this weekend. The code size is 92898 (~90.8kb), using a single buffer for display. I assumed that the stock QL has little under 96kb memory free to run a program, and this is a ballpark figure I can work with. Since Im mostly a goal-oriented dude, I focused on easy and big steps. As such, I have removed non-functional graphics from the game, like a title screen and a loading screen, to save space in big steps.

I also reworked the code such that it is all PC-relative code, and the current game project still runs (albeit on Atari ST).

During the process, I have played the game numerous times (you gotta check if you can still get the gold, you know .... 8-) ); and Im still not disliking the game, which is a good sign I guess :D

Next step for me now is to add some alternative codepaths for QL assembly and see if I can get an executable that loads and draws something on screen; to simply check if I can load+run the assembled binary on QL. Once that works, the next step is effectively replacing the ST display part for the QL display part. I have no real idea what Im getting into just yet, but Im hoping for some progress on this by next weekend.

Attached you find an overview of the sprites from the game:
sprites_orig.png
sprites_orig.png (4.87 KiB) Viewed 2914 times
I do not foresee any problem (just yet) in converting this to QL (color wise). As such, are there any suggested QL graphics conversion tools for Windows/OSX ?

Re: Maziacs / Bugziacs Conversion for QL

Posted: Mon May 17, 2021 11:21 am
by spkr
Bah, testing made me show that my memory assumption was wrong, by quite some bytes. I managed to load a binary up to 85944 bytes under Q-emuLator. I suppose I have to go and search where to nibble off more bytes :geek:

Re: Maziacs / Bugziacs Conversion for QL

Posted: Tue May 18, 2021 4:11 pm
by spkr
First small success. Drawing text on the QL using ZX Spectrum basic code that has been converted to M68K and ported for QL :P.
Screenshot 2021-05-18 at 17.07.09.png
In comparison the Atari ST version I of the same actual code:



Time to get into the whole paper and ink stuff to adapt the actual graphics.
Screenshot 2021-05-18 at 17.09.12.png
And the actual ZX screen :)
Screenshot 2021-05-18 at 17.10.05.png

Re: Maziacs / Bugziacs Conversion for QL

Posted: Thu May 20, 2021 2:45 pm
by spkr
Little update. I managed to get the maze generation working; because the port seems to rely on a time-tick for this generation.... I hacked something around it, to improve later. So now we can generate a playable maze and it drops into gamemode (in 384kb QL emulation mode), but the screen is one big garbled mess due to not having the QL display output ported yet:
Screenshot 2021-05-20 at 15.43.03.png
And the gameplay:
Screenshot 2021-05-20 at 15.43.21.png
So I made a start in converting the tiles for QL display. Currently it uses a 1:1 conversion of data, but considering a lot of tiles are only a single color, I think this is where I can optimize for space as well (get a 1:4 compression ration for most of the single color tiles):
Screenshot 2021-05-20 at 15.41.25.png
Got good hopes I get something playable this weekend!

Re: Maziacs / Bugziacs Conversion for QL

Posted: Thu May 20, 2021 7:38 pm
by spkr
Whee, first crude, but functional playable game result!
Screenshot 2021-05-20 at 20.37.20.png
Now I cant wait to get the vdrive to start testing this on the real machine. It seems at first glance that speed-wise the game is acceptable.

Re: Maziacs / Bugziacs Conversion for QL

Posted: Fri May 21, 2021 9:51 am
by spkr
Small update on the tiles and drawing method; its complete now for the gameplay. Also reworked the maze generation, and now the game is playable and winnable.

The 256x192 ratio from the original ZX game makes it feel a bit stretched in width on the QL, so I stretched the tiles a bit vertically, but Im not sure yet if this is the way to go.

Nonetheless, progress!
Screenshot 2021-05-21 at 10.44.24.png
Things to do:
- make use of basic menu
- port minimap/overlay map
- make the game replayable, rather than crashing on game end
- [optional] add sound effects (havent figured or tried this out at all yet)
- make it fit in 86000 bytes

Re: Maziacs / Bugziacs Conversion for QL

Posted: Fri May 21, 2021 12:30 pm
by vanpeebles
Impressive :shock: