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

Namco custom chip improvements. #6589

Merged
merged 6 commits into from
Apr 25, 2020
Merged

Conversation

hackbar
Copy link
Contributor

@hackbar hackbar commented Apr 25, 2020

Some improvement to the namco custom chips. I've tested the games fairly thoroughly, and didn't find any breakages.

m_nf is basically the IF flag. It should be set when the int line is
active (when its low). Only trigger an int when the line was previously
high.
Three control bits are used for the clock divider.
Previously, this was using high-level emulation. This had some
game-specific hacks.
With the better Namco custom chip emulation, this doesn't seem to be
required anymore.
@rb6502 rb6502 merged commit 3a6317b into mamedev:master Apr 25, 2020
Comment on lines +907 to +910
m_latch->q_out_cb<1>().set("51xx", FUNC(namco_51xx_device::reset));
m_latch->q_out_cb<1>().set("52xx", FUNC(namco_52xx_device::reset));
m_latch->q_out_cb<1>().set("53xx", FUNC(namco_53xx_device::reset));
m_latch->q_out_cb<1>().set("54xx", FUNC(namco_54xx_device::reset));
Copy link
Member

Choose a reason for hiding this comment

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

The first three of these aren’t going to do anything useful – you need to use .append if you want to chain additional handlers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah good catch. Fixed in #6595.

@hackbar hackbar deleted the namco_custom_chips branch April 25, 2020 17:44
@Tafoid
Copy link
Contributor

Tafoid commented Apr 25, 2020

We have some regression and some oddness which may just be minor timing changes
Testing from your #6595 - Using "-str 10 -video none -sound none -nothrottle -watchdog 25" with cleared nvram/cfg/ini

battles - galaga.cpp
Exception at start of emulation

Exception at EIP=00000000007e2c78 (ioport_port::read()+0x0018): ACCESS VIOLATION
Stack crawl:
0000000000229110: 00000000007e2c78 (ioport_port::read()+0x0018)
00000000002291f0: 00000000004370a1 (battles_state::input_port_r(address_space&, unsigned int, unsigned char)+0x0051)
0000000000229220: 00000000010058d6 (handler_entry_read_delegate<0, 0, 0, emu::device_delegate<unsigned char (address_space&, unsigned int, unsigned char)> >::read(unsigned int, unsigned char)+0x0026)
0000000000229250: 00000000010c5d2e (handler_entry_read_dispatch<14, 0, 0, 0>::read(unsigned int, unsigned char)+0x001e)
0000000000229280: 000000000111759f (handler_entry_read_dispatch<16, 0, 0, 0>::read(unsigned int, unsigned char)+0x001f)
00000000002292b0: 0000000000df86e1 (address_space_specific<0, 0, (endianness_t)0>::read_byte(unsigned int)+0x0021)
0000000000229340: 000000000065ee2e (z80_device::execute_run()+0x2eae)

--

Only 2 detected snapshot diffs between before/after.

gatsbee - galaga.cpp
gatsbee-diff

polepos - polepos.cpp
polepos-diff

--

A number of wavdata comparisons show a different hash. These are likely slight timing issues but only certain machines triggered so I'm listing them below,

  • machine - driver (size before) - hash before | (size after) - hash after

bosco - galaga.cpp - (1920044) - d825f030 | (1920044) - ad3627d8 HASH
boscomd - galaga.cpp - (1920044) - d825f030 | (1920044) - ad3627d8 HASH
boscomdo - galaga.cpp - (1920044) - d825f030 | (1920044) - ad3627d8 HASH
boscoo - galaga.cpp - (1920044) - d825f030 | (1920044) - ad3627d8 HASH
boscoo2 - galaga.cpp - (1920044) - d825f030 | (1920044) - ad3627d8 HASH
gatsbee - galaga.cpp - (1920044) - 018cc14d | (1920044) - 36eaedb6 HASH
polepos - polepos.cpp - (1920044) - b35261bf | (1920044) - cbb817f9 HASH
polepos2 - polepos.cpp - (1920044) - 7e7cb8c6 | (1920044) - 88af1da8 HASH
polepos2a - polepos.cpp - (1920044) - f531c434 | (1920044) - 3d86c41e HASH
polepos2b - polepos.cpp - (1920044) - eabcb171 | (1920044) - 66d76201 HASH
poleposa1 - polepos.cpp - (1920044) - 86cfafdf | (1920044) - 904464f1 HASH
poleposa2 - polepos.cpp - (1920044) - 86cfafdf | (1920044) - 904464f1 HASH
poleposj - polepos.cpp - (1920044) - d55d98cd | (1920044) - d1c48775 HASH
ppspeed - polepos.cpp - (1920044) - d55d98cd | (1920044) - d1c48775 HASH
topracer - polepos.cpp - (1920044) - d55d98cd | (1920044) - d1c48775 HASH
topracera - polepos.cpp - (1920044) - d55d98cd | (1920044) - d1c48775 HASH

@hackbar
Copy link
Contributor Author

hackbar commented Apr 25, 2020 via email

@Robbbert
Copy link
Contributor

I've fixed the crash in battles, but there's another regression - no sound. Please fix at your convenience.

hackbar added a commit to hackbar/mame that referenced this pull request Apr 26, 2020
* Wire up reset lines on namco custom chips.

* namco51: emulate via low level cpu

Previously, this was using high-level emulation. This had some
game-specific hacks.

* namco06: Emulate the NMI and chip select lines more accurately.

Three control bits are used for the clock divider.

* mb88xx: fix interrupt handling.

m_nf is basically the IF flag. It should be set when the int line is
active (when its low). Only trigger an int when the line was previously
high.

* namco custom chips: remove debug logging

* galaga, polepos: Remove quantum hacks.

With the better Namco custom chip emulation, this doesn't seem to be
required anymore.
@hackbar
Copy link
Contributor Author

hackbar commented Apr 26, 2020 via email

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.

5 participants