Quantcast

Results 1 to 10 of 10

Thread: 32x mod player

  1. #1
    Sports Talker
    Join Date
    Sep 2013
    Posts
    36
    Rep Power
    0

    Default 32x mod player

    Is there already a 32x mod player? I just did a quick and dirty one that seems to work in Fusion. It polls the PWM register for timing, since I don't quite know how to setup interrupts, and don't have the first clue about DMA (if anybody has a secret link for this info...). Although I guess polling isn't so bad if you're just going to devote a whole SH2 to audio. 22KHz, 4 channels.

    http://www.hyakushiki.net/misc/32xmod.zip

  2. #2
    WCPO Agent
    Join Date
    Sep 2012
    Posts
    982
    Rep Power
    26

    Default

    Nice job. I always wonder why there haven't been MOD players written to more old consoles.
    Would it be possible to write one on the Saturn, that uses the SCSP hardware? Or are there some features of the MOD format that don't map to the chip?

  3. #3
    Comrade as in friend. Master of Shinobi ComradeOj's Avatar
    Join Date
    Dec 2012
    Location
    New Mexico, USA
    Age
    24
    Posts
    1,328
    Rep Power
    56

    Default

    Quote Originally Posted by zyrobs View Post
    Nice job. I always wonder why there haven't been MOD players written to more old consoles.
    Would it be possible to write one on the Saturn, that uses the SCSP hardware? Or are there some features of the MOD format that don't map to the chip?
    You might already know about it, but Toy Story on the Genesis has a MOD player. I think it's only used for the title screen music. You can even patch in different MOD files in to the ROM and it will play.
    Modded consoles:
    Master System (v7040) with s-video & direct AV out
    Model 1 with 10mhz overclock & halt switches
    Model 1 with 10mhz 68010
    Model 2 VA2.3 with unfiltered Mega Amp, & s-video
    Model 3 VA1 with compatibility fixes & s-video
    32X with s-video
    Visit my web site at www.mode5.net
    Or my collection of homebrew Genesis games, programs, and music on SEGA-16!

  4. #4
    Sports Talker
    Join Date
    Sep 2013
    Posts
    36
    Rep Power
    0

    Default

    Quote Originally Posted by zyrobs View Post
    Nice job. I always wonder why there haven't been MOD players written to more old consoles.
    Would it be possible to write one on the Saturn, that uses the SCSP hardware? Or are there some features of the MOD format that don't map to the chip?
    There may be some features that don't map, but I haven't implemented them all yet and they aren't always used by MODs.

    I attempted Saturn but I can only get it to play in Yabause. On real hardware the samples are all garbled for unknown reasons.
    http://www.hyakushiki.net/misc/satmod.zip

  5. #5
    Sports Talker
    Join Date
    Sep 2013
    Posts
    36
    Rep Power
    0

    Default

    Updated. http://www.hyakushiki.net/misc/32xmod.zip

    The routine is mostly complete now as far as effects. Recognizes old, M.K., 6CHN, and 8CHN files. It could almost, but not quite handle 6 channels at 22KHz without rewriting parts in asm again, so I left 5 channels enabled. Could be recompiled with more channels enabled and a lower sampling rate. But the .MOD data is now the last thing in the binary, so another file can also be substituted by using a hex editor to stick it at $2738 (after the string "INSERT MOD HERE:"

  6. #6
    Nameless One
    Join Date
    Jun 2011
    Posts
    67
    Rep Power
    11

    Default

    I'm pretty sure ChillyWilly released a mod player for the 32X at some point. I've used his sound DMA setup code in several projects anyway, e.g. in my 32X SID player: https://github.com/mic-/lusid-dreams

    You'll find the slave SH2 entry point in crt0.s, and from there it calls the slave() function in hw_32x.c where the necessary DMA setup is performed.

  7. #7
    Sports Talker
    Join Date
    Sep 2013
    Posts
    36
    Rep Power
    0

    Default

    Quote Originally Posted by mic View Post
    I'm pretty sure ChillyWilly released a mod player for the 32X at some point. I've used his sound DMA setup code in several projects anyway, e.g. in my 32X SID player: https://github.com/mic-/lusid-dreams

    You'll find the slave SH2 entry point in crt0.s, and from there it calls the slave() function in hw_32x.c where the necessary DMA setup is performed.
    Thanks for the link, I might tackle DMA at some point. As it happens I just obtained an actual 32x console this week and found that none of my stuff was working on it My 68K startup code had an alignment problem and PWM wouldn't play because writing too large a value screws it all up. Here I was ignoring how it really works and just treating it as a 12-bit DAC but... no.

  8. #8
    Nameless One
    Join Date
    Jun 2011
    Posts
    67
    Rep Power
    11

    Default

    Yeah, on the 32X the sample resolution depends on the sample rate. For example, with a sample rate of 22050 Hz on a PAL 32X, the maximum sample value would be 1034 (i.e. 22800000/22050). At 28000 Hz it would be 814, and so on. On an NTSC console those values would be slightly higher because the base clock is slightly higher. The minimum allowed sample value is (AFAIK) always 2. Try to play anything outside the valid range on a real 32X and it will sound all kinds of messed up - if you get any sound at all.

  9. #9
    Sports Talker
    Join Date
    Sep 2013
    Posts
    36
    Rep Power
    0

    Default

    Here is the latest iteration, which works on the real 32x. http://www.hyakushiki.net/misc/32xmod.32x

    Contains several mods (mostly from modarchive.org)
    Code:
    06/01/2019  02:27 AM           315,418 trans_atlantic.mod
    06/05/1995  07:51 AM           122,828 03-MENU.MOD
    08/19/1990  01:48 PM            68,940 CRYSTALH.MOD
    05/31/2019  06:38 AM            15,960 random_voice_-_monday.mod
    06/01/2019  02:27 AM           327,496 ambpower.mod
    07/06/2001  05:00 PM            49,328 SIRIUS72.MOD
    05/04/1996  03:26 PM             6,220 SPACESPA.MOD
    06/01/2019  02:11 AM           160,218 knulla-kuk.mod

  10. #10
    16-bits is all he needs Master of Shinobi matteus's Avatar
    Join Date
    Apr 2006
    Location
    UK
    Age
    36
    Posts
    2,295
    Rep Power
    59

    Default

    Quote Originally Posted by bakemono View Post
    Here is the latest iteration, which works on the real 32x. http://www.hyakushiki.net/misc/32xmod.32x

    Contains several mods (mostly from modarchive.org)
    Code:
    06/01/2019  02:27 AM           315,418 trans_atlantic.mod
    06/05/1995  07:51 AM           122,828 03-MENU.MOD
    08/19/1990  01:48 PM            68,940 CRYSTALH.MOD
    05/31/2019  06:38 AM            15,960 random_voice_-_monday.mod
    06/01/2019  02:27 AM           327,496 ambpower.mod
    07/06/2001  05:00 PM            49,328 SIRIUS72.MOD
    05/04/1996  03:26 PM             6,220 SPACESPA.MOD
    06/01/2019  02:11 AM           160,218 knulla-kuk.mod
    Just chuckling to myself reading your website forums page...


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •