ZX ULAX emulator

Struggling with Fuse or trying to find an emulator with a specific feature. Ask your questions here.
Post Reply
User avatar
RMartins
Manic Miner
Posts: 776
Joined: Thu Nov 16, 2017 3:26 pm

Re: ZX ULAX emulator

Post by RMartins »

Lethargeek wrote: Wed May 27, 2020 5:06 pm
RMartins wrote: Wed May 27, 2020 3:22 pm It covers on how to provide the argument files to the executable, but apparently that is not the only thing that is needed.
See? This is what i mean. This time it looks like you didn't read @PeterJ's excellent message to the end. :lol: :cry:
If after reading @PeterJ's excelente message to the end, you don't realise you have an UI issue, you are too deep into the code and technical details and not the UI experience it provides.
User avatar
RMartins
Manic Miner
Posts: 776
Joined: Thu Nov 16, 2017 3:26 pm

Re: ZX ULAX emulator

Post by RMartins »

Lethargeek wrote: Wed May 27, 2020 1:32 am ... SOME emulators might have disk/tape autostart but not all and it doesn't work properly every time. Okay, most (if not all) other emulators run a snapshot immediately as the name is selected but there are use cases when it's not desired or inconvenient so i decided to actually run it with a hotkey at the right moment.

Same about running a corresponding dux driver.
...
I'm going to go on a limb here and give you some advice on this particular issue from an UI perspective.

It seems, to me, that those particular choices you made is what is breaking the UI principle of least surprise.
When you run a command in the command line, you don't expect the parameters to not have any immediate effect.

So telling the emulator "here are the files to load" but nothing actually happening (in visual terms, i.e. no application running) it will make the users doubt if the first step was correct or they missed something.

It also makes it a lot harder to automate launching a game using your emulator. i.e. you need some way to inject key presses to it, to make it work as expected.

If you really need to not have the application start for development purposes or similar special or power user cases, then make it configurable and most importantly NOT the default behaviour.

So provide an extra parameter, -noLaunch, -noRun, or whatever you find suitable, so that the default behaviour is what the user expects.
The developer (you) or power Users that need the special case, can then use this new parameter to force that behaviour.

My long UI 2 cents.
I hope it is helpful.
User avatar
Lethargeek
Manic Miner
Posts: 734
Joined: Wed Dec 11, 2019 6:47 am

Re: ZX ULAX emulator

Post by Lethargeek »

RMartins wrote: Wed May 27, 2020 9:39 pm You are not listening.
I didn't even mention windows anywhere.
And you are not reading even your own messages it seems. You didn't mention windows, but your words imply much more than just windows:
RMartins wrote: Wed May 27, 2020 12:06 pm Instead of relaying on any assumption (and I know this is difficult to do, because we do not realise easily that we are assuming stuff, because they are so obvious to the person assuming them), a manual or README file should not, i.e. MUST not assume any prior knowledge, and simply list every single step required, no matter how obvious it is, to do some specific action.
ANY prior knowledge, EVERY SINGLE STEP required, NO MATTER HOW OBVIOUS it is
Your words. Or did YOU just assume any prior knowledge of how one must interpret them?
RMartins wrote: Wed May 27, 2020 9:39 pm Maybe you are too eager to jump on people, without first trying to understand the context.

I for one, was replying based on content I saw on the previous page, I didn't even see this page, while I was writing my post.
So don't be too quick to jump to conclusions.
Oh my... i'm really getting tired of people blaming ME for THEIR faults. What the previous page has even to do with it?
First, you were quoting [mention]PeterJ[/mention]'s message about the tutorial located on the same page, not on the previous one, here:
RMartins wrote: Wed May 27, 2020 3:22 pm
PeterJ wrote: Wed May 27, 2020 12:11 pm Hopefully my tutorial covered that @RMartins.
Yes and no.

