Commit Graph

63 Commits

Author SHA1 Message Date
Aaron Giles
ee0a5642ab Added running_machine * parameter to the front of all read/write handlers.
Updated all call-through handlers appropriately. Renamed read8_handler to
read8_machine_func, replicating this pattern throughout. 

Defined new set of memory handler functions which are similar but which
pass a const device_config * in place of the running_machine *. These are
called read8_device_func, etc. Added macros READ8_DEVICE_HANDLER() for
specifying functions of this type. Note that some plumbing still needs to
happen in memory.c before this will work.

This check-in should remove the need for the global Machine and in turn
"deprecat.h" for a lot of drivers, but that work has not been done. On
the flip side, some new accesses to the global Machine were added in the
emu/ files. These should be addressed over time, but are smaller in
number than the references in the driver.
2008-03-05 07:45:34 +00:00
Couriersud
492612b6c9 Various clean ups:
* remove more unreachable code
* identify more functions not being used
* Changed a number of global functions to being static
2008-03-01 16:54:52 +00:00
Aaron Giles
109bb332f0 The term "driver" is way overloaded in the system.
machine->drv is now machine->config.
Sorry.
2008-02-18 06:08:39 +00:00
Aaron Giles
abdb58671b Split timer_adjust() into timer_adjust_oneshot() and timer_adjust_periodic().
Updated all call sites.
Fixed recent build breaks.
2008-02-06 15:33:04 +00:00
Aaron Giles
444d77b838 From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] Fix C4305 warnings, other MSVC tweaks

Hi mamedev,

This patch is a bit of a potpourri.  It is the result of enabling most
of the suppressed warnings when using MSVC compilers and seeing what
issues arose with different compilers (I used 70,71,80,90).  Two of
the warnings were judged to be useful to enable and methodically fix.
Some issues spotted by the other warnings were also fixed.

1. Fixed issues flagged by MSVC warning C4305 (type truncation).
Almost all of these are harmless double->float narrowing in
initializers, but one warning spotlighted a bug in segasyse.c, where
code to use a higher sprite number had no effect due to the
insufficient range of UINT8.
2. Removed /wd4550 for VS7/VS71 compilers (expression evaluates to a
function which is missing an argument list).  There are no cases of
this warning currently, and if there were they would most certainly be
bugs.  This also allowed the warning suppression lists to be remerged
for VS7 and VS2005.
3. Decoupled intrinsic support decisions from PTR64 in eivc.h.
4. Fixed some VS7-specific issues (OPTIMIZE=0 at least compiles now).
That compiler doesn't support "long long" or "ll" (rsp.c/dkong.c).
5. Added a missing case statement in sm8500d.c.  Noticed while
reviewing dead code warnings.
6. Replaced a number of static constants with an enum in sidenvel.h.
This is unrelated to the rest of this patch, but it was overdue to be
done.
2008-01-24 14:24:59 +00:00
Zsolt Vasvari
f7c5c67e2e First in a series of updates to remove the use of the global Machine from as many places as possible 2008-01-24 09:12:03 +00:00
Aaron Giles
806a3de01c Made detection of dynamic attempts to install ROM/RAM handlers more aggressive.
Previous checks would not catch modifications in DRIVER_INIT or MACHINE_START calls.
Also changed one of the cheat calls back to using more generic switch detection so they can be triggered via joysticks.
2008-01-18 19:34:54 +00:00
Aaron Giles
a62870621a It's the end of uitext.c as we know it (and I feel fine) 2008-01-12 03:32:30 +00:00
Aaron Giles
ee9f88963c Copyright cleanup:
- removed years from copyright notices
 - removed redundant (c) from copyright notices
 - updated "the MAME Team" to be "Nicola Salmoria and the MAME Team"
2008-01-06 00:47:40 +00:00
Aaron Giles
ba9782dcec Added new function input_poll_keyboard_switches to poll for only key events.
Expanded the size of the maximum simultaneously pressed switches.
Should fix editableui0120u4red and cheat0118red.
2008-01-04 17:51:33 +00:00
Aaron Giles
507ca2d275 Changes for MAME 0.121u4. 2007-12-17 16:41:39 +00:00
Aaron Giles
c82a966b3b Changes for MAME 0.121u2. 2007-12-17 16:37:57 +00:00
Aaron Giles
7b77f12186 Initial checkin of MAME 0.121. 2007-12-17 15:19:59 +00:00