VOGONS


Reply 141 of 892, by polpo

User metadata
Rank Member
Rank
Member

I wanted to give a quick update. I've paused work on GUS DMA a bit – While traveling for the end of year holidays I put effort in to getting asynchronous writes from ISA DMA to the PSRAM working. Since returning and testing it, while the PSRAM writing does work, it's not helping much with troublesome DMA titles. There is some promise, though, as Doom actually starts and plays and produces something that vaguely sounds like music and sound effects... but more work is needed. I haven't gotten around to doing captures with my logic analyzer to see what's going on on the ISA bus since I only did some quick testing after returning home.

I do have some good news though – MPU-401 emulation with intelligent mode is now working really well. I don't have a huge stable of games that require intelligent mode to test, but Wing Commander I and II and Silpheed are working perfectly. I am using Frederik Pohl's Gateway as my primary testbed since it heavily uses timers and IRQs. It still has some issues when it changes between songs but I'm making progress on it. I've ported over some changes from DOSBox-X's MPU-401 code to the HardMPU-based code in PicoGUS to help with that.

Reply 142 of 892, by Shreddoc

User metadata
Rank Oldbie
Rank
Oldbie
polpo wrote on 2023-01-12, 00:07:

I wanted to give a quick update. I've paused work on GUS DMA a bit – While traveling for the end of year holidays I put effort in to getting asynchronous writes from ISA DMA to the PSRAM working. Since returning and testing it, while the PSRAM writing does work, it's not helping much with troublesome DMA titles. There is some promise, though, as Doom actually starts and plays and produces something that vaguely sounds like music and sound effects... but more work is needed. I haven't gotten around to doing captures with my logic analyzer to see what's going on on the ISA bus since I only did some quick testing after returning home.

I do have some good news though – MPU-401 emulation with intelligent mode is now working really well. I don't have a huge stable of games that require intelligent mode to test, but Wing Commander I and II and Silpheed are working perfectly. I am using Frederik Pohl's Gateway as my primary testbed since it heavily uses timers and IRQs. It still has some issues when it changes between songs but I'm making progress on it. I've ported over some changes from DOSBox-X's MPU-401 code to the HardMPU-based code in PicoGUS to help with that.

Love to see the update, everything sounds positive. I hope the DMA work continues to be fruitful, when life and time permits of course. The intelligent MPU emulation is a wonderful option. The notion of these multiple options for the platform is quite exciting.

I'm going ahead with my first card build, while keeping in mind that the card design is not yet final per se - 'them's the risks'. Speaking of the build: I discovered that, despite my wriggling around trying to source cheaper options in my Asia/Pacific region, ultimately there was no beating Mouser, even here. Primarily because Mouser seems to be the one place that currently stocks every component (barring the DAC). That, and taking advantage of the Free Shipping threshold, handily outmatched any other multi-outlet option, cheaper though they may have been individually in some cases. The integrated JLC build also sounds like a great option for the future, once the design is finalised.

Reply 143 of 892, by Sphere478

User metadata
Rank l33t++
Rank
l33t++

This is an awesome project. Following.

Sphere's PCB projects.
-
Sphere’s socket 5/7 cpu collection.
-
SUCCESSFUL K6-2+ to K6-3+ Full Cache Enable Mod
-
Tyan S1564S to S1564D single to dual processor conversion (also s1563 and s1562)

Reply 144 of 892, by rasz_pl

User metadata
Rank l33t
Rank
l33t
polpo wrote on 2023-01-12, 00:07:

I do have some good news though – MPU-401 emulation with intelligent mode is now working really well. I don't have a huge stable of games that require intelligent mode to test, but Wing Commander I and II and Silpheed are working perfectly. I am using Frederik Pohl's Gateway as my primary testbed since it heavily uses timers and IRQs. It still has some issues when it changes between songs but I'm making progress on it. I've ported over some changes from DOSBox-X's MPU-401 code to the HardMPU-based code in PicoGUS to help with that.

just to clarify - what is MPU used for, connecting external MT32? Are/were there any successful projects implementing General MIDI using GUS? Wiki says "This architecture allowed Gravis to incorporate a General MIDI-compatible mapping scheme." What Im asking is is it possible for PicoGUS to act like GM synth on its own? If not using GUS than are there any lightweight GM implementations that could be run on Pico?

Open Source AT&T Globalyst/NCR/FIC 486-GAC-2 proprietary Cache Module reproduction

Reply 145 of 892, by polpo

User metadata
Rank Member
Rank
Member
rasz_pl wrote on 2023-01-13, 01:49:

just to clarify - what is MPU used for, connecting external MT32? Are/were there any successful projects implementing General MIDI using GUS? Wiki says "This architecture allowed Gravis to incorporate a General MIDI-compatible mapping scheme." What Im asking is is it possible for PicoGUS to act like GM synth on its own? If not using GUS than are there any lightweight GM implementations that could be run on Pico?

It is purely for connecting an external MT-32 or other MIDI device. It's only emulating an MPU-401, and the PicoGUS hardware has a 3.5mm TRS MIDI out jack on it. I had the HardMPU and PCMIDI in mind when adding the MIDI out jack. The cost of a PicoGUS board would be around the cost of a HardMPU and is potentially much more capable. A Pico at $4 is near half the cost of the $7.45 Atmega1284 that the HardMPU uses, for example.

But you raise an interesting question. Given that the Pico has little problem mixing 32 channels of audio, making a simple GM synth that runs on the Pico wouldn't be too much of a stretch! I don't know of any implementations, but implementing one that is at parity with the GUS's MIDI implementation shouldn't be too awful...

Reply 147 of 892, by polpo

User metadata
Rank Member
Rank
Member

Timidity is a great idea, I forgot all about it! It's old so shouldn't use too much CPU, and it claims to be very portable. I'll put that one on the backlog...

BTW, tonight I had a new idea about how to handle shared access to the PSRAM (so reading and writing can happen in different threads) and I have the most promising results for DMA so far. Doom v1.9, which uses software mixing of sound effects and streams audio to the GUS in real time with DMA, starts and plays music and sound effects. Once the MIDI exceeds more than a few tracks, it runs out of mixing time, however. But that is extremely good results on a title that would previously only play garbage sounding audio.

I also tried Duke3D, which can play MIDI in the setup program but not mixed sound effects. And the game freezes on launch when it tries playing the audio from the starting animation. But that's also far better than it did before.

Reply 148 of 892, by polpo

User metadata
Rank Member
Rank
Member