It covers on how to provide the argument files to the executable, but apparently that is not the only thing that is needed.
Second, in your reply to this quote it was YOU so eager jumping to the conclusion that is obviously wrong for anyone who had read the tutorial mentioned. This is why i said looks like you didn't read it.
RMartins wrote: Wed May 27, 2020 9:44 pm If after reading @PeterJ's excelente message to the end, you don't realise you have an UI issue, you are too deep into the code and technical details and not the UI experience it provides.
His message is a tutorial. These are being written for any app no matter ho much advanced the UI. The problem is rather people not realising that in multitasking environment you can have any UI you want.
Last edited by Lethargeek on Wed May 27, 2020 11:06 pm, edited 1 time in total.
User avatar
Lethargeek
Manic Miner
Posts: 734
Joined: Wed Dec 11, 2019 6:47 am

Re: ZX ULAX emulator

Post by Lethargeek »

RMartins wrote: Wed May 27, 2020 9:56 pm I'm going to go on a limb here and give you some advice on this particular issue from an UI perspective.

It seems, to me, that those particular choices you made is what is breaking the UI principle of least surprise.
A surprise comes out of the wrong expectations. I'm not responsible for the expectations of the other people. Especially when they don't read the files telling them exactly what to expect (and not telling what to not expect).
RMartins wrote: Wed May 27, 2020 9:56 pm When you run a command in the command line, you don't expect the parameters to not have any immediate effect.
If it's a non-interactive app, so not the case here. And actually, not even then - for example, specifying several output file names for the compiler doesn't make all of them appear every time. Also there IS an immediate effect - replacing and remembering the given name(s) :P

And the same actually happens when you open a tape or disk image in many other emulators. You still usually need to do some extra actions to load it. So why it should be much different just for the one and only source type? Do tell about the unexpected!
RMartins wrote: Wed May 27, 2020 9:56 pm So telling the emulator "here are the files to load" but nothing actually happening (in visual terms, i.e. no application running) it will make the users doubt if the first step was correct or they missed something.
Why? The only cause i see here is "because they didn't read the manual". A very short manual. Never promising a load happens immediately.
RMartins wrote: Wed May 27, 2020 9:56 pm It also makes it a lot harder to automate launching a game using your emulator. i.e. you need some way to inject key presses to it, to make it work as expected.

If you really need to not have the application start for development purposes or similar special or power user cases, then make it configurable and most importantly NOT the default behaviour.
Again, these are YOUR expectations. You just want YOUR use case to be default. As for me, i'm not making it any "special" case, but providing the most flexible method at least (and very fast as well). And you can't automate launching every game anyway, not every one is a snapshot (and there are complications for snapshots considering the colorization). Also what's the problem really? Is pressing a few extra keys so hard for you? You will have to press so much more in the game, so the difference is negligible.
RMartins wrote: Wed May 27, 2020 9:56 pm So provide an extra parameter, -noLaunch, -noRun, or whatever you find suitable, so that the default behaviour is what the user expects.
The developer (you) or power Users that need the special case, can then use this new parameter to force that behaviour.
maybe the opposite (definitely NOT doing running a snapshot as default!)
and it's very low priority as it seems really superfluous even next to other possible bells and whistles
Last edited by Lethargeek on Wed May 27, 2020 11:04 pm, edited 1 time in total.
User avatar
MonkZy
Manic Miner
Posts: 278
Joined: Thu Feb 08, 2018 1:01 pm

Re: ZX ULAX emulator

Post by MonkZy »

Hi [mention]Lethargeek[/mention] ,

Great project!

I am a Linux user so I have tested your emulator using Wine. The emulator works in both the original mode and the extra colour mode and looks amazing!

I do have a problem with sound which I am trying to solve, so I have a question. Do you use openAL for sound in your emulator?
AndyC
Dynamite Dan
Posts: 1387
Joined: Mon Nov 13, 2017 5:12 am

Re: ZX ULAX emulator

Post by AndyC »

Lethargeek wrote: Wed May 27, 2020 10:58 pm Again, these are YOUR expectations. You just want YOUR use case to be default. As for me, i'm not making it any "special" case, but providing the most flexible method at least (and very fast as well). And you can't automate launching every game anyway, not every one is a snapshot (and there are complications for snapshots considering the colorization). Also what's the problem really? Is pressing a few extra keys so hard for you? You will have to press so much more in the game, so the difference is negligible.
Windows has a bunch of conventions for how applications work for precisely this reason. If you choose to go down a very different route and break those conventions, then yes you really are going to have to expect to explain how it works over and over again because people will always make reasonable assumptions based on how things usually work. Getting angry at them because they struggle to follow the instructions in a text file is never going to change that.

