Subject: [patch] Collapse timer callbacks
Hi mamedev,
The following patch collapses timer callbacks in some cases to avoid
duplicating code. In the case of crystal.c, it also refactors two DMA
handlers and shuffles the init/reset code around a bit. I noticed
while doing this that h8_itu_read8 is missing cases 0x96,0x97 which is
almost certainly a bug, but I left it alone.
~aa
Subject: [patch] Fix i386 bsr implementation
Hi mamedev,
The i386 cpu emulator will return the wrong result for bsr when the
highest bit is set (0 instead of 15 or 31). The attached patch fixes
this.
~aa
Subject: few more patches
Hi,
enclosed please find a few patches to continue the input port
clean up (and to fix a mistake in the previous submission). In
detail:
* hal21.diff: with my last submission I made a mistake in hal21.c
(I converted it only partially to custom inputs, still returning
1<<5 instead of 1 from the handler). please revert that change
(it was in u4_custom04.diff) and apply this one, to fix the
communication with sound cpu
* clean_new.diff: introduce AM_READ_PORT & c. in drivers starting
with M (only few of them updated, more to come)
* custom_new.diff: improves input handling in mainsnk.c and marvins.c
by using CUSTOM_INPUTs and AM_READ_PORTs
* gaelco3d.diff: converts radilkalb inputs to 32bit inputs (as
they are), removing the need of AM_READ16 for those
* itech32.diff: converts inputs of later games to 32bit inputs and
updates all the occurrences as needed. It also simplifies input
handling by removing special_port_r from most of the maps (replaced
by a CUSTOM_INPUT). Now only drivedge still uses 16bit inputs and
special_port_r, but I'll investigate it later.
* arkanoid.diff: changes mcu reads to CUSTOM_INPUTS (and muxed
inputs as well). Bootleg inputs has been slightly changed as well
to cope with the new implementation of the protection
* irem.diff: this patch changes a lot of input related things in
m10->m107 irem boards. First of all, it moves input definitions from
drivers/m92.h to include/iremipt.h (which was already there, just
a bit unused ;) ) and it removes completely drivers/m92.h (which
only contained those definitions). Moreover, it adds more common
inputs to iremipt.h and starts to use that file in m62->m107 instead
of local #defines. Finally, it adds diplocations to all the games in
m62->m107 which were missing and it implements coinage mode 2 through
dipconditions in the drivers which didn't support it.
I tested as much as I could these changes and I can see no regressions.
Regards,
Fabio
Subject: [patch] Fix 1802 cybrcomm, raveracw, raveracj, raveraja,
ridgerac, ridgerab, ridgeraj, acedrvrw, victlapw: No sound in games
after reloading via the MAME UI
Hi mamedev,
The problem with namcos22 games losing sound when running multisession
is actually an m37710 cpu initialization bug. The attached patch
fixes it, and also collapses all the timer callbacks together as an
unrelated code cleanup.
Note: namcos22 has a lot of uninitialized state, so I wouldn't be
surprised if there are other multisession issues.
Subject: some more input clean-ups
Hi,
attached please find a few patches against u4. These diffs improve
input ports for drivers starting with F->L. In particular: they add
AM_READ_PORT whenever suitable, they make inputs fully 32bit where
needed, they remove indexed input read handlers from INITs, they
replace many read handlers with appropriate CUSTOM_INPUTs.
Additional improvements:
* added dip switches and locations to go2000 (even if they were
partially documented in the source)
* fixed artmagic protection (it used a wrong tag, which probably
I added somewhere in 0.125uX); even if I haven't experienced any
problems due to the bug since the regression now it's fixed
More details on the patches:
* u4_clean01 -> u4_clean07: these are standard changes like the
one I submitted previously (no custom inputs involved)
* u4_custom01 -> u4_custom04: here there are also changes involving
custom inputs (they mainly deal with eeprom reads, but a few were a
bit more interesting); I separated these from the other ones in
case you want to check them more in detail
* itech8.diff: this patch improves ports & their handling in itech8.c.
In particular, it replaces the 'special' handlers with a single
custom input and I would like a confirmation that it was the right
choice in this case.
Patches are independent one from the other and should apply with
no problems. Let me know if this is not the case.
Regards,
Fabio
included by generic components in emu/ and thus should have no
dependencies on the MAME code.
Added new target ldplayer, which is based on MAME but serves as
a standalone laserdisc player for CHDs. Right now only the
Pioneer LD-V1000 is connected, and limited commands are available.
Each player type is a driver, so you specify the player type on
the command-line. The driver then opens the first CHD it finds
in your ROM path and uses that as the laserdisc. The intention is
that you specify the -rompath each time on the command-line, so
a typical approach might be:
ldplayer ldv1000 -rompath j:\mach3
where it will pick up the mach3.chd lurking in your j:\mach3
folder. Several basic commands are supported:
Space = play/pause
Alt = toggle frame display
Left = scan forward (when playing) or step forward (when paused)
Right = scan backward (when playing) or step backward (when paused)
0-9 = enter numbers for search
Enter = execute search to frame
item will be visible but not selectable.
Fixed bug that prevented the cheat engine from working when the
debugger was disabled.
Modified xmlfile.c to accept integer values in decimal or hex. The
default is decimal. Numbers may be prefixed by '#' for decimal
values, or by '$' or '0x' to indicate hexadecimal values. Also
added function xml_get_attribute_int_format() to return the format
of the attribute, so that it can be later replicated.
Updated cheat parser to preserve the format of attribute values
used for cheat parameters and items.
Added support for information-only cheat items, which will be
displayed in the menu but which are not selectable and have no
action associated with them. Empty information-only items are
automatically converted to menu separators.
The structures/names were getting too complex for my macros to handle. They would require hand editing and my computer is too slow to keep re-compiling.
Passes a clean compile.
Removed channels parameter from avcomp decode configuration.
Fixed incorrect test in winwork that led to spinning instead
of using the nicely allocated events we had on hand.
Forced a sound synchronization on each vsync in the laserdisc
playback. This prevents overwriting the tail end of the
buffer which was fouling up the MACH 3 audio decoding.
Removed obsolete size check for uncompressable audio data.
1) convert framebuffer's ram from 8 bit to 16 bit
2) convert dma command from 8 bit to 16 bit
3) convert gfx command from 8 bit to 16 bit
4) implemented all gfx mode: 1,2,4,8,16 bpp
for now the rendering is only 8 bpp
now we can use this gfx chip for adp driver that use 4bpp
streams and a delta-RLE pre-encoding. Added optimized
case for the Y/Cb/Y/Cr video encoding case. Cleaned up
the code.
Updated avcomp.c to use the new huffman.c functions.
Reworked configuration options to allow for both input
and output of naturally aligned data streams. Updated
chdman and laserdsc to use the new interfaces. New
compression gives an additional 3-7% over previous
attempt and compresses the dummy CHDs down significantly.
Marked madalien and madalina as Imperfect Graphics. They are missing an effect. When you shoot an enemy in the dark, the whole screen lights up. Basically the headlights fill the whole screen.
credit Guru, Derrick Renaud
I did not do much to the following files because I did not know the best way to name them.
aicadsp.h
sid.h
sidenvel.h
sidvoice.h
ymdeltat.h
I did not update structures only used in the src\emu\sound\*.c files. They are only used locally in the file so they were not worth the effort.
Credit Guru.
(This completes adding all of Guru's readmes to the MAME source. There remain ~20 readmes that I still need to compare to what's in MAME to see if they have any additional information, but beyond that, this little project is done!)
---------------------------------------------------
Killer Instinct (SNES bootleg) [Tomasz Slanina]
Final Fight 2 (SNES bootleg) [David Haywood, Tomasz Slanina, Kowal]
New games marked as GAME_NOT_WORKING
------------------------------------
Sonic Blast Man TURBO 2 (SNES bootleg) [Corrado Tomaselli]
- General clean up (merged memory maps, inputs, readme's)
- Marked vbowl program rom as bad, patched to not crash (fixes bug 00492)
- Protection emulation / patches, promoting to working:
dbc, xymg, lhba (fixes bug 02027), drgwrld3 (fixes bug 00491), chindrac, chindrah
New games added or promoted from NOT_WORKING status
---------------------------------------------------
Da Ban Cheng [Pierpaolo Prazzoli, Luca Elia]
Xing Yen Man Guan [Luca Elia, Wei Mingzhi]
New clones added
----------------
Zhong Guo Long (China, V010C) [Luca Elia]
Zhong Guo Long? (Hong Kong, V011H) [Luca Elia]
- Pass chip type around and restore Jarek's original behavior for YM2203/YM2610
- Always recalculate attack rate in set_ar_ksr, fixes Megadrive/Genesis "Batman & Robin"
What a PITA. :) I'll have to go back and do A-J to lower case the handlers to match the new structure names I already did.
Sorry Mess and other port developers, but the code should match what is stated on the official WIKI. But don't worry, I don't plan on updating anything but the sound cores.