ZX ULAX emulator

Struggling with Fuse or trying to find an emulator with a specific feature. Ask your questions here.
Post Reply
User avatar
Lethargeek
Manic Miner
Posts: 256
Joined: Wed Dec 11, 2019 6:47 am

ZX ULAX emulator

Post by Lethargeek »

Yet another "enhanced" Spectrum emulator for those interested.

Some of you might have seen the videos on this channel:

https://www.youtube.com/channel/UCu76xC ... YJQ/videos

It was started as an ancillary project to help with the (very slow unfortunately) development of hardware video extension (codename ULAX) for the ZX Spectrum (and probably some other Z80-based machines). The secondary goal was testing some emulation ideas not necessarily linked to the ULAX.

The ULAX itself was intended to provide easy-to-use enhanced graphics capabilities, easy to the point of allowing fast improvement even of the existing Spectrum sotware without any source code and using any of the new features as an option augmenting an old Spectrum-style code to any extent. Compared to Spec256 approach it is more flexible and capable (needs less time for simpler results, preserves most attribute effects and allows at least some improvement with compressed gfx) but requires at least basic Z80 machine code knowledge.

Current state of the emulator (as of may 2020):

The hardware emulated is a basic model of Russian Pentagon-128k clone with AY, Beta-disk and ULAX attached. This specific machine wasn't a requirement for the ULAX, but allowed faster and simpler start with the emulator project. Some other Spectrum-compatible models might be added in the future.

Emulation of selected ULAX features (aimed at the existing software adaptation mostly) as a hardware (that is, not just a some software shader) with Z80 "machine cycle" precision. Furthermore, the standard ZX ULA output is not emulated at all - everything you see is taken from the hi-colour (15-bit) GRB APA (all-point-addressable) display buffer, even when it looks just like usual Spectrum screen.

Good Z80 emulation accuracy (passing all the undocumented flags tests made by Patrik Rak).

Basic Beta-disk emulation, good enough for loading games, but some tricky demos might not work with it.

AY sound chip emulation with flexible timings, as the emulator is synchronised with the video refresh, not the sound. Again, good enough for games, but some sophisticated demos (like Atarin or digiSID) reliant on AY synced to Z80 precisely might not work as expected.

Special Adapturbo™ mode that keeps multicolour, beeper and digital AY sound intact unlike regular turbo. This is strictly emulation thing and has no relation to ULAX. Recommended for slower games, especially Freescape based.

Fullscreen mode with "fake border" for wide screens.

Selectable frame rate in the 48-60Hz range with automatic sound adjustment.

Interface is drag&drop with hotkeys + ini file. For details see emuL-info.txt


Download links:

mail.ru cloud public folder
https://cloud.mail.ru/public/3Rzu/33GtNmUof/

my zx-pk.ru blog with the same links separately
https://zx-pk.ru/entries/360-zx-ulax-do ... links.html

google drive mirror
https://drive.google.com/drive/folders/ ... 0pPUWFNZrm
(maintained by another person and might be out of date sometimes)


Sorry, but in-depth documentation will remain Russian-only for some time.
But there's enough English to run them games. ;)

Posted edited at the request of the author by PeterJ 07/05/2020
5 x

User avatar
Lethargeek
Manic Miner
Posts: 256
Joined: Wed Dec 11, 2019 6:47 am

Re: ZX ULAX emulator

Post by Lethargeek »

Also today the new public beta 5 version is released.

added basic support for z80 snapshots
drag&drop filenames onto the emulator window

game pack is the same, only its readme file was changed
1 x

Ralf
Dynamite Dan
Posts: 1522
Joined: Mon Nov 13, 2017 11:59 am
Location: Poland

Re: ZX ULAX emulator

Post by Ralf »

So it's yet another project which aims to recolor Spectrum games ;) Like Spec256, EmuZWin or this one: viewtopic.php?f=7&t=1634.

I must say that the games on these Youtube videos work really well, without any visible glitches. Flying Shark is especially nice, suddenly everything got much more visible.

Could you say in a few words how it works? Similar to existing solutions or something different?
1 x

User avatar
Lethargeek
Manic Miner
Posts: 256
Joined: Wed Dec 11, 2019 6:47 am

Re: ZX ULAX emulator

Post by Lethargeek »

Ralf wrote:
Wed Dec 11, 2019 7:53 pm
So it's yet another project which aims to recolor Spectrum games ;) Like Spec256, EmuZWin or this one
It aims much further. Basically, there are two opposite approaches about possible ZX graphics extensions:

1) Indirect: all recoloring is done "outside", Z80 code can't "see" it and has no control over it whatsoever. Like the examples you mentioned.
2) Direct: a new video mode (even as a layer over the standard Spectrum screen or things like hardware sprites) requiring a completely new Z80 code to use it, most likely in a very unspectrumlike way. The examples are Pentagon/ATM 16-color mode or the Spectrum NEXT.

This thing allows both methods, but indirect recoloring isn't even a main feature planned and is designed in a way so it doesn't hamper future developments (like blitter or mixing many virtual video "modes" on the same screen) and all the features should be as compatible one with another as possible (for example, pixels recolored indirectly could then be moved/scrolled directly with the blitter).

