Topic: PhaserX on Sharp MZ700

Here's a quick conversion of PhaserX engine.
I converted the full asm output of bintracker.
The changes are quite light but I think it messed up timing a little bit. The song seems to be slower compared to bintracker replay.

out (#fe), a

is replaced by

and #08
or  #20
ld  (0xe007), a

I 'm quite new to z80 so there may be a faster way smile

Here's a short video of the music playing on my Sharp MZ720 and I attached the modified output.
https://www.youtube.com/watch?v=mOC-X9ich1o

Post's attachments

music.asm 35.43 kb, 3 downloads since 2018-03-23 

You don't have the permssions to download the attachments of this post.

Re: PhaserX on Sharp MZ700

Awww man, that's awesome! I been drooling over the Sharp MZ machines for a long time but it just seems impossible to get one nowadays. Besides, my shelf is crammed full already big_smile

Regarding the timing, I wouldn't worry too much. Sounds good enough to my ears. And the PhaserX algorithm is rather forgiving as far as timing is concerned. Plus MZ is slightly faster after all wink Depending on what the other bits in #e007 do you could maybe cut a corner and leave off the 'or #20', dunno. In theory on ZX Spectrum we should mask the border with 'and #10' but the machine doesn't die if you don't do it so... Anyway, if you wanted to be really precise you could re-calculate the note equates used by bintracker but that'd be slightly overkill imo.

Btw what do you have to do to transform the resulting binary into a file loadable by the actual machine? I'm asking because at some point I might want to add it as an extra target in bintracker.

Re: PhaserX on Sharp MZ700

Unfortunately the or #20 is mandatory hmm
To convert the binary to tape I'm using a modified version of bin2m12 that allows you to set the program name.
The original version was taken from z88dk ( https://github.com/z88dk/z88dk/blob/mas … /bin2m12.c ).

Post's attachments

bin2m12.c 2.31 kb, 4 downloads since 2018-03-24 

You don't have the permssions to download the attachments of this post.

Re: PhaserX on Sharp MZ700

Thanks, seems simple enough. Will credit you once I add it to bintracker of course. It may take a while before I get around to it, though.

5 (edited by hlide 2021-07-04 13:49:24)

Re: PhaserX on Sharp MZ700

So far, that #20 is for format:

#00    0 0    — x —    Latch counter value. Next read of counter will read snapshot of value.
#10    0 1    mode    Read/Write low byte of counter value only
#20    1 0    mode    Read/Write high byte of counter value only
#30    1 1    mode    2×Read/2xWrite low byte then high byte of counter value

We can use #10/#20/#30 and #18/#28/#38 *BECAUSE* we never set the counter value after setting the MODE. Unhopefully, #00 and #08 cannot work *because* they are not setting the MODE which is the condition to set a default value to OUT0 immediately.