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

c140.cpp: Update data bus behavior and support 12 bit PCM, Verified from assault(namcos2) schematics #6638

Merged
merged 6 commits into from May 6, 2020

Conversation

cam900
Copy link
Contributor

@cam900 cam900 commented May 4, 2020

Add/Update notes, Use shorter/correct type values, Fix address/data bus bits, Modernize save states, Fix spacing, Reduce unnecessary lines, duplicates, Move little endian interface in c140.h, Move bankswitching and address/data decoding behavior in each drivers

namcos2.cpp, namcos21*.cpp: Fix c140 ROM loading, mirrored maps
namcos2.cpp: Implement c140 ROM address/data decoding logics

vgmplay.cpp: Fix C140 compatibility

…rom assault(namcos2) schematics

Add/Update notes, Use shorter/correct type values, Fix address/data bus bits, Mordernize save states, Fix spacing, Reduce unnecessary lines, duplicates, Move little endian interface in c140.h
namcos2.cpp, namcos21*.cpp: Fix c140 ROM loading, mirrored maps
vgmplay.cpp: Fix C140 compatiblity
@superctr
Copy link
Contributor

superctr commented May 4, 2020

Should the sample ROM data bus just be treated as 16-bit? Afaik (from Assualt schematics) the least significant 4 bits of each sample are stored interleaved in a "third" ROM bank with some decode logic sending the correct nibble to the chip. Since this rom have been unpopulated in every PCB I have seen, I'm not sure if it matters but it might be good to be correct from the beginning and emulate this decode logic.

@smf-
Copy link
Member

smf- commented May 4, 2020 via email

@cam900 cam900 marked this pull request as draft May 5, 2020 11:32
…und regression in previous commit

remain in vgmplay for compatiblity
namcos2.cpp: Verify C140 ROM mapping from schematics
namcos21*.cpp : Add notes
@cam900
Copy link
Contributor Author

cam900 commented May 5, 2020

TODO: It has noisy sound after this PR, I will fix later and reopen the review for this PR.

Edit: Regression is fixed, so I reopen this.

@cam900 cam900 marked this pull request as ready for review May 5, 2020 11:52
@superctr
Copy link
Contributor

superctr commented May 6, 2020

I think in the long run C219 should be split from C140. Btw, the C219 uses the same "mu-law" algorithm as the C352, it's extensively used by Knuckle Heads.

Add notes, Split sound stream update and host interface
@rb6502 rb6502 merged commit 5852df5 into mamedev:master May 6, 2020
@p1pkin
Copy link
Member

p1pkin commented May 6, 2020

is there was made any attempts to test this PR / code at practice, or it was pure blind written ?
I see a bunch of compiler errors

Compiling src/mame/drivers/namcos21.cpp...
../../../../../src/mame/drivers/gal3.cpp: In member function 'void gal3_state::gal3(machine_config&)':
../../../../../src/mame/drivers/gal3.cpp:683:14: error: 'class c140_device' has no member named 'set_bank_type'
683 | m_c140_16g->set_bank_type(c140_device::C140_TYPE::SYSTEM21); //to be verified
| ^~~~~~~~~~~~~
../../../../../src/mame/drivers/gal3.cpp:683:41: error: 'c140_device::C140_TYPE' has not been declared
683 | m_c140_16g->set_bank_type(c140_device::C140_TYPE::SYSTEM21); //to be verified
| ^~~~~~~~~
../../../../../src/mame/drivers/gal3.cpp:688:14: error: 'class c140_device' has no member named 'set_bank_type'
688 | m_c140_16a->set_bank_type(c140_device::C140_TYPE::SYSTEM21);
| ^~~~~~~~~~~~~
../../../../../src/mame/drivers/gal3.cpp:688:41: error: 'c140_device::C140_TYPE' has not been declared
688 | m_c140_16a->set_bank_type(c140_device::C140_TYPE::SYSTEM21);

@rb6502
Copy link
Contributor

rb6502 commented May 6, 2020

The compile issues with this were blocking top of tree. Please compile and run changes before submitting them.

@cam900
Copy link
Contributor Author

cam900 commented May 7, 2020

Fixed in #6659.

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

5 participants