That said, the emulator in the current state is about the indirect approach (mostly). But even now it's more capable than Spec256 or the like - it may improve even the compressed graphics to some extent (see Redshift) and can paint the same source sprite with many different colors w/o the use of attributes (btw it still keeps standard attributes and even expands the capabilities).
Ralf wrote:
Wed Dec 11, 2019 7:53 pm
Could you say in a few words how it works? Similar to existing solutions or something different?
Somewhat similar, somewhat different. Physically it is planned as an FPGA-based external device with its own memory, plugged into the Spectrum's edge connector (the devboard might as well contain the Spectrum inside the same FPGA). Like Spec256 it has its own wide "graphics processor" executing code in parallel with the Spectrum. But unlike Spec256 it's much simpler, it's instructions aren't just wider clones of Z80 instructions and it doesn't have to follow the intent of the original Z80 procedure! Pixel format is also different, better suited for further enhancements. There are no hardware sprites, no layers like in the NEXT, everything is done on a single flat surface like Spectrum does. Just one physical screen mode like Spectrum but many write modes into many logical screen layouts.

There are some basic demos in the emulator archive (see "test" subdirectory) but these are just a glimpse of what to expect.
0 x

4thRock
Microbot
Posts: 158
Joined: Thu Nov 09, 2017 9:35 am
Location: Portugal
Contact:

Re: ZX ULAX emulator

Post by 4thRock »

Looks interesting and I like the graphic enhancements. It still looks like a Spectrum and that's good.
I wonder about new graphic modes, can you give more information ?

Gave it a try buy was unable to figure out how to load anything. Tried drag and drop and F4, no luck.
I know not having a GUI is intentional, but I think it's a waste of potential ;)
0 x

User avatar
Lethargeek
Manic Miner
Posts: 256
Joined: Wed Dec 11, 2019 6:47 am

Re: ZX ULAX emulator

Post by Lethargeek »

4thRock wrote:
Thu Dec 12, 2019 9:38 am
Looks interesting and I like the graphic enhancements. It still looks like a Spectrum and that's good.
I wonder about new graphic modes, can you give more information ?

Gave it a try buy was unable to figure out how to load anything. Tried drag and drop and F4, no luck.
I know not having a GUI is intentional, but I think it's a waste of potential ;)
Did you read the instructions in the game pack readme properly? What exact files have you dragged and dropped? F4 just starts/stops the tape (you still need to use LOAD"" command or the 128k menu loader) and it isn't used for the snapshots. To actually load the snapshot with the last dropped filename, press the End key. To load the dux with the last dropped filename, press PageDown key after that (or after the disk/tape access is finished).
0 x

4thRock
Microbot
Posts: 158
Joined: Thu Nov 09, 2017 9:35 am
Location: Portugal
Contact:

Re: ZX ULAX emulator

Post by 4thRock »

I gave the instructions a quick read, yes. Then pressed the keys randomly :D
Will try again later...
0 x

User avatar
Lethargeek
Manic Miner
Posts: 256
Joined: Wed Dec 11, 2019 6:47 am

Re: ZX ULAX emulator

Post by Lethargeek »

As for the "graphic modes", as i said earlier, there's just one physical mode with many different write modes possible. All you see (including the border) is a flat array of independently colored pixels with 15 bit color depth. By default, the Spectrum-compatible write mode is activated, producing a picture visually indistinguishable from the usual Spectrum screen. But even then you can select different "active colors" to draw on screen that aren't affected by attributes. Switching to another address mapper, the whole screen area can be accessed. There are two simple basic demos in the "test" subdirectory named mappertest1 and mappertest2. The 1st one outputs 8 square pixels of 2 colors per byte written to the screen, the 2nd one interprets the written byte as 4 rectangualr "low-res" pixels of 4 colors. But you can imagine anything that fits the physical mode limits.
0 x

User avatar
Lethargeek
Manic Miner
Posts: 256
Joined: Wed Dec 11, 2019 6:47 am

Game pack update!

Post by Lethargeek »

One of the advantages of the ULAX is very fast recoloring if you don't wanna repaint every pixel. So here are the new games, mostly with just sprites being recolored and free of clashing:

Leovigildo (4 parts)
Rade Blunner (2 parts)
...aaand the freshest
Yazzie from YRGB!

Just a quick reminder, when running a part of multi-part game from disk, you must give the emulator proper corresponding dux filename first and then actually load it (by pressing PgDn key) only after all of the disk access is finished and the game's menu/intro appears.

Same download link in the opening post.
2 x

User avatar
Lethargeek
Manic Miner
Posts: 256
Joined: Wed Dec 11, 2019 6:47 am

disaster strikes!

Post by Lethargeek »

Because the hosting provider is involved in some criminal wars over the business right now, zx-pk.ru is down (and i'm not sure if it ever comes back to life or won't change its name later). So here's another link directly to the cloud folder:

https://cloud.mail.ru/public/3Rzu/33GtNmUof

At least it's still on the 1st page of the thread. Not sure if it stills the same in the future though.
0 x

Post Reply