The real way coefficient updates are handled is a little too complex
for now, but the hack throttles the update speed to the real rate
given the way konami uses it (once per sync). It's near impossible to
use it in a different way anyway.
Fixes mantis 2941 (at least for puzldama) and maybe 2953 (needs to
find the roms and test).
Sent: Saturday, February 28, 2009 3:53 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] More static/const qualifiers
Hi mamedev,
Another round of static/const qualifier additions, plus a rename of
has_addon_chip to snes_has_addon_chip. Notably a number of z80ctc_interface
are now const (devicification must have removed the cases where it was
dynamically modified). Notice that the READWRITExTOy macros declare two
functions, so you can't make the 2nd function static. Those macros should
probably be reworked or removed.
~aa
Sent: Friday, February 27, 2009 10:17 AM
To: submit@mamedev.org
Cc: qmc2-devel@lists.sourceforge.net
Subject: Proposed patch for src/emu/audit.c
Dear MAME developers,
I've created the attached diff to src/emu/audit.c (0.129u5) to allow for
reporting a ROM state of "correct" when a game/machine doesn't require any
ROM files at all (currently it will be reported as "not found", which is
wrong IMHO).
I know that this isn't really relevant for MAME, but it is for MESS -- so
I hope you'll accept the patch.
Thanks, Rene
--
Rene Reucher
rene.reucher@batcom-it.nethttp://www.batcom-it.net/
It is only people of small moral stature who have to stand on their dignity.
* corrupt files in archives now generate an error
* archive files ending in "/" will not be tested for crc - skip path entries
* add new flag FILE_OPEN_NO_PRELOAD to skip decompressing on open
This is used in audit.c, which only tests whether files exist
* added error checking to all calls to load_file_zipped
--------------------------------------------------
I see that eeprom_data is initialized with a memeset of 0xff so I don't think this change will break anything.
This patch will make happier the environments that do not know that
"still reachable" and "leaked" are not the same thing and that exit()
is a _very_ good deallocator.
assumption that all device tags are unique. Specifically, the
following no longer need to provide a device type:
AM_DEVREAD/WRITE
DEVCB_DEVICE_HANDLER
devtag_get_device
devtag_reset
device_list_find_by_tag
as well as several device interfaces that referenced other devices.
Also fixed assertion due to overflow in the recent sound fix.
- qix
- mcr/williams
- coinmstr
- funworld
- goldnpkr
- jokrwild
- nyny
- r2dtank
- spiders
- tugboat
Added new function memory_install_read_port_handler() to more
easily allow you to install read handlers for ports based on tag.
Removed input_port_read_handler8/16/32/64 functions, since they
were really only used for getting a memory handler for a port by
tag, and this is no longer necessary.
Moved input port handlers to internal code in the memory system.
Added port names to the taito8741 device pending its proper
devicification.
Removed all remaining uses of input_port_n_r() functions, and
purged them from src/emu/machine/generic.
compilation:
- new option CPP_COMPILE to trigger this (off by default)
- split CFLAGS into common, C-only, and C++-only flags
- when enabled, CPP_COMPILE causes 'pp' to be appended to
the target name
NOTE THAT THE SYSTEM CANNOT ACTUALLY BE COMPILED THIS WAY
YET. IT IS JUST AN EXPERIMENT.
Modified lib.mak to always build zlib/expat as C regardless
of CPP_COMPILE.
Modified windows.mak to fix warnings with MAXOPT=1, and to
leverage the new CFLAGs definitions.
Modified vconv.c to do appropriate conversions for new C++
options.
Updated sources so that libutil, libocore (Windows), and
libosd (Windows) can be cleanly compiled as C or C++. This
was mostly adding some casts against void *.
Fixed a few more general obvious problems at random
locations in the source:
- device->class is now device->devclass
- TYPES_COMPATIBLE uses typeid() when compiled for C++
- some functions with reserved names ('xor' in particular)
were renamed
- nested enums and structs were pulled out into separate
definitions (under C++ these would need to be scoped to
be referenced)
- TOKEN_VALUE cannot use .field=x initialization in C++ :(
- Added a VERY preliminary simulation of the protection, just enough to get the game to boot, not make it playable
- Corrected CPU communication, IRQ/NMI generation etc.
- Fixed some video emulation issues (added tilemap scroll etc.)
- Corrected GFX rom loading (at least for the graphics used in attract mode)
Sent: Wednesday, February 25, 2009 5:20 AM
To: submit@mamedev.org
Subject: CIA update
Hello,
this patch adds support for the /PC output pin to the CIA emulation.
From the datasheet "/PC will go low for one cycle following a read or write of PORT B.".
This is needed for centronics printer emulation on the MESS side, but I imagine it would
simplify/correct the emulation in some MAME amiga drivers as well (mquake.c for example).
--Dirk
Sent: Monday, February 16, 2009 7:10 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] Add some missing static qualifiers
Hi mamedev,
This patch mostly adds missing static qualifiers, plus a few related header/name adjustments. In particular, I tackled m68kmake.c and tmsmake.c which exposed a fair amount of dead code.
~aa
Sent: Monday, February 16, 2009 1:03 PM
To: submit@mamedev.org
Subject: Speed up 'src\mame\video\mcatadv.c'
Hi,
here is a patch against 'src\mame\video\mcatadv.c'
This patch moves a call to 'memory_region' outside of a hot loop in the 'draw_sprites' function.
This gives a fiew pourcents speed up in games such as 'nost'.
Hope this helps,
Best regards,
Christophe Jaillet
--
From: Christophe Jaillet [christophe.jaillet@wanadoo.fr]
Sent: Monday, February 16, 2009 1:53 PM
To: submit@mamedev.org
Subject: Another speed up in 'src\mame\video\mcatadv.c'
Hi,
here is a patch against 'src\mame\video\mcatadv.c'
This patch , by re-arranging the code, give a +/- 5% speed up in the emulation.
Before, we :
- fetch a pixel,
- make some computation for lower/higher part of it
- check if we should render it
- test for priority
- update destination if necessary
With this patch, we check priority first in order to avoid useless processing and testing on pixel that can't be displayed due to priority reason. So in the best case, it is faster, in the worse case execution time should be more or less the same because :
if ((drawxpos >= cliprect->min_x) && (drawxpos <= cliprect->max_x) &&
pix)
is likely to be true (IMO). So the same tests are performed, only the order is different.
Hope this helps,
Best regards,
Christophe Jaillet
--
From: Christophe Jaillet [christophe.jaillet@wanadoo.fr]
Sent: Monday, February 16, 2009 1:09 PM
To: submit@mamedev.org
Subject: Clean up of 'src\emu\tilemap.c' (with the patch...)
Hi,
here is a patch against 'src\emu\tilemap.c'
This patch removes a variable called 'original_cliprect' from the top of 'tilemap_get_tile_flags'.
This variable is useless because all cases that need it, already make the same copy in a variable with the same name, shodawing the former one.
Hope this helps,
Best regards,
Christophe Jaillet
to names that capture the device type as well. Added validity
checks for the short-term to prevent the continuance of this
pattern (which I started :)
Changes:
CPU/"main" -> "maincpu"
CPU/"audio" -> "audiocpu"
CPU/"sound" -> "soundcpu"
SCREEN/main -> "screen" (since it's the only one)
Eventually, devices will be required to have unique tags within
a machine, regardless of type.
This was primarily added to allow for sound routes to be supported in a way that
is compatible with the current driver structure. A device can now define a
DEVICE_CUSTOM_CONFIG callback which is called whenever one of the
MCONFIG_TOKEN_DEVICE_CONFIG_CUSTOM_* tokens is encountered. A special token
MCONFIG_TOKEN_DEVICE_CONFIG_CUSTOM_FREE is defined to clean up memory allocated
and/or reset the custom configuration, and is called when the device is torn down
to allow for memory cleanup.
Reimplemented the sound routing using this new mechanism.
Please note: regression testing is in progress, but the first round
of glaring regressions have already been taken care of. That said,
there is likely to be a host of regressions as a result of this
change.
Also note: There are still a few rough edges in the interfaces. I
will try to clean them up systematically once the basic system is
working.
All sound chips are now proper devices.
Merged the sound chip interface into the device interface,
removing any differences (such as the whole ALIASing concept).
Modified every sound chip in the following ways:
* updated to match the device interface
* reduced read/write handlers down to the minimal number
* added the use of get_safe_token() for ensuring correctness
* other minor cleanup
Removed the custom sound device. The additional work to just make
custom sound cases into full devices is minimal, so I just converted
them all over to be actual devices.
Vastly simplified the sound interfaces, removing the ghastly
sndti_* business and moving everyone over to using tags for
sound identity. sndintrf, like cpuintrf, is now just a header
file with no implementation.
Modified each and every driver that references a sound chip:
* all memory maps explicitly reference the targeted device via
AM_DEVREAD/AM_DEVWRITE/AM_DEVREADWRITE
* 16-bit and 32-bit accesses to 8-bit chips no longer use
trampoline functions but instead use the 8-bit AM_DEVREAD/WRITE
macros
* all references to sound chips are now done via tags
* note that these changes are brute force, not optimal; in many
cases drivers should grab pointers to devices in MACHINE_START
and stash them away