At the end of the day, it's your application to do with as you please. However if the goal is to show of your hardware technique and get people interested in investing time on upgrading games then it may very well reward you more to bring some simplicity and convention to the interface, even if it isn't as fast for you personally.
User avatar
Lethargeek
Manic Miner
Posts: 734
Joined: Wed Dec 11, 2019 6:47 am

Re: ZX ULAX emulator

Post by Lethargeek »

MonkZy wrote: Wed May 27, 2020 11:02 pm Hi @Lethargeek ,

Great project!

I am a Linux user so I have tested your emulator using Wine. The emulator works in both the original mode and the extra colour mode and looks amazing!

I do have a problem with sound which I am trying to solve, so I have a question. Do you use openAL for sound in your emulator?
Hi, glad you like it! I do everything with just basic SDL, both sound and video. I know people are having sound problems under wine, but i'm not competent enough to solve it. I remember one guy on the russian forum was able to fix the sound (at least for himself) with some reconfiguring, maybe i will find it now but no promises.
User avatar
Lethargeek
Manic Miner
Posts: 734
Joined: Wed Dec 11, 2019 6:47 am

Re: ZX ULAX emulator

Post by Lethargeek »

AndyC wrote: Wed May 27, 2020 11:11 pm Windows has a bunch of conventions for how applications work for precisely this reason. If you choose to go down a very different route and break those conventions, then yes you really are going to have to expect to explain how it works over and over again because people will always make reasonable assumptions based on how things usually work. Getting angry at them because they struggle to follow the instructions in a text file is never going to change that.
i'm not aware of any official convention demanding every command line parameter or dropped file to make an immediately visible effect
AndyC wrote: Wed May 27, 2020 11:11 pm At the end of the day, it's your application to do with as you please. However if the goal is to show of your hardware technique and get people interested in investing time on upgrading games then it may very well reward you more to bring some simplicity and convention to the interface, even if it isn't as fast for you personally.
But the intended hardware was never supposed to be operated exactly like the emulator. There is now one example of possible "real" release in the ULAX-emuL archive (test\elopulax.scl), just to give a taste of it. Basically you just load a disked game as usual, it's will run some code to preload the driver, then the game, and then the driver will be activated at the right moment. But it will need a converter tool to automate making such a release, and it's not ready yet (and even the exact hardware interface logic isn't decided).
Last edited by Lethargeek on Wed May 27, 2020 11:27 pm, edited 1 time in total.
User avatar
MonkZy
Manic Miner
Posts: 278
Joined: Thu Feb 08, 2018 1:01 pm

Re: ZX ULAX emulator

Post by MonkZy »

[mention]Lethargeek[/mention] ,

I guessed it was a Linux issue. OpenAL is not used much on windows. I will figure it out :D

For reference :

On Linux, download the emulator and games from the links in the opening post (i use google drive)

Create a folder and place the contents of the 'exe' folder from ULAX-emuL.zip

Copy the game files you wish to play into the same folder, include both the .sna and the .dux files.

In a terminal, navigate to the emulator directory and launch the emulator.

Code: Select all

cd ~/path/to/emulator
wine emuL.exe game.sna game.dux
The emulator will start in 128K TR-DOS. Press 'End' to load the snapshot. Press 'PG DN' to switch to enhanced graphics (.dux).
User avatar
Lethargeek
Manic Miner
Posts: 734
Joined: Wed Dec 11, 2019 6:47 am

Re: ZX ULAX emulator

Post by Lethargeek »

MonkZy wrote: Wed May 27, 2020 11:26 pm Copy the game files you wish to play into the same folder, include both the .sna and the .dux files.
i myself prefer not to mix the game files and the emulator files in the same folder, but whatever works for you :)
User avatar
MonkZy
Manic Miner
Posts: 278
Joined: Thu Feb 08, 2018 1:01 pm

