ZXBaremulator v3.H(ikoki) beta

Struggling with Fuse or trying to find an emulator with a specific feature. Ask your questions here.
zx81
Microbot
Posts: 138
Joined: Sat Feb 17, 2018 9:33 pm

ZXBaremulator v3.H(ikoki) beta

Post by zx81 »

Hi,

Thanks to a Recreated ZX kindly donated by Hikoki, I've added support for it to ZXBaremulator.

Now two keyboards can be connected to the PI, one USB standard keyboard and a Recreated ZX keyboard. The RZX keyboard needs to be configured in "Game" mode (switch in A position). The RZX keyboard will work by himself, but the special keys can't be acessed, so isn't possible to load any game. The logical combination is RZX+standard USB keyb.

The beta version can be downloaded from here: kernel7.img

MD5: e5bf681e218962f2a6074dcf589d8340

Best regards
zx81
Microbot
Posts: 138
Joined: Sat Feb 17, 2018 9:33 pm

Re: ZXBaremulator v3.H(ikoki) beta

Post by zx81 »

I've uploaded the version 3.H.3 with MD5: 80dac67ad70cf2d0f09038eb0eedc43a

This version can work without a standard USB keyboard. The idea is to have a key combination to change between the Spectrum mode and alternative mode. The selected combination is CS+SS+ENTER, and with every pressing the mode is changed (ON/OFF), and that's indicated by a screen message.

When keyboard is in alternative mode the keys are:

1-0 = F1-F10
F8 = start/stop tape, SS+F8 = change loading mode (real/high speed)
F9 = NMI

SS = acts as a sort of Alt key, so:

SS+2 = 48k model
SS+3 = 128k model
SS+4 = +2a model
SS+R = reset
SS+P = pause


inside the tape browser (F1):
Q = cursor up
A = cursor down
U = page up
D = page down
SPACE = tape select
CS + letter = go to the first tape that his name starts by the letter
User avatar
Pegaz
Dynamite Dan
Posts: 1209
Joined: Mon Nov 13, 2017 1:44 pm

Re: ZXBaremulator v3.H(ikoki) beta

Post by Pegaz »

I like this concept with a keyboard that works in two modes.
Several combination with Arduino interface for connection retro computer keyboards works exactly the same.
Unfortunately, cant try because I dont have rzx for now, but it's definitely a very good addition to the emulator itself.
I guess the most common combo rzx with Pi3 has been tested, but I wondered if anyone tried the rzx with Pi2 + bluetooth usb dongle, for example?
zx81
Microbot
Posts: 138
Joined: Sat Feb 17, 2018 9:33 pm

Re: ZXBaremulator v3.H(ikoki) beta

Post by zx81 »

No BT dongle will work, for sure. BT needs an incredible software layer to work, and Circle don't supports BT by now.
User avatar
Pegaz
Dynamite Dan
Posts: 1209
Joined: Mon Nov 13, 2017 1:44 pm

Re: ZXBaremulator v3.H(ikoki) beta

Post by Pegaz »

Its good to know, thanks.
What about some future support for the new Pi3+?
It looks like the new processor can work at 1.6 Ghz, which is very good for emulation...
zx81
Microbot
Posts: 138
Joined: Sat Feb 17, 2018 9:33 pm

Re: ZXBaremulator v3.H(ikoki) beta

Post by zx81 »

I don't have the new Pi3+, but the Circle's author is waiting to receive his board. I'm sure that in a near future will work without problems.

Anyway, a Pi-2@600 Mhz needs around 4.5 to 5 ms to emulate a Spectrum frame, sound included. So, more CPU speed isn't needed. And on the Pi-2, we have 2 spare CPUs, awaiting any work for them. :)
User avatar
MonkZy
Manic Miner
Posts: 278
Joined: Thu Feb 08, 2018 1:01 pm

Re: ZXBaremulator v3.H(ikoki) beta

Post by MonkZy »

