OCM-SM / Second Gen OCM Devices - OCM 3.9 expansion project

صفحة 1/3
| 2 | 3

بواسطة ducasp

Paladin (712)

صورة ducasp

01-05-2022, 02:32

Hi guys,

As you know, KdL and HRA!-san work really hard towards MSX FPGA improvements, but, they have their own goals (which if I'm not mistaken, is to have a full Turbo-R on OCM-SM / Second gen OCM devices (SM-X, SM-X Mini and SX2). On the other hand, there are quite a few things I would like to see implemented that perhaps doesn't align with their final goal (as that will occupy space on FPGA that might be needed for Turbo-R related stuff, 22K cells seem like much, but OPL3 and OPLL already use quite a lot of that).

So, to not bother them, I'm doing parallel builds, I did 3.9a and now 3.9b, incorporating features I did for myself and perhaps someone else will like. Of course, I keep communications with KdL (i.e.: he has picked up my OPL3 fixes), code is on Github so anything there can be picked up by him for OCM-PLD and by HRA! for his DE0 project, if they see fit.

Those versions were fully tested on SM-X by me and SMX-HB by Fabio Santos and Agenor (that is something that perhaps only Brazilians will have, it is a 1.5gen device that has 15K cells, more than Zemmix/OCM but less than SM-X/SX2, that is a replacement board for Hotbit MSX computers made in Brazil and using the keyboard from it and having the slots aligned with the case, quite nice), SMX-HB versions are a little bit limited (no OPL3 as its FPGA doesn't have enough cells for it, and you have to choose to have either paddle emulation or more sound chips). I don't think there should be any issues on SX2 and SM-X MINI, but I would recommend that if you don't have an ALTERA USB BLASTER to recover using the JIC from the original 3.9 OCM PLD from KdL, you wait until someone else test it, as if it for some reason doesn't work, you will need an USB Blaster to recover using JIC file. Tongue

There is nothing for Zemmix Neo and OCM owners, sorry about that, but it is really difficult (if not impossible) to add new features as those devices are being used to its limits and I don't have a first gen device to test...

Now, introduction made, warning made, where can you get OCM 3.9b by me? In my github:

https://github.com/ducasp/MSX-Development/releases/tag/OCM3....

And what new features awaits those that decide to venture on OCM 3.9b?

  • All devices except SMX-HB: OPL3 fixes that now allows proper usage of VGMPLAY 1.3. Original OPL3 code didn't have interruptions enabled, and VGMPLAY 1.3 uses the OPL3 timer feature to generate interrupts to have a high resolution timer, no interruptions, meant that VGMPLAY was expecting an interruption rate WAY FASTER but it was only getting the regular 60Hz interruption from VDP, causing slow performance. Also, the timer was not properly working, causing wrong speed playback (better, but still wrong) once interruption was fixed. Fixed that too.
  • All devices except SMX-HB: OPL3 workaround for missing channels. If a song played a channel only on the right channel, that channel was lost. This is due to the fact that OPL3 is a resource hog and to have both left and right audio channels being sequenced requires more cells than second gen devices have. I've made a workaround that allows the FPGA replica of OPL3 to be put on "mono", that is, it will modify on the fly any commands to make a channel play only on left or right outputs and alway make those play on both channels. Doom Soundtrack track 03 is a good example of a song that played bad and that now plays ok, in mono, but properly.
  • All devices except SMX-HB Frankysnd: VAUS Paddle and MSX Paddle emulation over a PS/2 mouse. SETSMART -8E enables VAUS (Arkanoid and Arkanoid II, use good msx versions that don't have paddle routines replaced by joystick routines), SETSMART -8F enables standard MSX paddle (remember that standard MSX paddle is not compatible with turbo speeds, if you use it with turbo speeds paddle range is lower and resolution is weird, turn off turbo when using that mode) so you can try GALAGA on Paddle (patch available at http://frs.badcoffee.info/patches.html), on MSX BASIC, HID TEST, etc, and SETSMART -8D will disable paddle emulation and return the joystick port to regular functions (or power cycling the device, as it is the default behavior).
  • All devices Frankysnd build: (probably Frankysnd will be renamed to Extrasnd in the next build) SN76489 working like a Franky. As Franky uses ports 48 and 49 that are on switched i/o space and OCM IPL device let switched I/O selected, it won't work initially. VGMPLAY is quite nice on turning off switched I/O before trying to detect the SN76489, so nothing is needed to have it working with VGMPLAY. But to work with COL4MMM (COM\Franky versions) or SG1000 (using /F at the end of command line) you need to either disable switched i/o (i.e.: run VGMPLAY and play any SN76489 song) or use a SETSMART command to reserve I/O 48 and 49 to Franky even when switched I/O is enabled, command is SETSMART -8C to do that, SETSMART -8B will restore normal behavior of 48 and 49 when switched I/O is enabled (or power cycling the device, as it is the default behavior).
  • All devices Frankysnd build: (probably Frankysnd will be renamed to Extrasnd in the next build) second PSG working on the known 10-13 I/O address range. Works quite nice with VGMPLAY and all patches, like the brand new Maze of Galious Patch for MSX2 that sounds best when double PSG and SCC is available. ;)

The regular versions exists just in case you want paddle emulation and OPL3 fixes and do not want the extra sound chips (i.e.: for SMX-HB that is the only option to have paddle emulation due to the limited resources of its FPGA, or, for the other devices, people that have MMM, real Franky, etc might prefer to use the real thing ;) )

If you are a SX2 or SM-X Mini owner and test any of those 3.9b versions, please let me know the results so I can update those builds as good for anyone without USB Blaster to try or work on having it working for those devices. ;)

