ZXBaremulator 3.2

Struggling with Fuse or trying to find an emulator with a specific feature. Ask your questions here.
Post Reply
J2112Z
Dizzy
Posts: 64
Joined: Thu Sep 10, 2020 8:07 am

Re: ZXBaremulator 3.2

Post by J2112Z »

Hello, New Forum Member here, and my 1st post.

After reading through this thread, I went and bought a Pi 3A+ and installed ZXBaremulator.

Works great, and boots up fast! However... NO audio through HDMI. :cry:

It's not the Pi, or my TV, as the sound works fine on both, with Retropie.

Tried the audio socket, there's sound but it's *very* quiet.

Anyone have any ideas?

Thanks in advance.
gZes Deuce
Drutt
Posts: 6
Joined: Tue Aug 18, 2020 6:31 pm

Re: ZXBaremulator 3.2

Post by gZes Deuce »

J2112Z wrote: Thu Sep 10, 2020 8:15 am Hello, New Forum Member here, and my 1st post.

After reading through this thread, I went and bought a Pi 3A+ and installed ZXBaremulator.

Works great, and boots up fast! However... NO audio through HDMI. :cry:

It's not the Pi, or my TV, as the sound works fine on both, with Retropie.

Tried the audio socket, there's sound but it's *very* quiet.

Anyone have any ideas?

Thanks in advance.
Hi and Welcome to the forum.

I'm fairly new to this myself but did you possibly download the Armv6 pack from the ZXBaremulator website?

If you did. Try using the Allfiles pack instead. I'm using a Pi 3 A+ and I've got audio.

Hope this helps.
J2112Z
Dizzy
Posts: 64
Joined: Thu Sep 10, 2020 8:07 am

Re: ZXBaremulator 3.2

Post by J2112Z »

@ gZes Deuce:

Thanks for replying. I've tried your suggestion, but unfortunately, that made no difference! :(
zx81
Microbot
Posts: 138
Joined: Sat Feb 17, 2018 9:33 pm

Re: ZXBaremulator 3.2

Post by zx81 »

The PI firmware chooses the sound output automatically. When you have a HDMI device connected, the sound is sended to it. When no HDMI device is found, the sound is sended to PWM.

Are you tried with another TV set?
J2112Z
Dizzy
Posts: 64
Joined: Thu Sep 10, 2020 8:07 am

Re: ZXBaremulator 3.2

Post by J2112Z »

zx81 wrote: Fri Sep 11, 2020 11:09 amAre you tried with another TV set?
It's not the TV, as I get sound through HDMI using Retropie, with no problems.
zx81
Microbot
Posts: 138
Joined: Sat Feb 17, 2018 9:33 pm

Re: ZXBaremulator 3.2

Post by zx81 »

J2112Z wrote: Fri Sep 11, 2020 2:00 pm
zx81 wrote: Fri Sep 11, 2020 11:09 amAre you tried with another TV set?
It's not the TV, as I get sound through HDMI using Retropie, with no problems.
ZXBaremulator uses a non-usual sample rate for audio, 32 khz. I guess that some TVs have problems with it.
J2112Z
Dizzy
Posts: 64
Joined: Thu Sep 10, 2020 8:07 am

Re: ZXBaremulator 3.2

Post by J2112Z »

FYI:

The TV that ZXBaremulator won't work with is my bedroom TV (Celcus LED22167FHD LED TV).

I've tried it on my living room TV (Panasonic TX-L32C3B), via HDMI, and the audio works! :)

So, yes, it works, but only on *some* TVs, which is a pain, especially as I intended to use my Pi 3A+ on my bedroom TV, or at other people's houses, on their TVs! :(

Then, I had a 'lightbulb' moment:

I recently bought on eBay, one of those 'generic' HDMI To Scart & HDMI Converter with 3.5mm audio.

https://www.ebay.co.uk/itm/Neoteck-HDMI ... 2749.l2649

I plugged the HDMI from my Pi into it, and my Celcus TV SCART plug into the other end. Guess what? I've got sound! :)

Even better, if I plug in another HDMI cable from the TV to the adaper (as it outputs *both* SCART *and* HDMI), I get audio through the HDMI as well!!! :D

As a bonus, I get a sharp, clear picture, whereas with SCART, it's a little fuzzy (although it's more authentic to the original Speccy display quality. ;) )

So, there you have it - a 'workaround'!

The irony is, I bought that adapter by mistake, as I wanted an adapter that has SCART input, *not* output, but I decide to keep it as I thought it may 'come in handy' - it just did!
User avatar
cmal
Manic Miner
Posts: 619
Joined: Fri Jun 05, 2020 1:05 am
Location: California

Re: ZXBaremulator 3.2

Post by cmal »

The Baremulator project is finally complete! It took a good 3 months or so but I was going at a relaxed pace. The final product works great.

Here are some pics...



Image

Image

Image

Here are a few features:
- Powered by the fantastic ZXBaremulator running on a Raspberry Pi 3B+
- Connected to a recreated Spectrum keyboard
- On/Off switch easy to reach behind the unit
- USB port on the back for controller or 2nd keyboard
- HDMI port on the back to plug into an external monitor/TV. The round button on the back allows you to toggle between built in display and external display. HDMI carries the sound signal to the TV.
- Micro-SD is accessible on the back
- Volume dial on the side (not in pics)
- Convenient Storage area located on top of the box
- It's portable-ish
User avatar
Mort
Microbot
Posts: 190
Joined: Thu Jan 17, 2019 10:03 am
Location: Kent , England
Contact:

Re: ZXBaremulator 3.2

Post by Mort »

Nice work 8-)

Its great to be able to build a small for factor spectrum setup with the pi ;)
Scanner extraordinaire, 1000`s of magazines and Software from the 8 and 16 bit era now up on internet archive in lovely 600dpi.
Donations are welcome of items to scan that are no longer needed ;)
1333david
Drutt
Posts: 6
Joined: Thu Nov 05, 2020 9:19 pm

Re: ZXBaremulator 3.2

Post by 1333david »

Hi,
I downloaded the ZXBaremulator 3.2 and it looks really great on my pi 3b and it's wonderful to load those speccy games again.
Just a few things that would help me:

1) I've tried lots of USB joysticks including XBox360 controllers but can't seem to get any working?

2) I use the ZX Spectrum recreated keyboard and sometimes the keys continuously repeat until you press the key again. Not sure if anyone else has found this?

3) To make the retro experience even better, it would be great if you could support the BMC64 IO hat which connects to the GPIO header. This allows you to connect original 9 pin joysticks just like the Kempston interface. It works very well for the BMC64 much better than the USB joysticks. I'm guessing it might also be easier to implement than the many USB joysticks. It's also cheap to make and the parts are available for anyone see https://www.pcbway.com/project/sharepro ... ry_Pi.html
It's also useful for Pi 3a+ where you can use the single USB for the keyboard and the IO hat for 2 Atari style 9 pin joysticks.

Any comments on my 3 points would be greatly appreciated.
Thanks.
User avatar
cmal
Manic Miner
Posts: 619
Joined: Fri Jun 05, 2020 1:05 am
Location: California

Re: ZXBaremulator 3.2

Post by cmal »

1333david wrote: Thu Nov 05, 2020 10:55 pm Hi,
I downloaded the ZXBaremulator 3.2 and it looks really great on my pi 3b and it's wonderful to load those speccy games again.
Just a few things that would help me:

1) I've tried lots of USB joysticks including XBox360 controllers but can't seem to get any working?

2) I use the ZX Spectrum recreated keyboard and sometimes the keys continuously repeat until you press the key again. Not sure if anyone else has found this?

Any comments on my 3 points would be greatly appreciated.
Thanks.
Hi 1333david

Maybe I can help with your issues. I am also running ZXB on a Pi 3b. Haven't had any trouble with USB joysticks and also no trouble with the recreated keyboard.

To address your issues:
1) With the joystick plugged in, are you pressing the joystick button to toggle through the joystick modes?
I've used an Xbox One controller and also a PS4 controller and both work fine.
For the Xbox One controller, press the small black button to the right of the left analog stick.
On the PS4 controller, press the "Share" button, which is northeast of the 4 direction keys.

On the screen you should see the joystick types toggling(Kempston, Sinclair, Cursor etc). It shows in green font.

2) On the keyboard, make sure the "Layer" button is switched over to mode A. Mode B does give funky results if I remember correctly.
Alternatively, plug a regular USB keyboard into a USB and see if that works.

Let me know if you're still having trouble,

Thanks
1333david
Drutt
Posts: 6
Joined: Thu Nov 05, 2020 9:19 pm

Re: ZXBaremulator 3.2

Post by 1333david »

Thanks for your reply. The keyboard is set to layer 1 and I have tried some other games and it's still repeating on the odd occasion. I've also checked the keyboard on another computer and it is working fine.

Re the joystick. I have tried all buttons on the xbox 360 controller. All I get is a flashing green light around the silver X box key in the middle of the controller. I have it connected via USB. Also tried a second Xbox 360 controller same results.
1333david
Drutt
Posts: 6
Joined: Thu Nov 05, 2020 9:19 pm

Re: ZXBaremulator 3.2

Post by 1333david »

I've now tried the recreated keyboard on another Pi a+ with the same microsd copy of ZXbaremulator and it's working fine so it looks like a hardware issue at my end. The Pi 3b has a Nespi case which has a usb extender inside so maybe that's the cause. Anyway, the keyboard now works fine...great. but still no joy with the usb joysticks. Would be great if I could use the 9 pin joystick GPIO hat I mentioned before....but since that's not an option at the moment can anyone offer any further assistance on getting my Xbox 360 controller to work?
I've also tried a theC64 usb joystick, 8bitdo N30pro and a generic NES style controller pressing all button combinations but none of them can be used. Any help would be greatly received....
User avatar
cmal
Manic Miner
Posts: 619
Joined: Fri Jun 05, 2020 1:05 am
Location: California

Re: ZXBaremulator 3.2

Post by cmal »

Glad you could get the keyboard to work.

I tried my Xbox 360 controller on my ZXB setup for the first time and it's not working for me either. The round orb keeps flashing green which sounds like what was happening in your case. So on my side, so far the Xbox One and PS4 controllers are the only ones that work. I wonder if there's another flavor or release of Xbox 360 controller that does work, since it's mentioned on the ZXB website that it's supposed to work.
zx81
Microbot
Posts: 138
Joined: Sat Feb 17, 2018 9:33 pm

Re: ZXBaremulator 3.2

Post by zx81 »

The PS4 and XBox One drivers was written by myself, but the XBox 360 driver was written by Rene, the Circle library author because I don't own a Xbox 360 gamepad. Could be that Rene was using a Xbx360 clone, I can't remember very well.

Probably a good option would be a Mayflash Magic NS USB adapter, to use your Xbx360 gamepad wired or using Bluetooth. I can't recommend the 8bitdo USB adapter.
1333david
Drutt
Posts: 6
Joined: Thu Nov 05, 2020 9:19 pm

Re: ZXBaremulator 3.2

Post by 1333david »

Thanks for your help guys. I have now managed to get the 8bitdo N30 pro joystick controller working with both d pad and analogue stick which is perfect.
To get it working I needed to change the Android (D-input ) to Windows (X-input). Now it works - happy days!
User avatar
Pegaz
Dynamite Dan
Posts: 1209
Joined: Mon Nov 13, 2017 1:44 pm

Re: ZXBaremulator 3.2

Post by Pegaz »

After a while, I tried BM on Pi Zero and it works quite nicely, just attracts me for some project.
The problem is, that unfortunately there's no sound output at all.
Earlier versions had pwm sound on GPIO pin 13 and sound could be obtained, but now as we know this and some other pins are occupied for the Spectrum keyboard connection.
I would ask Jose if it's possible to move pin 13 for the keyboard to another location and enable pwm sound to pi zero again.
I know he used to express skepticism towards the Zero model, but I’m sure a lot of people have Zero lying unused, even though it’s very capable of Spectrum emulation and various projects.
I think this customized Zero version would be well accepted, of course unless such a modification,
doesn't require too much effort...
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 »

The problem I'm having with ZXBaremulator at the moment isn't anything to do with the emulator, at least I don't think it is. I've tried it on an original 2011-12 Pi on my LED TV, through HDMI and composite, and the picture is fine. On an older Bush CRT TV (though not old old, it dates from around 2006) which has no HDMI and no RGB, I put it through the composite video input via a SCART adapter and it comes up in black and white. I've tried a second such adapter (which was provided with my ZX81 recently), and that does the same. I've tried a video and a DVD player through the same SCART adapter, using the composite video, and they come up in colour. It's only the combination of the Pi and that TV that causes the picture to come up in black and white. Why might that be? Has anyone else tried a similar combination, whether with ZXBaremulator or not?

While I'm here, and while I'm talking about black and white pictures, and Pegaz is getting no sound... how hard can it be to add ZX81 and ZX80 capability for ZXBaremulator 4.0? Surely it must be possible. And that way, I'd have a further use for the Pi, and the lack of colour wouldn't matter.
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
Pegaz
Dynamite Dan
Posts: 1209
Joined: Mon Nov 13, 2017 1:44 pm

Re: ZXBaremulator 3.2

Post by Pegaz »

No, its not just me, as far i know BM v3.2 has no sound on Pi Zero.
My wish is just to have pwm audio output on Zero as well and to keep the support for GPIO connection of a real Spectrum keyboard, if possible.

btw, I tried the composite output on Pi 2 and Pi Zero earlier with my LCD TV and I had no problem with the color, everything was fine.
Didnt try on CRT TVs, though...
zx81
Microbot
Posts: 138
Joined: Sat Feb 17, 2018 9:33 pm

Re: ZXBaremulator 3.2

Post by zx81 »

TMD2003 wrote: Sat Nov 07, 2020 3:52 pm The problem I'm having with ZXBaremulator at the moment isn't anything to do with the emulator, at least I don't think it is. I've tried it on an original 2011-12 Pi on my LED TV, through HDMI and composite, and the picture is fine. On an older Bush CRT TV (though not old old, it dates from around 2006) which has no HDMI and no RGB, I put it through the composite video input via a SCART adapter and it comes up in black and white. I've tried a second such adapter (which was provided with my ZX81 recently), and that does the same. I've tried a video and a DVD player through the same SCART adapter, using the composite video, and they come up in colour. It's only the combination of the Pi and that TV that causes the picture to come up in black and white. Why might that be? Has anyone else tried a similar combination, whether with ZXBaremulator or not?

While I'm here, and while I'm talking about black and white pictures, and Pegaz is getting no sound... how hard can it be to add ZX81 and ZX80 capability for ZXBaremulator 4.0? Surely it must be possible. And that way, I'd have a further use for the Pi, and the lack of colour wouldn't matter.
Try editing the config.txt file, and search this line:

#sdtv_mode=2

uncomment it and add next to the line:

sdtv_aspect=1

By now, don't have any plan to add ZX80/ZX81 emulation.
Gooeyblob
Drutt
Posts: 32
Joined: Sun Nov 08, 2020 4:11 pm

Re: ZXBaremulator 3.2

Post by Gooeyblob »

On a Pi Zero with gpio Spectrum keyboard and not using the function key switch, is it not possible to use gpio 12 alt0 pwm0 to get sound?

P.S. José this is a fantastic emulator, however I wish that you could add an option so that interrupts are tied to vsync, this would make it perfect.

Muchas gracias.
zx81
Microbot
Posts: 138
Joined: Sat Feb 17, 2018 9:33 pm

Re: ZXBaremulator 3.2

Post by zx81 »

Gooeyblob wrote: Sun Nov 08, 2020 4:29 pm On a Pi Zero with gpio Spectrum keyboard and not using the function key switch, is it not possible to use gpio 12 alt0 pwm0 to get sound?

P.S. José this is a fantastic emulator, however I wish that you could add an option so that interrupts are tied to vsync, this would make it perfect.

Muchas gracias.
I can't count the times I've explained that the Pi Zero is a dead end. On a Pi-2/3 I have 2 spare CPUs awaiting a work to be done. The time precision is better on Pi-2/3, because the hardware timer is programmed *exactly* with the 48k freq. and really near to the 128k freq. That's impossible on the ARMv6 PI boards where I need another source of synchronization.

And more, the vsync would be 50 or 60 Hz. No one of these freqs are Spectrum freqs. Your Spectrum will be slower or faster than real, that can be done on every PC emulator and erases the main reason to develop a bare-metal emulator.

Anyway, next April will be the fourth anniversary for ZXBaremulator. In all this time, no more than two dozen of users are using the emulator. Develop a BM software needs a great effort, not comparable with standard emulators. So few users don't justify this effort, that's true. I have the development totally frozen by now, and I'm not motivated to continue with it. The users opt by fancy PC emulators or FPGA based hardware emulators. Nobody is worried about the precision when they only wants to play Manic Miner or Saboteur. For this, any basic emulator works like a charm. Sadly, no one needs a BM emulator.

Thanks by your suggestions.
User avatar
Pegaz
Dynamite Dan
Posts: 1209
Joined: Mon Nov 13, 2017 1:44 pm

Re: ZXBaremulator 3.2

Post by Pegaz »

[mention]zx81[/mention]

I respect your opinion, although I think BM is well known emulator and certainly used by many more people than you think.
Pi Zero is not my primary target for Baremulator usage, but the desire to make another hardware project based on him.
That's the only reason I asked, if there was a solution for getting sound on Zero with BM 3.2, because I was hoping that some relatively simple workaround would be possible.
If not, just forget it...
As someone who has followed your project from the beginning, I am certainly grateful to you for the fun moments with BM and I sincerely regret if you have decided to stop further development.

Cheers!
1333david
Drutt
Posts: 6
Joined: Thu Nov 05, 2020 9:19 pm

Re: ZXBaremulator 3.2

Post by 1333david »

@zx81 I've only just started using ZX BM and find it a far more realistic retro experience than a PC based emulator. ZX BM and BMC64 are my go-to emulators and both run on the Pi - I'm not in the position to purchase expensive FPGA solutions. I'm sure there will be others in the same position as me who really value the efforts you have put in.

PS I would agree with Pi zero. With limited time and resource concentrating on the Pi 2/3 makes more sense.
PPS you probably have more followers than you think.....
User avatar
Lethargeek
Manic Miner
Posts: 734
Joined: Wed Dec 11, 2019 6:47 am

Re: ZXBaremulator 3.2

Post by Lethargeek »

zx81 wrote: Sun Nov 08, 2020 5:18 pm And more, the vsync would be 50 or 60 Hz. No one of these freqs are Spectrum freqs. Your Spectrum will be slower or faster than real,
That's just ridiculous. You're talking about 1/2500 frame rate difference for 50Hz and Spectrum-128k. This is less than 48k to 128k difference and it never is exact anyway as it varies with the temperature and from one specimen to another.
Post Reply