I have a PI 3 and have tested with a Recreated ZX Keyboard. This emulator is awesome, a real thing of beauty. I also have a PS3 controller so this is a perfect set up for me. Powering on the PI is uncannily like powering a real Spectrum. I love it. I have no bugs to report. The extended keyboard mode works really well. If I find a bug I will let you know.
zx81
Microbot
Posts: 138
Joined: Sat Feb 17, 2018 9:33 pm

Re: ZXBaremulator v3.H(ikoki) beta

Post by zx81 »

MonkZy wrote: Sat Mar 24, 2018 8:37 pm I have a PI 3 and have tested with a Recreated ZX Keyboard. This emulator is awesome, a real thing of beauty. I also have a PS3 controller so this is a perfect set up for me. Powering on the PI is uncannily like powering a real Spectrum. I love it. I have no bugs to report. The extended keyboard mode works really well. If I find a bug I will let you know.
Thanks MonkZy by your extremely succesful report. You has done my day a bit better... :)
User avatar
MonkZy
Manic Miner
Posts: 278
Joined: Thu Feb 08, 2018 1:01 pm

Re: ZXBaremulator v3.H(ikoki) beta

Post by MonkZy »

I have been giving the emulator some proper usage and have found one bug.

On the 48k emulator, after a reset (ss+r), the symbol shift key becomes stuck on when you turn off the alternate keyboard.

This bug seems to be 100% repeatable. Power up the Pi -> Enter alternate keyboard (ss+cs+enter) -> Reset (ss+r) -> Exit alternate keyboard -> Symbol shift is now forced on.

It can be worked around by switching to a 128k emulator and back again. The bug does not effect the two 128k sessions.

I have had other symbol shift problems, the symbol shift stops working and you cannot access the emulator keys (ss+2,3,4). When this happened I had to pull the power and restart the box. This was after some use, so I cannot say how it happened.

I have had the joystick stop working. I think this a cable problem. If the PS3 controller becomes disconnected (cable wobble), will reconnecting the controller not work? I am guessing you detect the controller at start-up and there is no 'auto-detect' on the controller after start-up.

Still absolutely loving this project !!
zx81
Microbot
Posts: 138
Joined: Sat Feb 17, 2018 9:33 pm

Re: ZXBaremulator v3.H(ikoki) beta

Post by zx81 »

MonkZy wrote: Sun Mar 25, 2018 3:36 pm I have been giving the emulator some proper usage and have found one bug.

On the 48k emulator, after a reset (ss+r), the symbol shift key becomes stuck on when you turn off the alternate keyboard.

This bug seems to be 100% repeatable. Power up the Pi -> Enter alternate keyboard (ss+cs+enter) -> Reset (ss+r) -> Exit alternate keyboard -> Symbol shift is now forced on.

It can be worked around by switching to a 128k emulator and back again. The bug does not effect the two 128k sessions.

I have had other symbol shift problems, the symbol shift stops working and you cannot access the emulator keys (ss+2,3,4). When this happened I had to pull the power and restart the box. This was after some use, so I cannot say how it happened.
Thanks by your report. I was going a bit crazy because I can't reproduce it on a PI-2. In the end, it's a cache coherence problem between CPUs only reproducible on a Pi-3. Probably, all these problems are related. Solved! (I guess).
MonkZy wrote: Sun Mar 25, 2018 3:36 pm I have had the joystick stop working. I think this a cable problem. If the PS3 controller becomes disconnected (cable wobble), will reconnecting the controller not work? I am guessing you detect the controller at start-up and there is no 'auto-detect' on the controller after start-up.
Sadly no, the Circle library don't support USB hot-plug devices. When the cable fails, no other solution exist than reset the PI. Handling the USB disconnect/reconnect isn't an easy problem at bare-metal level. But in Linux, this problem causes a fail too. If your program have opened the device /dev/input/js0 and the cable wobbles, Linux detects a disconnect/reconnect at USB level. As your program have opened the js0 device, udev creates a new device, probably /dev/input/js1 and your program don't receive gamepad events anymore.
MonkZy wrote: Sun Mar 25, 2018 3:36 pm Still absolutely loving this project !!
Thanks again, MonkZy. I will release another beta soon to solve the problem you has found.
hikoki
Manic Miner
Posts: 576
Joined: Thu Nov 16, 2017 10:54 am

Re: ZXBaremulator v3.H(ikoki) beta

Post by hikoki »

Just a thought, MonkZy. Try another cable on your gamepad. I've read these disconnecting problems happen sometimes with Sony Ps3 gamepads. One solution could be as simple as using another cable :)
User avatar
MonkZy
Manic Miner
Posts: 278
Joined: Thu Feb 08, 2018 1:01 pm

Re: ZXBaremulator v3.H(ikoki) beta

Post by MonkZy »

Looking forward to the update. Even with the bug the emulator is usable, have been playing on it a few hours this evening.

[mention]hikoki[/mention] I think the usb port on my controller is quite worn out. With some care I have had a few hours of gameplay, having something that causes trouble if you wiggle it makes for an authentic speccy experience :D I am sure a blob of blue tac will help.

Would a PS3 compatible controller work? I have seen non-sony wired controllers on eBay for reasonable prices.
hikoki
Manic Miner
Posts: 576
Joined: Thu Nov 16, 2017 10:54 am

Re: ZXBaremulator v3.H(ikoki) beta

Post by hikoki »

Monkzy, glue?? you may want to try putting a small piece of paper either on the top, bottom or side of the loose usb socket :)

PS3 controllers drivers can be Official, Gasia or Shanwan.
I can say that my clone using Shanwan driver does not work with this emulator.
Would Gasia ones work? Will there be cheap clones using Official? I don't know
zx81
Microbot
Posts: 138
Joined: Sat Feb 17, 2018 9:33 pm

Re: ZXBaremulator v3.H(ikoki) beta

Post by zx81 »

[mention]MonkZy[/mention]

I'm sorry by the delay. Many PS3 compatible gamepads are PC and XBOX compatibles also, and do many strange things when are initialized. A few months ago I buyed a Trust GXT-24 and, finally, I should returned it because I can't use (and is bad quality, really).
zx81
Microbot
Posts: 138
Joined: Sat Feb 17, 2018 9:33 pm

Re: ZXBaremulator v3.H(ikoki) beta

Post by zx81 »

I've updated the ZXBaremulator beta v3.H.5 on DropBox. The problem solved only affects to Raspberry PI-3 models.

This version is tested on a new PI-3-B+ too and works flawlessly.
User avatar
MonkZy
Manic Miner
Posts: 278
Joined: Thu Feb 08, 2018 1:01 pm

Re: ZXBaremulator v3.H(ikoki) beta

Post by MonkZy »

Can you provide a link for the 3.H.5 version. The link at the top of this thread is for the 3.H.3 version.
zx81
Microbot
Posts: 138
Joined: Sat Feb 17, 2018 9:33 pm

Re: ZXBaremulator v3.H(ikoki) beta

Post by zx81 »

User avatar
MonkZy
Manic Miner
Posts: 278
Joined: Thu Feb 08, 2018 1:01 pm

Re: ZXBaremulator v3.H(ikoki) beta

Post by MonkZy »

Thank you. The new icon to indicate extended keyboard mode is a good improvement. I will give it some testing. I have fixed my controller by building up some blue tac around the usb plug :D
User avatar
adonet
Drutt
Posts: 22
Joined: Tue Apr 10, 2018 7:52 pm
Location: Netherlands
Contact:

Re: ZXBaremulator v3.H(ikoki) beta

Post by adonet »

Hi fellow ZX Spectrum users,

I downloaded version v5.H(ikoki) beta and first it worked OK, but now after several days the Recreated ZX Spectrum keyboard doesn't work anymore in the ZXBaremulator.
When I connect it together with a normal USB keyboard, I can only use that keyboard. The Recreated ZX Spectrum keyboard keys don't work. Both is mode A and B of the keyboard.
When I connect only the Recreated ZX Spectrum keyboard and boot the ZX Baremulator, it gives after booting a massage stating that I need to
"replace the keyboard membr". And no key is working at all.

I know that there is nothing wrong with the Recreated ZX Spectrum keyboard, since it works fine in other emulators running on the very same Raspberry PI, connected with the same USB cable.

Doe anyone have any Idea what to do?
I am Using ZX Machines since 1981.
hikoki
Manic Miner
Posts: 576
Joined: Thu Nov 16, 2017 10:54 am

Re: ZXBaremulator v3.H(ikoki) beta

Post by hikoki »

[mention]adonet[/mention] [mention]zx81[/mention]

Have you been using a different psu lately other than the official one from Raspberry?

Add this to cdmline.txt :
usbpowerdelay=100

cmdline.txt should be an all one single line using Spaces as separators.
Also cmdline.txt doesn't like empty lines.
zx81
Microbot
Posts: 138
Joined: Sat Feb 17, 2018 9:33 pm

Re: ZXBaremulator v3.H(ikoki) beta

Post by zx81 »

hikoki wrote: Thu Apr 19, 2018 10:58 pm @adonet @zx81

Have you been using a different psu lately other than the official one from Raspberry?

Add this to cdmline.txt :
usbpowerdelay=100

cmdline.txt should be an all one single line using Spaces as separators.
Also cmdline.txt doesn't like empty lines.
Hi adonet,

Default value for usbpowerdelay is 510, so you can need a value around 1000.
User avatar
adonet
Drutt
Posts: 22
Joined: Tue Apr 10, 2018 7:52 pm
Location: Netherlands
Contact:

Re: ZXBaremulator v3.H(ikoki) beta

Post by adonet »

[mention]hikoki[/mention] [mention]zx81[/mention] Changing to another PSU doesn't change anything.

Adding this to cdmline.txt :
usbpowerdelay=100

separated with a space on the same line doesn't change anything as well.

I keep getting the message that I "have to change the keyboard membr".

I tried without batterys in the Recreated ZX Spectrum since they could use current for charching. No change
I tried starting with the keyboard switched off. No change
I tried starting in Mode B. No change

I used another SD card with Retropie and FUSE 1.3 or ZEsarUX81 and then the Recreated ZX Spectrum works fine. Switched on or off seems only to affect Bluetooth pairing possibilities. Connecting via USB to Retropie seems not affected by the power switch of the Recreated ZX Spectrum.

Does anyone have another suggestion? Thanks.
I am Using ZX Machines since 1981.
User avatar
adonet
Drutt
Posts: 22
Joined: Tue Apr 10, 2018 7:52 pm
Location: Netherlands
Contact:

Re: ZXBaremulator v3.H(ikoki) beta

Post by adonet »

I tried now with usbpowerdelay=1000 and that works

Thanks a lot. I'll keep testing further now.

Jeroen
zx81 wrote: Fri Apr 20, 2018 7:04 am
hikoki wrote: Thu Apr 19, 2018 10:58 pm @adonet @zx81

Have you been using a different psu lately other than the official one from Raspberry?

Add this to cdmline.txt :
usbpowerdelay=100

cmdline.txt should be an all one single line using Spaces as separators.
Also cmdline.txt doesn't like empty lines.
Hi adonet,

Default value for usbpowerdelay is 510, so you can need a value around 1000.
I am Using ZX Machines since 1981.
User avatar
adonet
Drutt
Posts: 22
Joined: Tue Apr 10, 2018 7:52 pm
Location: Netherlands
Contact:

Re: ZXBaremulator v3.H(ikoki) beta

Post by adonet »

I have got another question. Is there a parameter I can use to tell the zx baremulator to use another aspectratio. On my 10 inch 4:3 monitor the image is to much a square instead of a 4:3 TV screen. While my normal 16:9 monitor gives a good image.

Thanks

Jeroen

Image

Image
Image
Last edited by adonet on Tue Apr 24, 2018 6:05 pm, edited 1 time in total.
I am Using ZX Machines since 1981.
zx81
Microbot
Posts: 138
Joined: Sat Feb 17, 2018 9:33 pm

Re: ZXBaremulator v3.H(ikoki) beta

Post by zx81 »

[mention]adonet[/mention]
The image format is controlled by PI firmware and the TV set, not by ZXB. You can try to play with parameters on config.txt file.
Post Reply