Page 1 of 3

Metropolis, a proper ZX80/81 demo

Posted: Wed Dec 13, 2017 6:00 pm
by nollkolltroll
Here is a release candidate of the demo I've been writing lately. The code is done, but I need testers, so please run it on your HW and give me feedback on how well it ran. When enough tests has been done, I will make a proper release with source code and docs, YouTube video etc.

Runs on: ZX80 or ZX81 with 8k ROM, 16k RAM. Uses PseudoHires, so no WRX required.
I've tested it on my Minstrel and ZX81 as that is what I have. EightyOne 1.8 runs it as ZX81, but NOT as ZX80.

It started life as a ZX80 demo, but was relatively simple to make ZX81-compatible.

EDIT: removed the release candidate file, look in post #5 for a full description and a release zip-file.

Re: Metropolis, a proper ZX80/81 demo

Posted: Wed Dec 13, 2017 8:26 pm
by Shaun_B
Amazing! I'll check it on my ZXMore later as this is the only ZX81 that I currently have working. I do have a Mistrel Clone as well, but no ZXPand.

Thanks,

Shaun.

Re: Metropolis, a proper ZX80/81 demo

Posted: Wed Dec 13, 2017 8:52 pm
by sirmorris
Working fine on a real ZX80 with '81 ROM installed! Great stuff :D

Now where's the music? ;)

Re: Metropolis, a proper ZX80/81 demo

Posted: Wed Dec 13, 2017 9:39 pm
by Shaun_B
Unfortunately it doesn't work on the ZXMore currently.

Thanks,

Shaun

Re: Metropolis, a proper ZX80/81 demo

Posted: Fri Dec 15, 2017 2:19 pm
by nollkolltroll
Metropolis started when I decided to get a Minstrel ZX80-clone. Through the years I have wondered what it would be like to code for the ZX80, similar and different as it is from the ZX81 which I am quite familiar with.
The result is a graphical demo which works on both the ZX81, and the ZX80 with 8k or 4k ROM, plus a 16k RAM expansion. No need for WRX-modified memory, PseudoHires to the rescue!

Metropolis runs in 312-line 50 Hz mode regardless of the position of the PAL/NTSC-switch. Sorry about that, but it felt best not to create an almost-NTSC version with 4 extra lines.

Not being able to shut off the HSync generator on the ZX81 is a really annoying "feature", making it less flexible than the ZX80 :(
I started coding 208-cycle lines to create a true 15625 Hz raster frequency, but I changed it to 207 cycles when I wanted to be ZX81 compatible.

The demo is an orgy in cycle counting, and not using any of the ROM code except as character table for the PseudoHires graphics. Quite a lot of time was spent on experimenting with the generation of the graphics. The picture was converted to look as good as possible within the limitations of PseudoHires.

Source code is enclosed, released as public domain. Hopefully someone will get some joy from it.

Developed with and tested on: FASMW-ZX 1.71.01u, EightyOne v1.8, Minstrel with ZXpand, ZX81 with ZXpand+. The serial transfer of the ZXpand is truly amazing when developing!

mtrpls81.p is for the 8k ROM ZX80 and ZX81
mtrpls80.o is for the 4k ROM ZX80

EDIT: changed mtrpls81.p to NOT autoboot as it messed up the HSync timing. Replaced zip-file.

Re: Metropolis, a proper ZX80/81 demo

Posted: Sun Dec 17, 2017 6:26 pm
by kpalser
Hi Adam and other video display experts,

I popped the ZX80 and ZX81 versions of the demo into a development version of my ZX81 emulator iOS app. The screen started to roll. So I experimented with the vertical sync window in the CRT emulation code to no avail and then looked at the Adam's code. I was surprised to see the GenerateVSync routine had a lot shorter sync duration than I expected, the equivalent of around 3 display lines compared to a figure closer to 6 that I had been using up to now as a trigger. Sure enough after updating the emulator code the rolling stopped.

I've had a cursory look at at other bundled programs in my app like Bodo Wenzel's demos and a shorter v-sync trigger duration does not have a detrimental effect. CRTs can vary but what would be considered a norm for a sync signal duration (within the vertical sync window) to be sufficient to trigger a vertical retrace?

When I run the ZX80 version of the demo the image is offset quite significantly to the right. So that will be my next point to investigate.

Thanks Adam for your demo - looks like as a by-product you have improved my app.

Kevin

Re: Metropolis, a proper ZX80/81 demo

Posted: Sun Dec 17, 2017 7:40 pm
by Moggy
Works perfectly on my ZX80 with 8k ROM and ZXpand.

I'm using old fashioned AIWA CRT colour TV and apart from the display being a bit up and to the right(not as bad as H4th thank god) it works great. :D

Re: Metropolis, a proper ZX80/81 demo

Posted: Sun Dec 17, 2017 8:05 pm
by nollkolltroll
3 lines is what the Atari 2600 used, and I've read on several other sources that 2.5 for interlaced or 3 for progressive is the correct PAL vsync length. More can be used though, as other zx80 programs do.

The right shift on zx80 is present on the Minstrel zx80 clone as well, I can't do anything about that. There was no more cycles left.

Re: Metropolis, a proper ZX80/81 demo

Posted: Sun Dec 17, 2017 8:10 pm
by Moggy
No worries Adam it's running now as I type this and looks fantastic, great work sir. :ugeek:

Re: Metropolis, a proper ZX80/81 demo

Posted: Mon Dec 18, 2017 9:58 pm
by nollkolltroll
Kevin, if you REALLY need more to fix in your emu, have a look at my interlaced picture tech for the ZX81...