Re: ZX ULAX emulator

Post by MonkZy »

You are right, of course :D Keeps it simple for typing the command :oops:
User avatar
MonkZy
Manic Miner
Posts: 278
Joined: Thu Feb 08, 2018 1:01 pm

Re: ZX ULAX emulator

Post by MonkZy »

I have solved the Linux sound issue. I had to install some windows audio drivers (xact).

Code: Select all

winetricks xact
Emulator works 100% under wine. Fantastic!
User avatar
Lethargeek
Manic Miner
Posts: 734
Joined: Wed Dec 11, 2019 6:47 am

Re: ZX ULAX emulator

Post by Lethargeek »

[mention]Sokurah[/mention] - i updated Dingo to 1.3 and improved it a bit (thrown fruits are now properly repainted with 2 colors)

Also found a bug with the bonus fruit info we talked about - when getting a new life, it becomes corrupted, as the top symbol row and 2 top attribute rows are overwritten. I fixed it with temporary memory protection trick, but the fix only works in the FULL color mode of course.
User avatar
MonkZy
Manic Miner
Posts: 278
Joined: Thu Feb 08, 2018 1:01 pm

Re: ZX ULAX emulator

Post by MonkZy »

I have written a short shell script to make loading games simpler under Linux/WINE. Simply use the file selection GUI to navigate to the snapshot of the game you wish to launch and double-click it.

Code: Select all

#! /bin/sh

filename=$(zenity --file-selection --title "Select a Snapshot" --file-filter='*.sna *.scl')
dux="${filename%sna}dux"
wine emuL.exe $filename $dux
The .dux file must have the same prefix as the .sna/.scl snapshot files for this script to work. This will involve renaming/duplicating a few of the files in the example games folder.

Today, I am mostly playing Wheelie with no colour clash.

[edit] This script must be launched from the emulator folder!
User avatar
Lethargeek
Manic Miner
Posts: 734
Joined: Wed Dec 11, 2019 6:47 am

Re: ZX ULAX emulator

Post by Lethargeek »

[mention]MonkZy[/mention], scl is not a snapshot but a disk image (a cut down version of trd) and fdi format is supported as well
and besides a sna there might be a z80 snapshot or even a tap image (not in the current game pack but possible)
also with (or instead of) dux there might be a xna (VRAM snapshot) alongside its sna (a pair of quicksave files renamed)

so i think the complete code script should look like this

Code: Select all

#! /bin/sh

filename=$(zenity --file-selection --title "Select a Snapshot" --file-filter='*.sna *.z80 *.tap *.scl *.trd *.fdi')
dux="${filename%sna}dux"
xna="${filename%sna}xna"
wine emuL.exe $filename $dux $xna
(not sure if it still works if either dux or xna is absent) :)
User avatar
MonkZy
Manic Miner
Posts: 278
Joined: Thu Feb 08, 2018 1:01 pm

Re: ZX ULAX emulator

Post by MonkZy »

[mention]Lethargeek[/mention] The script works just fine! I guess your emulator silently ignores the missing file.

I am currently trying to understand how the .dux file works, being able to use .tap files is useful.
User avatar
Lethargeek
Manic Miner
Posts: 734
Joined: Wed Dec 11, 2019 6:47 am

game pack update

Post by Lethargeek »

Only one game now, but with diverse gameplay experience - Sigma-7. Very complicated code with lots of attribute effects. I was even forced to poke one byte in the original Z80 code to get the perfect result, otherwise some wrong colors persisted under the sprites in the phase 3 (as background attrs output was skipped in the original code if there was already a sprite attr). Curiously, it had almost no effect in the original spectrum video, just some occasional slight flicker. Maybe it's possible to get the same result without the poke, but i don't feel like digging into this code further. :)
User avatar
Lethargeek
Manic Miner
Posts: 734
Joined: Wed Dec 11, 2019 6:47 am

yet another game looks as intended

Post by Lethargeek »

