Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding LFO to some alpha denshi games' music #5995

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

x68303
Copy link

@x68303 x68303 commented Dec 1, 2019

I am not familiar with C/C+, emulation technologies, the structure of MAME's codes, electronic circuits, but could not keep patience waiting for it to be implemented in the future. maybe this implementation is not good, but it is all I can.

maybe not a proper way.
maybe not a proper way.
uint8_t MSM5232frq;

static const int8_t equitesLFOwaveform[9] = {-128, -98, -43, 42, 97, 127, 77, -13, -83}; // sine like

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actual way the LFO circuit's rate and depth works is with a 32-byte, 8-bit PROM (only the low 5 bits of output are used) whose current address is initially zero, and is incremented on every write to 0xC0FC, see the code at equites.cpp line 428.
The PROM in question is bprom.3h:
ROM_REGION( 0x0020, "prom", 0 )
ROM_LOAD( "bprom.3h", 0x00000, 0x020, CRC(33b98466) SHA1(017c73cf8c17dc5047c89316ae5b45f8d22092e8) )
This produces a 32 sample long, 5 bit deep sine wave, which uses an R2R DAC and complicated bit of analog circuitry to vary the clock rate of the msm5232; there is also a trim-pot involved, which probably sets the vibrato 'depth' or perhaps some sort of DC offset, it isn't clear yet.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The trimpot (labeled FRQ) actually sets the tuning/center frequency of the LFO for the MSM5232 clock, and annoyingly it isn't clear what it is supposed to be set to.

Copy link
Member

@cuavas cuavas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The globals are unacceptable, the PROM should be used, and values should be calculated from the component values.

@rb6502
Copy link
Contributor

rb6502 commented Dec 11, 2019

Based on the initial writeup, the OP isn't going to be able to bring this up to standard. @Lord-Nightmare can you take a look at it since you're familiar-ish with the circuit?

angelosa added a commit that referenced this pull request Mar 10, 2023
…e issued, fixes macr2036 (MT #5995), jleagt94, iganin
angelosa added a commit that referenced this pull request Mar 19, 2023
* pce_cd.cpp: convert to logmacro, fix regression on stop/repeat conditions, workaround MT#07972

* Delete unnecessary stub files from the other branch

* hash/pcecd.xml: QA notes

* nec/pce_cd.cpp: fix MT#07972 for good

* hash/pcecd.xml: update QA

* hash/pcecd.xml, nec/pce_cd.cpp: update QA

* nec/pce_cd.cpp: make pregap to have a minimum of 2 seconds, fixes redbook offset

* sound/cdda.cpp: add an actual write callback for audio playback end event

* nec/pce_cd.cpp: implement CDDA audio end event, fixes redbook repeat with emeraldd

* hash/pcecd.xml: update QA

* nec/pce_cd.cpp: do not send an irq when start/end redbook commands are issued, fixes macr2036 (MT #5995), jleagt94, iganin

* hash/pcecd.xml: QA heavy hitters

* hash/pcecd.xml: QA

* nec/pce_cd.cpp: unbreak snatcher, unbreak audio CD player

* nec/pce_cd.cpp: document crazyhos btanb

* nec/pce_cd.cpp: make BRAM to init to a standard scdsys format data

* hash/pcecd.xml: acknowledge games using Save-Kun peripheral

* nec/pce_cd.cpp: fix cdda get_channel_volume index overflow

* sound/cdda.cpp: fix longstanding regression with get_channel_volume, rename it to get_channel_sample

* nec/pce_cd.cpp: QA fader

* nec/pce_cd.cpp: cancel redbook when audio start + play mode = 0 is issued, fixes ppersia sound when picking up sword

* hash/pcecd.xml: finalize QA

* nec/pce_cd.cpp: misc cleanups

* hash/pcecd.xml: fix neklegbb description tag

* hash/pcecd.xml: faussete/traveler description fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants