ZXBaremulator 3.2

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

Re: ZXBaremulator 3.2

Post by zx81 »

PeterJ wrote: Tue Apr 28, 2020 2:51 pm
Does the library recognise USB devices plugged in? As I have one of these?
I bet not. You you can try... :lol:

The USB support is a hard task for a bare-metal program. And without the Broadcom documentation.
zx81
Microbot
Posts: 138
Joined: Sat Feb 17, 2018 9:33 pm

Re: ZXBaremulator 3.2

Post by zx81 »

MonkZy wrote: Tue Apr 28, 2020 3:57 pm
PeterJ wrote: Tue Apr 28, 2020 3:23 pm I'm interested to know if it's possible.
You can edit the config.txt on the ZXBME Sd card..

use

Code: Select all

hdmi_mode=6
If you are on hdmi_group=1, mode 6 is a 480i (4:3) mode.

You may find the stretch on your TV will work properly then.

More info of HDMI modes here :

https://www.raspberrypi.org/documentati ... t/video.md
The TV reports what's his preferred mode. A 480i mode isn't the best, because the PAL system have 576 (interlaced) lines. But I do nothing to get a 16:9 size on my TV. Do you have a TV or a PC monitor?
User avatar
PeterJ
Site Admin
Posts: 6855
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: ZXBaremulator 3.2

Post by PeterJ »

Thank you [mention]MonkZy[/mention].

I had played with the modes, but made the silly mistake of picking the FHD resolutions :-)

The closest I have got in by disabling overscan, and using group 1 and mode 2. Close, but not quite there.

Image
User avatar
PeterJ
Site Admin
Posts: 6855
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: ZXBaremulator 3.2

Post by PeterJ »

zx81 wrote: Tue Apr 28, 2020 4:35 pm The TV reports what's his preferred mode. A 480i mode isn't the best, because the PAL system have 576 (interlaced) lines. But I do nothing to get a 16:9 size on my TV. Do you have a TV or a PC monitor?
It is this one:

https://www.samsung.com/uk/tvs/full-hd- ... 5000AKXXU/

**EDIT** Mode 17 Works - Thank you

17 576p 50Hz 4:3
User avatar
MonkZy
Manic Miner
Posts: 278
Joined: Thu Feb 08, 2018 1:01 pm

Re: ZXBaremulator 3.2

Post by MonkZy »

[mention]PeterJ[/mention] All good!

If you add :

Code: Select all

disable_splash=1
to the bottom of config.txt, you get rid of the rainbow square splash screen..the boot up looks more like a speccy and less like a PI then :D
User avatar
MonkZy
Manic Miner
Posts: 278
Joined: Thu Feb 08, 2018 1:01 pm

Re: ZXBaremulator 3.2

Post by MonkZy »

[mention]PeterJ[/mention] , I have been looking in to the Wifi SD cards and am not sure they are useful for ZX Baremulator. It seems the ez-share cards are closed systems and only allow easy transfer of certain media files via an app (.mp3, .jpg etc.). There is many hacks on the net, but for other uses. The Toshiba cards do not enable wifi until a save has been made to the card, as far as I know the baremetal emulator never saves any data to the card. This means the wifi will not turn on. I have seen a hack for use on 3D printers, but it involved changing the firmware to save a single byte of data to the SD card upon insertion. Maybe this hack could be applied to ZXBME, but I doubt if they would work as it stands. Thought I had better clarify as it was me who suggested they may work.
User avatar
PeterJ
Site Admin
Posts: 6855
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: ZXBaremulator 3.2

Post by PeterJ »

Thanks for taking the time to look into this [mention]MonkZy[/mention]. After having read your comments I think I will use my monthly retro-spends budget for something else.

Thanks again.
User avatar
cmal
Manic Miner
Posts: 619
Joined: Fri Jun 05, 2020 1:05 am
Location: California

Re: ZXBaremulator 3.2

Post by cmal »

Maybe someone has run into this. It's a very strange thing that happened today with ZX Baremulator 3.2 running on a Raspberry PI 3 model B, and connected to a recreated ZX Spectrum keyboard (from Elite).

I bought a 3.7 volt battery with an expansion board and connected it up to the RPi. I started it up with Baremulator 3.2 and everything worked fine. Then I powered it off, disconnected the power plug, then turned it on so that the Pi was running solely on the battery. Everything worked as expected.

After a couple of hours I turned it on again and found that the keyboard did not initially respond. I turned it off, plugged it into the power and turned it on again. The keyboard still didn't respond. However, the keyboard did respond when going into "Alternate" mode and I'm able to bring up the tape browser and select a tape. I'm also able to perform all the "Alternate" keyboard functions. I can get out of alternate mode but that's when the keyboard becomes response-less. The screen shows the "@ 1982 Sinclair..." message but none of the keys respond.

