Picodrive twl need sounds

  • Thread starter Thread starter yoooblls
  • Start date Start date
  • Views Views 2,351
  • Replies Replies 4

yoooblls

Well-Known Member
Member
Joined
Nov 5, 2022
Messages
184
Reaction score
28
Trophies
0
Age
22
XP
534
Country
Cambodia
Picodrive twl is ALMOST the perfect jenesis emulator for the ds but it aint got no sounds so pls who can make it have sounds
Here the link of the github
DS-Homebrew/PicoDriveTWL: SEGA Genesis/Mega Drive emulator for the Nintendo DS(i)
https://github.com/DS-Homebrew/PicoDriveTWL
I really like jenesisds but the 3mb limit and the screen sucks tbh its perfect but there some things i dont like the sonic classic collection game is the jenesids only problem we cant put other roms or just use other means the best version of jenesisds is lock out by being an nds game that has no source codes
 
Last edited by yoooblls,
im actually in the process of writing one with the help of claude. and by with the help of claude i mean i have zero idea what im doing and claude is just telling me what to do lol. we have made real progress though, claude found some "errors" in the code and went ahead and fixed it (supposedly..) and i also had to downgrade to an older version of devkitPro to get it to make the file. im about 2 days in and have made a "patch" but now my ds keeps bootlooping so i have alot of troubleshooting to do before i make the finished product. ill definitely report back once i have something that works though! and yeah the whole reason im doing this is because of the clunkiness of jenesisds and how visuals look so whacky with every game except for sonic so im in the same boat man
 
Last edited by justjace5,
  • Like
Reactions: esv_83 and Nikokaro
im actually in the process of writing one with the help of claude. and by with the help of claude i mean i have zero idea what im doing and claude is just telling me what to do lol. we have made real progress though, claude found some "errors" in the code and went ahead and fixed it (supposedly..) and i also had to downgrade to an older version of devkitPro to get it to make the file. im about 2 days in and have made a "patch" but now my ds keeps bootlooping so i have alot of troubleshooting to do before i make the finished product. ill definitely report back once i have something that works though! and yeah the whole reason im doing this is because of the clunkiness of jenesisds and how visuals look so whacky with every game except for sonic so im in the same boat man
All right, hopefully it'll work, but it would be better to ask flubba if he can create a sound chip emulator (YM2612) and have someone integrate it into Picodrive twl.
 
I am looking into this too. I was able to use the teak DSP in DSi mode in a local build and it was okay-ish. I broke DS mode and a bunch of other stuff, so I'll rebuild my strategy and try again. I'll let you guys know if I get something.

First of all I would like to upgrade the homebrew to current libnds and calico instead of downgrading my toolset.

EDIT: I have an initial baseline here

Code:
PicoDriveTWL 2.1.0

  Build / Toolchain

  - Ported the entire project to the current devkitPro toolchain: libnds 2.0.2 / calico runtime, devkitARM r68, gcc 16, maxmod-nds 2.1.0.
  - Rewrote the ARM7 core as a minimal calico ARM7 (the old libnds ARM7 template API was removed); links against -lmm7 -lcalico_ds7.
  - Replaced the custom ARM9 linker specs (ds_arm9_hi.specs/.mem) with the stock calico ds9.specs; reproduced the DS-mode heap cap (0x02380000) at runtime via fake_heap_end.
  - Ported fix_ndsheader.py from Python 2 to Python 3 (byte-identical DSi header output); build now uses python3.
  - Fixed case-sensitive include paths so the project builds on Linux.
  - Set the homebrew game code to #### so emulators (melonDS) correctly DLDI-patch and mount the SD card in DS mode.

  DS-mode memory management

  - Added a clean "ROM too large" screen when a ROM won't fit and no RAM expansion is present, instead of crashing.

  Slot-2 RAM expansion (SuperCard / Opera / EZ-Flash)

  - Fixed slot-2 access under calico
  - Replaced the unreliable slot-2 detection (which trusted the DLDI device ID and could blindly load into unmapped memory) with a safe two-pattern write/read-back probe.
  - Enabled the data cache on the slot-2 region after loading for a bit of a speedup when running a ROM from expansion RAM.

  Game-switching UX

  - The current game is no longer torn down until the newly chosen ROM is confirmed loadable — if it's too large, the running game is preserved.

  Fixes

  - Fixed a latent double-fclose of the ROM file on every load.
  - Guarded a null-cartridge write on game change that faulted under calico's protected low memory.

Now I have a chance to fix what is needed for things like Super Street Fighter II's internal memory banking (for roms over 4MB in Genesis/MD) to work with PicoDriveTWL. Sound should follow easily now, but expect performance to take a hit. No binaries provided yet.
 
Last edited by Urbanshadow,
  • Like
Reactions: esv_83
This is my best effort so far: PicoDriveTWL 2.1.0 Sound Test (Alpha build)

For the audio to initialize you need to hold R while loading a game.

Imho, DS mode with sound is unplayable.
DSi mode is honestly palatable but YMMV.
This is AI coded.

I have found issues in specific games with YM2612 FM dropouts, and overall sound quality is not the greatest, but it kind of works. I don't think I can improve it much further than it is, and I am very happy with this so-so result because I didn't think it was even possible to get here.

I tried.

To add audio without overwhelming too much the DS CPU, Genesis sound emulation was splitted across both processors: ARM9 continues running the 68k (main genesis CPU) and Z80 cores, maintains a lightweight YM2612 timer/status model, and records timestamped YM2612
and PSG register writes, while ARM7 performs the expensive YM2612, PSG, and DAC synthesis in parallel as ARM7 cpu was barely used after the libdns and calico MPU upgrade. The processors communicate through a fixed shared-memory event queue and a PCM ring buffer, producing 11.025 KHz sampling quality mono audio through a manually serviced maxmod audio lib stream. Z80 execution is grouped into four-scanline focused render chunks to artifically produce processing void bubbles between chunks to allow audio to breathe and process mid frame.

This lowers the impact of the processing a lot, but introduces desyncs between video and audio that are not that bad, but noticeable if you are looking directly to detect it. The major tradeoff was dealt on ROM capacity in DS mode without RAM expansion: 2.3 MB is the current RAM ceiling down from 3MB (in practice 2MB roms, as MD roms bank in 512KB blocks). DSi mode is not affected by this.

At this point, unless someone comes and proves me wrong, I don't think Slot-2 memory expansion would mean any improvement for audio systems. It does help currently to run bigger games on DS tho.

EDIT: Sonic 3 dropouts fixed. Rolling release updated.
 
Last edited by Urbanshadow,

Site & Scene News

Popular threads in this forum