Login أوregister لوضع تعليقاتك

بواسطة suww37

Supporter (15)

صورة suww37

01-05-2022, 03:11

Is it possible to port to MiSTer FPGA?

بواسطة ducasp

Paladin (712)

صورة ducasp

01-05-2022, 04:17

suww37 wrote:

Is it possible to port to MiSTer FPGA?

Quite possibly, just that I don't have a MiSTER so I can't do it Tongue

بواسطة AxelStone

Prophet (3199)

صورة AxelStone

03-05-2022, 12:57

Nice to see so much activity related to the new MSX FPGAs. Good luck!

It should be really nice that someone related to Mist / Mister scene could port this core to those FPGAs.

بواسطة ducasp

Paladin (712)

صورة ducasp

03-05-2022, 14:14

MiSTER will do great, and for MiSTER we could even have stereo OPL3 and in the future Franky VDP along with it, as it has an enormous FPGA... Another cool feature that would be possible with MiSTER using SDRAM would be higher z80 speeds, just tie mappers and rams to SRAM and you can clock z80 like a champ (it runs at 88MHz on the OPL3 core). Too bad I don't have one and don't plan on having it anytime soon, not only its mainboard is now difficult to find, but US dolar to Brazil Real ratio is quite bad as well the inflation from the pandemic period having diminished buying power, as sallaries did not follow the real inflation (i.e.: food is twice as expensive in general, fuel is twice as expensive as well, and adjustments to sallaries were 15%). Let's hope someone that is fond of MSX and has a MiSTER setup will pick-up changes (not only from this, but also from KdL as it seems they are on 3.8 while we already have 3.9 for quite some time). Wink

بواسطة ToriHino

Paladin (926)

صورة ToriHino

03-05-2022, 18:07

Just curious if you tried RoboPlay as well already on this setup? If it is using the same ports as the OPL4 that should work for all players not needing the wave part (and if not, i'm sure with a few small changes to the main player support for OPL3 is added as well). It is also using the OPL timer feature, which should now be working correct with your changes. Likewise for RoboSID.

بواسطة ducasp

Paladin (712)

صورة ducasp

03-05-2022, 20:31

Hi ToriHino, didn't test RoboPlay, will check it. OPL3 was originally implemented by Victor Trucco and it is currently using C0 to C3, and mirrored on C4 to C7, and a partial mirror on C8 to C9, let me check how it works with RoboPlay...

بواسطة ducasp

Paladin (712)

صورة ducasp

03-05-2022, 21:14

I've just tested it, VGM and RAW and other OPL3 format seemed to play really nice. Most formats played nice too, but I don't have memories of those songs originally so... SID music played on Roboplay, but a little bit weird if compared to the original C64 sounds, not sure if OPL4 would sound better, would have to look for my Shockwave and try it to compare.

Roboplay is detecting OCM OPL3, when enabled (you press scroll lock to enable it) as an OPL4 with 0KB sample memory. I've tried mod just for fun, and as expected, no sound LOL!

بواسطة Grauw

Ascended (10821)

صورة Grauw

03-05-2022, 22:38

Great stuff! And thanks for considering the expanded I/O for SN76489 (a pet peeve of mine), and including read support for the second AY-3-8910 so that it can be detected!

Would be nice if COL4MMM.COM and SG1000.COM could be updated to also out 0 to 40H to deselect the switched I/O before launching the games.

بواسطة ToriHino

Paladin (926)

صورة ToriHino

03-05-2022, 23:23

ducasp wrote:

Roboplay is detecting OCM OPL3, when enabled (you press scroll lock to enable it) as an OPL4 with 0KB sample memory. I've tried mod just for fun, and as expected, no sound LOL!

Ok, so I maybe have to adapt the detection routine a bit to let it detect OPL3 native. If the mods would have played I would really be suprised Tongue

بواسطة Grauw

Ascended (10821)

صورة Grauw

03-05-2022, 23:33

You can distinguish OPL3 from OPL4 easily by checking if WAVE registers can be read back. There is also an ID in WAVE register 2. OPL4 detection code in VGMPlay here.

(Don’t check for FM registers read-back since the OPL3-L also supports that.)

صفحة 1/3
| 2 | 3