I made my sample cache a bit smarter and now I no longer run out of time during GUS sample mixing (it's IO bound with access to the PSRAM rather than with raw CPU time). Doom now runs basically perfectly. There are some slight pops in the streamed audio but that's probably down to my sample cache not being evicted perfectly as new audio streams in. Video: https://youtu.be/vFfT8gmnBaI

Reply 149 of 892, by Shreddoc

User metadata
Rank Oldbie
Rank
Oldbie
polpo wrote on 2023-01-14, 06:14:

I made my sample cache a bit smarter and now I no longer run out of time during GUS sample mixing (it's IO bound with access to the PSRAM rather than with raw CPU time). Doom now runs basically perfectly. There are some slight pops in the streamed audio but that's probably down to my sample cache not being evicted perfectly as new audio streams in. Video: https://youtu.be/vFfT8gmnBaI

Ayyyyyy!! Nice one. Really cool breakthrough.

Fortuitous timing as my PSRAMs from Aliexpress just arrived today.

psram_ae.jpeg
Filename
psram_ae.jpeg
File size
72.71 KiB
Views
1257 views
File license
Public domain

They look good but the proof will be in the installation. At some stage next week, I'll have everything but the DAC, which must be on the slow boat. (looks sideways at my mt32pi which_has_a_dac_in_it, mt32-pi says "hands off buddy!", we continue to stare at one-another suspiciously...)

Last edited by Shreddoc on 2023-01-15, 00:28. Edited 2 times in total.

Reply 150 of 892, by MJay99

User metadata
Rank Member
Rank
Member

Now THAT is some great news and answering the 'can it run doom?' in another way 😁
It's definitely a milestone!

I've recently also tried it with Freddy's modm (since it's become my default player a while ago) and it actually came pretty close to an original GUS - some effects / notes seem to occasionally be missing, which made it sound a little bit off, but if you didn't know the original, it would be difficult to notice. I'm very curious if the latest changes that made doom work are also gonna push it to a 100% there!

As sphere said: an awesome project! 😀

Reply 152 of 892, by appiah4

User metadata
Rank l33t++
Rank
l33t++
polpo wrote on 2023-01-14, 06:14:

I made my sample cache a bit smarter and now I no longer run out of time during GUS sample mixing (it's IO bound with access to the PSRAM rather than with raw CPU time). Doom now runs basically perfectly. There are some slight pops in the streamed audio but that's probably down to my sample cache not being evicted perfectly as new audio streams in. Video: https://youtu.be/vFfT8gmnBaI

Fantastic.

Retronautics: A digital gallery of my retro computers, hardware and projects.

Reply 153 of 892, by Shreddoc

User metadata
Rank Oldbie
Rank
Oldbie

More bits arrived here today. Enough to build most of the project. (Reminder to new entrants, that the project is still in beta.)

So I started making a test card.

pgusbld_1.jpg
Filename
pgusbld_1.jpg
File size
172.16 KiB
Views
1230 views
File license
Public domain
f0037168.jpg
Filename
f0037168.jpg
File size
601.7 KiB
Views
1160 views
File license
Public domain
f0057272.jpg
Filename
f0057272.jpg
File size
318.84 KiB
Views
1160 views
File license
Public domain
f0111448.jpg
Filename
f0111448.jpg
File size
785.44 KiB
Views
1160 views
File license
Public domain

Mostly done. It's my first time fully populating such a board, and doing this much SMT work in one go. Took a few hours, it was fun though. The drag soldering technique is cool. It works really well for the TSSOPs and SOICs. The messiest part of my whole work was the Pico board soldering (the biggest stuff, 🤣), I'll go back and tidy that up a little. Thanks polpo for the build guide, the included details gave me the confidence and info I needed to happily work through the build.

Now just waiting for last couple components to get this thing fully happening.

Reply 154 of 892, by appiah4

User metadata
Rank l33t++
Rank
l33t++

Isn't it possible to add the Pico THT? IE, headers and THT soldering? It doesn't need to be flat..

Retronautics: A digital gallery of my retro computers, hardware and projects.

Reply 155 of 892, by polpo

User metadata
Rank Member
Rank
Member

@Shreddoc Nice looking soldering especially on those TSSOPs! Great results for the first time doing a project as big as this for the first time.

@appiah4 Yes, there are several options for how to mount the Pico. I use headers on the PicoGUS board, then have the Pico soldered onto the headers so I can grab onto the header pins with probes for a scope or logic analyzer. I've also seen people use sockets on the board with headers on the Pico (or on the Pico-H which already has headers soldered), and also surface mounted directly. All methods work fine. If you ever want to remove the Pico, the surface mount method is toughest unless you have a hot plate. It is possible, though.

Reply 156 of 892, by polpo

User metadata
Rank Member
Rank
Member

BTW I now have Duke3D mostly working with a bit of audio stuttering here and there. I'm still not super happy with streaming audio over DMA because the delay between DMA transfers has to be artificially increased. I think the real way to get streaming audio working well is to detect when it's happening and store those samples in RP2040's RAM instead of the external PSRAM. It should be pretty simple to detect – when DMA is going into a memory address associated with a currently looping sample, it's pretty obvious that it's streaming audio. That will be probably take a lot of work, so I'll clean up the current state of things for a new firmware release that brings in MPU-401 intelligent mode emulation and GUS streaming DMA improvements.

Reply 157 of 892, by appiah4

User metadata
Rank l33t++
Rank
l33t++
polpo wrote on 2023-01-17, 06:55:

BTW I now have Duke3D mostly working with a bit of audio stuttering here and there. I'm still not super happy with streaming audio over DMA because the delay between DMA transfers has to be artificially increased. I think the real way to get streaming audio working well is to detect when it's happening and store those samples in RP2040's RAM instead of the external PSRAM. It should be pretty simple to detect – when DMA is going into a memory address associated with a currently looping sample, it's pretty obvious that it's streaming audio. That will be probably take a lot of work, so I'll clean up the current state of things for a new firmware release that brings in MPU-401 intelligent mode emulation and GUS streaming DMA improvements.

Amazinsauce.

I'll be doing some soldering today.. 🤣

Retronautics: A digital gallery of my retro computers, hardware and projects.

Reply 158 of 892, by appiah4

User metadata
Rank l33t++
Rank
l33t++

So, yeah..

PicoGUS SOIC TSSOP.jpg
Filename
PicoGUS SOIC TSSOP.jpg
File size
657.41 KiB
Views
1073 views
File license
CC-BY-4.0

@polpo I also asked this on twitter but, CSV BOM has SN74CB3T3245PW for U2 (which I soldered) whereas your interactive BOM and your card photo has 74LVC244 instead.. Did I do wrong?

Retronautics: A digital gallery of my retro computers, hardware and projects.

Reply 159 of 892, by Shreddoc

User metadata
Rank Oldbie
Rank
Oldbie
appiah4 wrote on 2023-01-17, 09:53:

So, yeah..

PicoGUS SOIC TSSOP.jpg

@polpo I also asked this on twitter but, CSV BOM has SN74CB3T3245PW for U2 (which I soldered) whereas your interactive BOM and your card photo has 74LVC244 instead.. Did I do wrong?

I also noticed the slight confusion while building. Ultimately I found this message on the build guide page, where it says "In a pinch, U2 can be substituted with an 74LVC244 part". My conclusion was that the original spec is SN74CB3T3245PW, but if you don't have it, then 74LVC244 is a tolerable second option.

To be clear, I also used a SN74CB3T3245PW for U2.