Giter VIP home page Giter VIP logo

Comments (7)

dciabrin avatar dciabrin commented on June 19, 2024 1

This might very well be a timing issue in the code on real hardware. I started this default sound driver from scratch so it's very likely that the z80 code does not wait long enough on the ym2612 or something along those line.
There's no particular logic for sound driver check/enforcement in the hardware, so tweaking the driver ID won't change anything. I don't think that NEOSD would do any check on it either.

from ngdevkit.

dciabrin avatar dciabrin commented on June 19, 2024 1

So this may be related to prepare_wait_in_ram_opcode macro and its usage in the MROM init and the snd_command_01_prepare_for_rom_switch?

So I think that this one shouldn't but the culprit, because unless it's buggy it's just meant to make the z80 read its code from RAM, to leave time to the m68k to initialize everything and switch to whatever z80 code bank is needed.

I'm more thinking something is wrong in https://github.com/dciabrin/ngdevkit/blob/f845e9c40fb9c8f6ee562933fb08a311785667ae/nullsound/driver/ym2610.s, because successive calls to the ym2610 have to respect some latency [1,2] to be effectively honored by the ym2610. And usually the emulators aren't that sensible to that, so we're overlooking some bugs on the real hardware.

[1] http://www.ajworld.net/neogeodev/ym2610am2.html#Status
[2] http://www.ajworld.net/neogeodev/ym2610am2.html#RegWriting

from ngdevkit.

dciabrin avatar dciabrin commented on June 19, 2024 1

Also https://wiki.neogeodev.org/index.php?title=Z80/YM2610_interface is probably a more specific answer to my previous comment.

from ngdevkit.

khelkun avatar khelkun commented on June 19, 2024 1

Cool that seems to be the right lead. I'l try to fix this and send you a PR if I succeed. thanks

from ngdevkit.

dciabrin avatar dciabrin commented on June 19, 2024 1

OK I think 859fc94 should fix this issue. It looks like the z80 was never initialized properly so it couldn't receive NMI when the 68k was triggering a sound command.
I don't have a way to test this fix on real hardware, but Mame is usually pretty spot on for NeoGeo, so I believe this patch should fix the original issue.
Closing accordingly.

from ngdevkit.

khelkun avatar khelkun commented on June 19, 2024

So this may be related to prepare_wait_in_ram_opcode macro and its usage in the MROM init and the snd_command_01_prepare_for_rom_switch?

from ngdevkit.

dciabrin avatar dciabrin commented on June 19, 2024

After an awfully long hiatus, I just noticed that example 06 doesn't seem to run on MAME either. So while it's nothing close to being fixed, at least it doesn't require me from getting my hands on a neosd to test that on real hardware.

from ngdevkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.