I tried connecting a normal USB keyboard, and got the same result. I can go into the tape browser by pressing F1, but the keyboard does not respond in normal mode. I've tested all 4 USB ports and get the same result.
After completely disconnecting the battery expansion board from the GPIO connection, the problem still persists.

I've probably blown something on the Raspberry board or damaged the USB. Has anyone else had this experience and is there a fix for it?
User avatar
Pegaz
Dynamite Dan
Posts: 1209
Joined: Mon Nov 13, 2017 1:44 pm

Re: ZXBaremulator 3.2

Post by Pegaz »

Have you tried the keyboard with some other Pi software, eg. the standard raspbian linux image, just to make sure it works.
If it doesn’t work, it’s possible there is some hardware failure.
Does the keyboard work, when you connect it to a PC?
User avatar
cmal
Manic Miner
Posts: 619
Joined: Fri Jun 05, 2020 1:05 am
Location: California

Re: ZXBaremulator 3.2

Post by cmal »

I have not yet tested the Pi with a different image loaded onto it. And yes, the keyboard works perfectly with a PC.
I did connect everything onto a spare Pi 2 which I have lying around and everything worked fine.
So far it's looking like a Pi hardware failure.
User avatar
Pegaz
Dynamite Dan
Posts: 1209
Joined: Mon Nov 13, 2017 1:44 pm

Re: ZXBaremulator 3.2

Post by Pegaz »

Try a different image or even better with another Pi if you can.
Then, you will know for sure what is the cause of it.
I have so far connected various keyboards to the Baremulator and there have never been any problems.
User avatar
cmal
Manic Miner
Posts: 619
Joined: Fri Jun 05, 2020 1:05 am
Location: California

Re: ZXBaremulator 3.2

Post by cmal »

Well, I just tested the Pi with the standard 32-bit OS. The OS installed fine, started up and the std USB keyboard works perfectly on the PI.
So I shut it down, powered off, removed the Micro SD card containing the standard OS image and replaced with the Baremulator
Micro SD. Same issue - Keyboard only works when I pull up the tape browser with the F1 key.
Then I re-downloaded the Baremulator image file (kernel8-32.img) and replaced it onto the SD card. This didn't fix it.

In the meantime I ordered another Raspberry Pi 3 and I'm picking it up at Best Buy today. I'll give that a try next.

This is a real head scratcher.
User avatar
cmal
Manic Miner
Posts: 619
Joined: Fri Jun 05, 2020 1:05 am
Location: California

Re: ZXBaremulator 3.2

Post by cmal »

So I just tried reformatting the SD card and reloading it with a fresh Baremulator image, and nothing else.
The problem persists.

Next I found and tested a different USB keyboard, and that didn't work.

So here's the current situation:
Reformatted FAT-32 SD card with only the Baremulator image installed
Raspberry PI 3B, boots up with Baremulator and shows the Sinclair Research copyright message
Two separate USB standard keyboards give the same result:
Able to open the Tape Browser using the F1 key and able to select a tape image. All keys needed in the tape browser work perfectly
Also able to close the Tape Browser with the F1 key
The pause key responds and pauses/unpauses the emulator
The left Alt key, along with the associated key works. So I can pull up the help screen with Alt+K. I can also switch Spectrum models
Pressing F9 also works and brings up the Multiface. However, none of the regular keys work in the Multiface
None of the regular keys respond so I'm stuck with the tape inserted and unable to type load "" or do anything else
I tested the keyboard in all 4 USB ports and get the same result
The same Raspberry Pi has been tested with a standard Raspberry OS and the keyboards works fine. All the keys respond normally.

The only other thing I can think of trying is replacing the Raspberry PI 3, which I'll pick up later this afternoon.
All of this started the day i connected the RPi to a lithium battery using the supplied expansion board.
User avatar
cmal
Manic Miner
Posts: 619
Joined: Fri Jun 05, 2020 1:05 am
Location: California

Re: ZXBaremulator 3.2

Post by cmal »

Just picked up a brand new Raspberry Pi. This one's a slight upgrade: R Pi 3 Model B+ vs the R Pi 3 Model B V1.2 which I'm replacing.

After hooking everything up and turning it on, it worked perfectly! Yay!!!
The keyboard works fine and so does the recreated ZX keyboard. The only thing I didn't connect is that battery pack, which seems to have caused the
keyboard issue with my previous Pi.

It's still a mystery though. Especially since the Alt keyboard emulator functions(F1, F9) worked but the regular keyboard keys didn't work, and the R Pi worked with a regular keyboard when I installed a generic R Pi OS image onto it. I would expect the entire keyboard to stop functioning if it's some sort of hardware issue.

