MZ-700 demos

Is there such a thing as an MZ demoscene?
MooZ
Posts: 38
Joined: Thu Mar 01, 2018 9:39 am

Re: MZ-700 demos

Post by MooZ »

I haven't since I'm testing using the MZ-700 emulator from the common source code project. It's like running them on a NTSC machin with international charset.
I tried Mame when I started but it was not that great.

I'll make a test this week end.
hlide
Posts: 681
Joined: Thu Jan 25, 2018 9:31 pm

Re: MZ-700 demos

Post by hlide »

I modified EmuZ-700 source to make a PAL version with PAL timings (borrowed from EmuZ-800). The purpose was to test my current game which is written to use the PAL timings. I tried several demos (including yours) I could find on Pouët website. There is only one demo (neotokyo) which fails on the last part (the one with graphics), be it with PAL or NTSC EmuZ-700.
hlide
Posts: 681
Joined: Thu Jan 25, 2018 9:31 pm

Re: MZ-700 demos

Post by hlide »

Here is the link to the binary package offering both PAL and NTSC version of EmuZ-700: the PAL version runs the CPU at the expected frequency (17MHz/5 and not 14MHz/4), the FPS will be capped to 50 instead of 60 and the video timings are those given in the PAL MZ-700 service manual. I maybe miss something as things in EmuZ-700 tend to be hardcoded though. It is no clear the video capture is really capturing 60fps or means a full capture (and so 50fps in fact).

The handling of BLNK signal doesn't seem to be emulated strictly as the document says: /BLNK is shorter than /HBLNK and should have a shift that I don't see in the emulator. I wonder it may explain the bad result with neotokyo at the end.

Link: https://www.dropbox.com/s/6tuyibps8zb4g ... 00.7z?dl=0
MooZ
Posts: 38
Joined: Thu Mar 01, 2018 9:39 am

Re: MZ-700 demos

Post by MooZ »

I made a quick test by adding a extra push/pop to the line update. It worked but the last word is repeated as I ran out of registers.

Code: Select all

macro raster_update, index
    ld sp, ix
    pop bc
    pop de
    pop hl
    exx
    pop bc
    pop de
    pop hl
    pop hl

    ld sp, iy
    push hl
    push hl
    push de
    push bc
    exx
    push hl
    push de
    push bc
    
    ld bc, 14
    add ix, bc
mend
Capture d’écran du 2020-05-24 16-33-09.png
Capture d’écran du 2020-05-24 16-33-09.png (13.34 KiB) Viewed 8895 times
I tried to save the penultimate hl but it's taking too long.

Code: Select all

macro raster_update, index
    ld sp, ix
    pop bc
    pop de
    pop hl
    exx
    pop bc
    pop de
    pop hl
    ld (dummy_{index}), hl
    pop hl

    ld sp, iy
    push hl
dummy_{index} = $ + 1
    ld hl, 0x0000
    push hl
    push de
    push bc
    exx
    push hl
    push de
    push bc
    
    ld bc, 14
    add ix, bc
mend
Capture d’écran du 2020-05-24 16-37-28.png
Capture d’écran du 2020-05-24 16-37-28.png (13.3 KiB) Viewed 8893 times
One solution may to remove inline the whole display loop in order to save 29 cycles by removing:

Code: Select all

    ld bc, 14
    add ix, bc
Attachments
Capture d’écran du 2020-05-24 16-33-09.png
Capture d’écran du 2020-05-24 16-33-09.png (13.34 KiB) Viewed 8893 times
hlide
Posts: 681
Joined: Thu Jan 25, 2018 9:31 pm

Re: MZ-700 demos

Post by hlide »

What about something like that?

Code: Select all

macro raster_update, index, start
    ld sp, start ; to set it with the right initial value before the first raster_update, 0 otherwise
    pop bc
    pop de
    pop hl
    exx
    pop bc
    pop de
    pop hl
    pop ix

    ld sp, iy
    push ix
    push hl
    push de
    push bc
    exx
    push hl
    push de
    push bc
    
    ld a, 14
    add a,(.sp{index}+1)
    ld a,0
    adc a,(.sp{index}+2)
mend
I counted 85 cycles for the critical BLNK part (<92 cycles) and the whole macro is taking 201 cycles for a line (<228 cycles)

EDIT: I added a second argument.

Code: Select all

raster_update 0, ix
...
.sp0: raster_update 1, 0
...
.sp1: raster_update 2, 0
...
.sp{N-1}: raster_update N, 0
...
	db $DD
.sp{N}: ld hl,0 ; ld ix, 0
MooZ
Posts: 38
Joined: Thu Mar 01, 2018 9:39 am

Re: MZ-700 demos

Post by MooZ »

I completely forgot about ex af,af' :)
test.zip
(1.59 KiB) Downloaded 358 times
hlide
Posts: 681
Joined: Thu Jan 25, 2018 9:31 pm

Re: MZ-700 demos

Post by hlide »

I was always unconfortable to use EX AF,AF' because I wrongly thought POPing AF could enable interrupt but you're right it could perfectly fit here! good finding!
hlide
Posts: 681
Joined: Thu Jan 25, 2018 9:31 pm

Re: MZ-700 demos

Post by hlide »

So with EmuZ-700 (PAL timings): should work.
2020-05-31_00-19-40.png
2020-05-31_00-19-40.png (9.61 KiB) Viewed 8783 times
And with EmuZ-700 (NTSC timings): shouldn't work.
2020-05-31_00-19-55.png
2020-05-31_00-19-55.png (11 KiB) Viewed 8783 times
So the last test is to run it on my real MZ-700 to check it works.

The source will be available on GITHUB?
hlide
Posts: 681
Joined: Thu Jan 25, 2018 9:31 pm

Re: MZ-700 demos

Post by hlide »

MooZ, serais-tu français ou francophile ? les noms de tes fichiers de capture d'écran sont... en français.
MooZ
Posts: 38
Joined: Thu Mar 01, 2018 9:39 am

Re: MZ-700 demos

Post by MooZ »

Exactement :)

And... it doesn't work on a real mz700.
Attachments
P_20200531_125332_1.jpg
Post Reply