Here is a fix I've done to the Z80 CPU core that removes the increasing
of the R register from each IX/IY related (FD xx or DD xx) instruction.
This corrects the amount the R register should increased to to 2,
instead of 3. Documentation I've read suggests that the R register is
increased by 1 for each instruction with no prefix, and by 2 for each
instruction with a prefix (DD, FD, ED, CB, DD CB and FD CB). This fixes
some protected cassette loaders in the MESS Amstrad CPC driver, and
maybe others, which require the R register to be correct for the next
routine to be decoded correctly. I'd doubt that there is much, if any,
noticeable impact for MAME, as the R register is really only useful to a
program as a simple random number generator (or seed).
I've tested the fix with Pacman, in MAME, and when it comes across a LD
IX,xxxx or ADD IX,xx it will increase R by 2, whereas previously, it
increased R by 3.
Added artifical Z offset of -2 to make the full screen show in crusnexo.
Really fixed TMS3203x interrupt handling.
Added hack to catch invalid SP values during 32031 execution (debug mode only).
Corrected rom name for Thundercade
changed clocks to OSC by divider IE:
16000000/2 /* 8MHz */
Changed Orbs clock to 16MHz with note about 14.xx MHz
Changed Meta Fox's x0-006 (65c02) to same as Thundercade
Changed the YM3438 in Ultra Toukond Densetsu from 6MHz
to 1600000/4 /* 4MHz */ as there is no mention of 6MHz
OSC on PCB
* fixed interrupt handling
* added support for edge-triggered interrupts on '32
* expanded interrupt support for the '32
* updated drivers using TMS3203x core to deassert interrupts
* added externally accessible functions for converting '3x floating point format
* updated gaelco3d driver to use new functions
Zeus2 (+related) updates:
* fixed save states for DCS games
* cleaned up Zeus2 waveram handling
* added Zeus2 save state support
* added preliminary model and quad rendering support for Zeus2
* added support to timekpr for the ZPRAM used on Zeus2
* hooked up ZPRAM in Zeus2 games
* hooked up controls in Zeus2 games
* updated poly.c to ensure it is idle before saving state
This patch should complete the addition of static qualifiers to all
MAME symbols that aren't explicitly exported. It primarily handles
generated code (e.g. amspdwy.c), plus a handful of cases I'd
previously missed and some new cases introduced in the last update.
One interesting bit was the discovery that the 32-bit scanline
routines in drawgfx.c are unused. I debated eliminating them but
decided instead to just export them. Various internal drawgfx
functions were conditionally removed by examining a new RAW define,
although one routine (blockmove_8toN_alphaone) was determined to be
dead code.
While investigating constifying MESS, I came across a few core APIs
that were missing const qualifiers which this patch fixes. I also
consted up tx1.c while I was at it.
- cvs games: according to PCBInfos speech chip is TMS5100.
Changed driver to use TMS5100 and "game system operational" now sounds more natural
- removed sound/m58817.*
- added support for multiple coefficients maps to tms5110.*
- added coefficient maps for TMS5100 and M58817 from documented sources to tms5110r.c
- fixed interpolation factors (see tms5110r.c for reason)
- made lattice calculation precision 9bit
- added support for READBIT and LOADADDRESS commands to tms5110.c
- more changes in line with various patents
Note: Protection still not understood in detail. Driver only contains "hacks" as workarounds. Consequently, more protection issues are likely to surface in the future.
Besides confirming clocks on some games, I modified:
Aerofighters and Turbo Force sound z80 to 5mhz
Midnight Resitance 68k cpu to 10mhz (20mhz crystal) and modified m6295
clock to 1mhz. Also confirmed pin 7 is high.
Midnight resistance has a lot of slow downs on the pcb too
This small patch makes some minor "code quality" improvements to MAME.
First off, some remaing static/const qualifier missed cases were
addressed. Secondly, a few cases of missing #include "foo.h" were
added. Thirdly, a few global names were modified to make them less
generic/more consistent (voodoo.c, vrender0.c, lethal.c, rungun.c,
zac2650.c). Fourthly, some dead/useless code was removed
(i8051.c,model1.c,romcmp.c).
Verified some cpu clocks of original boards using a frequency counter:
* Changed Success Joe Ym2203 clock from 3mhz to 4mhz
* Changed Pang M6295 clock from 990khz to 1Mhz
* Changed Halley Comet main cpu clock to 1.664mhz (it's not a mistake, the clock is very low)
* Cleaned up zeus wave RAM accessors.
* Changed rendering code to allow for greater parallelism on multicore systems.
* Removed some vestigial zeus 2 hacks.
* Reduced visible area to remove artifacts.
* Made right/bottom vertices inclusive to fix some gapping issues.
* Fixed invasn lightgun offset.
* Marked invasn as playable.
Zeus 2 hardware:
* Fixed ROM loading, added banking support.
* Separated zeus 2 video implementation from zeus implementation.
* Implemented direct pixel accesses; enough to get startup screens to show.
ADSP-2100:
* Properly documented ADSP-2104 internal memory map.