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.
My DOS/ Win98 PC specs
Athlon Thunderbird 750mhz
256Mb PC100 RAM
Geforce 4 MX440 64MB AGP (128 bit)
Sound Blaster AWE 64 CT4500 (ISA)