Championship 3D Snooker was a horrible mess of attributes most of the time (except the very endgame when there were only a few balls left). Now i was able to fix both 2D and 3D scenes properly, also gave the balls more traditional colors. Check it out.

Btw what snooker game (and any cue sport game in general) is considered as the best one ever made for Spectrum?
This one, while being the most interesting case for adaptation, is simplified with only 6 red balls played on smaller table.
User avatar
Lethargeek
Manic Miner
Posts: 734
Joined: Wed Dec 11, 2019 6:47 am

Re: ZX ULAX emulator

Post by Lethargeek »

Oh, and i forgot to say it's best to enable the FULL mode (with PgDn key) right at the title screen and leave it (no mid-game pressing PgUp/PgDn). Well, unless you want to see some weird artifacts as the ball sprites in the 2D scene are xored over each other in different modes. :)
theshrivelledmidget
Drutt
Posts: 2
Joined: Sat Jul 04, 2020 12:08 pm

Re: ZX ULAX emulator

Post by theshrivelledmidget »

Thanks for the emulator, the games iv'e tried look fantastic. :D
User avatar
Lethargeek
Manic Miner
Posts: 734
Joined: Wed Dec 11, 2019 6:47 am

double update

Post by Lethargeek »

public beta 19 fixes and improves some things overlooked in the earlier versions. The most important change is dux loader now using the active address mapper to place some recolored pixel data into the "screen memory" area (instead of sending everything straight to the "pixel memory" as before). It does matter for some 128k games using only one screen buffer as a screen, treating the other one just as an ordinary memory page to store code/variables/buffers/gfx data. One such example is 128k extended version of Renegade. As i found, it has some glitchy sprites (masks mostly) - hard to see on the standard ZX screen, but immediately obvious if recolored; and some of these sprites were kept in the beginning of page7. While it was possible to put the pixels directly in the screen area for the old version, with the new one it's much more convenient, and was done for it. So download both the new emulator and the game pack for the fix to work properly.
User avatar
Lethargeek
Manic Miner
Posts: 734
Joined: Wed Dec 11, 2019 6:47 am

game pack update

Post by Lethargeek »

Never was a big fan of Batty - found it too hard, too fast and too unfair with bonuses for my liking (the best of all ZX Breakout clones is Impact IMO). But some people think Batty is a great game and requested it repeatedly. So here it is, looking even better than ever (the one undeniable thing about Batty is it looking better than any other ZX Breakout clone).
User avatar
MonkZy
Manic Miner
Posts: 278
Joined: Thu Feb 08, 2018 1:01 pm

Re: ZX ULAX emulator

Post by MonkZy »

Batty looks great! Just enough colour to lift the sprites/score off of the background.
User avatar
Lethargeek
Manic Miner
Posts: 734
Joined: Wed Dec 11, 2019 6:47 am

Re: ZX ULAX emulator

Post by Lethargeek »

MonkZy wrote: Sat Aug 01, 2020 3:36 am Batty looks great! Just enough colour to lift the sprites/score off of the background.
TBH i felt a bit lazy (again) and just assigned same colors for almost everything :)
while metallic bluish seemed right for the most objects, maybe bonuses might look better different
so if someone feels like adding more paint, it is easy, just append some magic numbers to the dux file:

Code: Select all

80xxxx FFFC yyyy zzzz
where xxxx = hex address of the 1st byte of any sprite line (not necessarily the top one)
yyyy = ink (lighter color in this game) and zzzz = paper (darker color) in GRB555 hex format
(will be active starting from this line till the end of the sprite or till the next color assignment)
User avatar
Lethargeek
Manic Miner
Posts: 734
Joined: Wed Dec 11, 2019 6:47 am

game pack update

Post by Lethargeek »

Two more games today.

Super Sleuth sprites were colored so i just kept the original colors (removing the clash of course).
Didn't test it thoroughly but looks like everything works.

Cosa Nostra has no sprite color info in the game and i was feeling lazy, so all were made white with black outlines for now, giving a cleaner picture. Maybe i will add more colors later, as i did with the Blade Warrior.

Same links on the 1st page as always.
Post Reply