Anyway, I'm a happy camper. ZX Baremulator is an excellent piece of software. Many thanks Jose Luis for your hard work on it! If you're curious about this issue and are up to debugging it, I'd be happy to send the dodgy Raspberry PI your way. Let me know, but no obligation.
Mbwum73
Drutt
Posts: 5
Joined: Wed Jul 22, 2020 4:10 pm

Re: ZXBaremulator 3.2

Post by Mbwum73 »

I have been running ZXBaremulator 3.2 on my Raspberry Pi 2 for a copuple of days now and I'm impressed!
I switch on my Pi2 and a few seconds later the spectrum screen is there. So far everything I loaded jut works as expected. I haven't found glitches or non working titles. If something doesn;t work it's usually caused by a bad tape.

Next thing I'm going to do is put it inside a nice ZX spectrum case and use the original ZX spetrum rebur keyboard.
Because I really want a zx spectrum with HDMI that boots as fast as the original (or close to it).
I do have an original ZX spectrum with a ZXHD expansion (and divmmc and joystick port) but all that stuff in the back of the spectrum makes it so ugly.
So zxbaremulator is a nice to have too.

There's just a few things I hope that will improve in the future (also did a feature request with the author by the waY).
- The option to choose a default machine it always boots. I prefer to always boot in the Toastrack model first.
- An option to set the default joystick model (although the default seems to be kempston now, which is usually the best option)
- The option to add a keyboard status light. Requires 1 extra gpio (on for special key mode, off for normal key mode)
- A default directory to load the tapes from (so not start from the root making all files visibile, but start from a specific folder)

And some more difficult stuff...

- Adding support for other file formats like Z80 (instant loading)
- Write support to tapes (though not very important)
- Even faster loading.


Unfortunately creating a bare emulator is extremely hard and the author did a great job. I hope he finds time and motivation to continue working on this great emulator. Can't thank him enough for what he achieved already.
User avatar
cmal
Manic Miner
Posts: 619
Joined: Fri Jun 05, 2020 1:05 am
Location: California

Re: ZXBaremulator 3.2

Post by cmal »

That's a good idea. I was going to do the same but changed my mind. After receiving a recreated Spectrum keyboard, it looked so nice and shiny that I didn't want to break it open, drill holes into it and potentially mess it up.
Instead I'm building an outside case to house the Raspberry PI and all the other bits. I've built a prototype out of cardboard and the next step is to build it out of plywood.

Here are some pics below. The wiring inside is a mess at the moment but will be neater when I make the final thing.
ZX Baremulator is perfect for this kind of project.

Image

Image
User avatar
TMD2003
Rick Dangerous
Posts: 2032
Joined: Fri Apr 10, 2020 9:23 am
Location: Airstrip One
Contact:

Re: ZXBaremulator 3.2

Post by TMD2003 »

Just in case I missed something, somewhere...

Would this emulator work with an original 2012-spec Pi? (i.e. this one)
Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
User avatar
MonkZy
Manic Miner
Posts: 278
Joined: Thu Feb 08, 2018 1:01 pm

Re: ZXBaremulator 3.2

Post by MonkZy »

cmal wrote: Wed Jul 29, 2020 9:22 pm Here are some pics below.
Always love seeing projects like this. The recreated works great with zx baremulator and I agree it is best used with the pi externally to save chopping the case. I have my Pi attached on the back of the monitor on a harness, so you cannot see it. Your case will look ace.
User avatar
cmal
Manic Miner
Posts: 619
Joined: Fri Jun 05, 2020 1:05 am
Location: California

Re: ZXBaremulator 3.2

Post by cmal »

TMD2003 wrote: Wed Jul 29, 2020 11:14 pm Just in case I missed something, somewhere...

Would this emulator work with an original 2012-spec Pi? (i.e. this one)
Yes, it should work. The first Pi I tried this on was an original and it worked perfectly. Although I do remember reading somewhere that the author is no longer supporting that model for future releases. You'll have to check with him on future support to be certain.
zx81
Microbot
Posts: 138
Joined: Sat Feb 17, 2018 9:33 pm

Re: ZXBaremulator 3.2

Post by zx81 »

TMD2003 wrote: Wed Jul 29, 2020 11:14 pm Just in case I missed something, somewhere...

Would this emulator work with an original 2012-spec Pi? (i.e. this one)
Yes, it's supported.
Mbwum73
Drutt
Posts: 5
Joined: Wed Jul 22, 2020 4:10 pm

Re: ZXBaremulator 3.2

Post by Mbwum73 »

