VOGONS


First post, by gaffa2002

User metadata
Rank Member
Rank
Member

Hi everyone.
Some weeks ago I had an idea that could allow people to dump their own sega genesis games using just a flashcart.
For that, the user needs to run a special ROM that loads a small program into the console’s RAM, the program then waits for 20 seconds so the user can hot swap the cartridge for the one to be dumped.
The program basically reads each ROM address (for now just the first megabit as its still in testing phase) and transmits the data as audio.
The user needs to plug the console audio cable (or headphone jack if the console has one) into the line in port and run a program on PC that receives this transmission and creates a ROM file from it.

The signal is pretty simple: First it generates a noise for a fixed amount of time to indicate the “base time”, after performing a small pause, it sends another signal which will be interpreted as zero if it shorter than the base time, or one if it is longer than the base time, then another pause…This is done until the end of ROM data

I’ve got quite far but I’m having a lot of trouble creating the software that reads the audio generated by the console.
Is anyone with more experience in audio processing interested in helping? I can share the ROM file so whoever wants to help can run it on an emulator/flashcart, record the audio and then try to convert it back to a ROM file.

Thanks in advance and best regards

LO-RES, HI-FUN

My DOS/ Win98 PC specs

EP-7KXA Motherboard
Athlon Thunderbird 750mhz
256Mb PC100 RAM
Geforce 4 MX440 64MB AGP (128 bit)
Sound Blaster AWE 64 CT4500 (ISA)
32GB HDD

Reply 1 of 6, by thepirategamerboy12

User metadata
Rank Oldbie
Rank
Oldbie

It's a shame this doesn't seem to have gotten much attention. I really love the idea! Probably wouldn't be able to help much myself, sadly, other than testing the ROM on my system.

Reply 2 of 6, by BitWrangler

User metadata
Rank l33t++
Rank
l33t++

You could look into what Ham radio guys use for using a soundcard as an audio modem to send data over radio https://www.soundcardpacket.org/ you might be able to look for a packet radio modem driver for an Atari ST and snarf the code out of that for the genesis end. (No idea what hackery is needed to make that work, just first thing that came to mind as same ballpark hardware, maybe other machines would be closer)

edit: 2nd thoughts, possibly look at packet software for MSX2 and later versions, since they've got a Z80 and yamaha sound chip, since the sound subsystem is Z80/yamaha on the genesis.

Unicorn herding operations are proceeding, but all the totes of hens teeth and barrels of rocking horse poop give them plenty of hiding spots.

Reply 3 of 6, by gaffa2002

User metadata
Rank Member
Rank
Member
thepirategamerboy12 wrote on 2021-11-21, 14:42:

It's a shame this doesn't seem to have gotten much attention. I really love the idea! Probably wouldn't be able to help much myself, sadly, other than testing the ROM on my system.

Thanks! I'll gladly send it to you for testing once I (or someone else) can figure out how to decode the audio 😀

BitWrangler wrote on 2021-11-21, 15:02:

You could look into what Ham radio guys use for using a soundcard as an audio modem to send data over radio https://www.soundcardpacket.org/ you might be able to look for a packet radio modem driver for an Atari ST and snarf the code out of that for the genesis end. (No idea what hackery is needed to make that work, just first thing that came to mind as same ballpark hardware, maybe other machines would be closer)

edit: 2nd thoughts, possibly look at packet software for MSX2 and later versions, since they've got a Z80 and yamaha sound chip, since the sound subsystem is Z80/yamaha on the genesis.

Thanks for the tips!
This would be a nice improvement on the project for transmitting larger ROMS, but for now my plan is to make something simpler: The ROM uses the M68K + PSG to generate some kind of "morse" code: Short noise represents zero while a longer noise represents one (with small pauses between each signal). What is missing is a program in the user's end that will listen to the line-in port and interpret those sounds.
I tried using Java audio API and was able to read the line in port, it basically gets every audio sample and checks its volume. If the volume is larger than a given threshold, then it considers the signal to be active, then it counts the time in nanoseconds between the signal being active until the volume becomes lower than the threshold. Based on the time difference it will consider it zero or one, that reading continues until the signal is not active for too long and the ROM file is created.
My problem is that the signal is not being read very well, not sure if there is too much noise in the signal or if I'm not using the API correctly. Unfortunately, my day job is taking all of my free time right now and I won't be able to work on this project for a while, hence my request for help.

So in summary, I'm searching for someone to help creating a windows/linux program that:
1- Listens to the sound card's line-in port (another option would be to read an audio file instead)
2- Once volume is larger than an specific threshold, start counting the time until the volume decreases below the threshold (this is the "sync" signal), the calculated signal time should be used as basis for subsequent bits (let's call it base time)
3- Once volume is larger than the threshold again, start counting the time until volume decreases enough. If the calculated time is larger than the base time, its one, otherwise its zero.
4-Step 3 will be repeated until volume is too low for more than a few seconds, indicating end of transmission. The calculated bits are then stored to a binary file and should represent the ROM data.

Attached the ROM file in case anyone has interest. A simple test would be opening it in a Sega genesis emulator, press B, record the audio (no need to swap cartridges) and try to decode it with the logic above.
If the program works correctly, in the end you should have a 1MBIT (128k) ROM with the same data as the one attached, note that the data will be mirrored until it fills the 128k since the actual ROM is smaller and the program is reading a fixed value of 1MBIT for now. Apparently the Sega genesis mirrors the ROM data throughout the 4MiB space reserved for ROM in case it's not filled.

Attachments

  • Filename
    SOFTDUMP.zip
    File size
    2.62 KiB
    Downloads
    112 downloads
    File license
    Fair use/fair dealing exception

LO-RES, HI-FUN

My DOS/ Win98 PC specs

EP-7KXA Motherboard
Athlon Thunderbird 750mhz
256Mb PC100 RAM
Geforce 4 MX440 64MB AGP (128 bit)
Sound Blaster AWE 64 CT4500 (ISA)
32GB HDD

Reply 4 of 6, by Stiletto

User metadata
Rank l33t++
Rank
l33t++
gaffa2002 wrote on 2021-11-09, 01:26:

Some weeks ago I had an idea that could allow people to dump their own sega genesis games using just a flashcart.

Hey there! Your idea made me think of Artemio's MDFourier (audio generation and analysis, Sega Genesis, etc.), so I mentioned it to him. He suggested two things:
1. If you have a Sega CD and can make your own serial cable, this can dump cartridges through the serial port: https://www.retrodev.com/transfer.html
(The advantage of your solution is that you only need a flashcart, not to make a serial cable and definitely not a Sega CD.)
2. You're welcome to make use of any code from MDFourier/240ptestsuite if you find it of any use, it's all open source under the GPL.
https://junkerhq.net/MDFourier/
https://junkerhq.net/xrgb/index.php?title=240p_test_suite

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 5 of 6, by gaffa2002

User metadata
Rank Member
Rank
Member
Stiletto wrote on 2021-11-22, 22:02:
Hey there! Your idea made me think of Artemio's MDFourier (audio generation and analysis, Sega Genesis, etc.), so I mentioned it […]
Show full quote
gaffa2002 wrote on 2021-11-09, 01:26:

Some weeks ago I had an idea that could allow people to dump their own sega genesis games using just a flashcart.

Hey there! Your idea made me think of Artemio's MDFourier (audio generation and analysis, Sega Genesis, etc.), so I mentioned it to him. He suggested two things:
1. If you have a Sega CD and can make your own serial cable, this can dump cartridges through the serial port: https://www.retrodev.com/transfer.html
(The advantage of your solution is that you only need a flashcart, not to make a serial cable and definitely not a Sega CD.)
2. You're welcome to make use of any code from MDFourier/240ptestsuite if you find it of any use, it's all open source under the GPL.
https://junkerhq.net/MDFourier/
https://junkerhq.net/xrgb/index.php?title=240p_test_suite

Wow! I REALLY wish I had more free time to work on my project now.... the MDFourier seems to be exactly what I need!
I actually do have a Sega CD and might take a look in the serial cable approach, but I started the project mostly because of the challenge and to test if the Mega Drive could keep running a program even without a cartridge inserted (it does 😁, just need to be careful to not trigger any exception when replacing cartridges).

LO-RES, HI-FUN

My DOS/ Win98 PC specs

EP-7KXA Motherboard
Athlon Thunderbird 750mhz
256Mb PC100 RAM
Geforce 4 MX440 64MB AGP (128 bit)
Sound Blaster AWE 64 CT4500 (ISA)
32GB HDD

Reply 6 of 6, by BitWrangler

User metadata
Rank l33t++
Rank
l33t++

Well the radio dudes also have morse transcribing programs and a data mode called Hellschrieber that might be similar to what you're doing. I'd suggest looking at modem type modulations though because a lot of smart folks spent years figuring out how to send data down noisy limited bandwidth audio channels. Hopefully, you've got double or triple the bandwidth on short hookup cable than a telephone line does so you could stack frequencies. Anyway, I kinda think you need to be looking at what can be sent and what can be read in tandem, else it's like me saying I can compress a DVD to fit on a floppy, it's just up to someone else to figure out how to decompress it.

If you're gonna stick with just wanting an ON/OFF signalling method, I guess you could also look at how IRDA does it, blinkenlichten vs beepingsounden but software side is gonna look similar.

Unicorn herding operations are proceeding, but all the totes of hens teeth and barrels of rocking horse poop give them plenty of hiding spots.