The original Pi1 will work however the author is having great difficulties keeping the first pi supported because of some limitations.
For instance you won't have sound over HDMI.
I think the PI2 is the best option.
It does have sound over HDMI and it's more than capable of running the emulator at full speed. A pi3/3B etc. is a bit overkill for just a spectrum.
zx81
Microbot
Posts: 138
Joined: Sat Feb 17, 2018 9:33 pm

Re: ZXBaremulator 3.2

Post by zx81 »

Mbwum73 wrote: Thu Jul 30, 2020 5:14 pm I think the PI2 is the best option.
It does have sound over HDMI and it's more than capable of running the emulator at full speed. A pi3/3B etc. is a bit overkill for just a spectrum.
The only one advantage from a better PI is a faster "fast loading".

The HDMI sound support needs more CPU than an ARMv6 based PI have. The Circle library uses a cooperative scheduler and the VC4 needs to be attended so frequently that isn't capable of execute the Spectrum emulation and send the needed sound data to the VC4. And more, in Circle all the interrupts are handled by the CPU-0, so the only one CPU present in first PI models isn't so fast to execute all the needed tasks (the USB handling needs many CPU time, the USB host on the PI is crap).

Anyway, I don't know what to do with ZXBaremulator. Develop a bare-metal emulator is a huge task and the user base is really tiny three years after the first release. Today, the people uses software emulators on PC and the alternative solution is a FPGA based board. Not many people have a PI board and many Pi users aren't interested on the ZX Spectrum. That looks as a dead end, my friend...
User avatar
Pegaz
Dynamite Dan
Posts: 1209
Joined: Mon Nov 13, 2017 1:44 pm

Re: ZXBaremulator 3.2

Post by Pegaz »

I agree.
Simply, time goes on, technology advances and people have more and more choices.
Small board computers are getting cheaper, including fpga multicore solutions, the raspberry pi 4 with latest price reduction and over 3 million units sold, it has already become a far better purchase than the old models.
The Spectrum user base is limited and dispersed, but the Baremulator certainly has its place.
I would just like to get rid of this buzzing sound, which we talked about earlier.
I don't know if you had time to investigate it, I just have this problem on each of my 3 pi models (2, 3, 3+) and I haven't been able to eliminate it, except using the old v2.0 version, which doesn't have a GPIO keyboard support.
However, BM has its advantages, such as precise emulation and the ability to easily connect the Spectrum keyboard and its also free.
I don't know which is the next equivalent variant, I guess ZX-Uno with twice the price than Pi, but also with greater potential for sure.
The new Next kickstarter is already around the corner, so everyone has something to choose for themselves...
Mbwum73
Drutt
Posts: 5
Joined: Wed Jul 22, 2020 4:10 pm

Re: ZXBaremulator 3.2

Post by Mbwum73 »

Still zxbaremulator is the only cheap alternative with good hdmi support and I can use my ps4 controller with it.

Alternatives? MISTer FPGA is expensive, zxuno doesn't have hdmi and other software emulators require a complete OS resulting in long boot times. The Spectrum next is unavailable and still has a timing problem with HDMI. So maybe there will be a second run, but will they also fix the hdmi problems?

So I hope you consider working on the "easy" parts like that extra keyboard led and maybe a default machine option. I know your audience is small and time is limited, but talking for myself I am a very grateful guy for what you've achieved so far.

Maybe another option is to release the source code so maybe other enthousiast can continue. Unfortunately I'm not a very skilled programmer but maybe someone else is.
zx81
Microbot
Posts: 138
Joined: Sat Feb 17, 2018 9:33 pm

Re: ZXBaremulator 3.2

Post by zx81 »

Pegaz wrote: Fri Jul 31, 2020 1:33 pm
I would just like to get rid of this buzzing sound, which we talked about earlier.
I don't know if you had time to investigate it, I just have this problem on each of my 3 pi models (2, 3, 3+) and I haven't been able to eliminate it, except using the old v2.0 version, which doesn't have a GPIO keyboard support.
However, BM has its advantages, such as precise emulation and the ability to easily connect the Spectrum keyboard and its also free.
I don't know which is the next equivalent variant, I guess ZX-Uno with twice the price than Pi, but also with greater potential for sure.
The new Next kickstarter is already around the corner, so everyone has something to choose for themselves...
The problem with the buzzing sound is that I can't reproduce it on my TVs. Could be that some TVs aren't happy with the 32 kHz sampling rate I use.

The ZX-Uno is dead. I own one, sleeping in his box. Nobody develops cores for it. Now, you can choose a MiSTer, Mistica or SiDi. But don't exist a FPGA core that his behaviour will be so precise as many software emulators. And nobody have enough motivation to enhance the cores. The most important core for MiSTer is NeoGeo.

The Next isn't for me, for less money I can have a MisTer with 128MB, I can live without his pretty keyboard.
Post Reply