Commit Graph

886 Commits

Author SHA1 Message Date
Aaron Giles
ddfc0c3259 WIP check-in. Things work now, but I'm still working on the code.
Converted address maps to tokens. Changed the address_map structure
to house global map-wide information and hung a list of entries off
of it corresponding to each address range. Introduced new functions
address_map_alloc() and address_map_free() to build/destroy these
structures. Updated all code as necessary.

Fixed several instances of porttagtohandler*() in the address maps.
Drivers should use AM_READ_PORT() macros instead.

ADDRESS_MAP_EXTERN() now is required to specify the number of 
databits, just like ADDRESS_MAP_START.

Removed ADDRESS_MAP_FLAGS() grossness. There are now three new macros
which replace its former usage. ADDRESS_MAP_GLOBAL_MASK(mask)
specifies a global address-space-wide mask on all addresses. Useful
for cases where one or more address lines simply are not used at
all. And ADDRESS_MAP_UNMAP_LOW/HIGH specifies the behavior of
unmapped reads (do they come back as 0 or ~0).

Changed internal memory mapping behavior to keep only a single
address map and store the byte-adjusted values next in the address
map entries rather than maintaining two separate maps. Many other
small internal changes/cleanups.
2008-03-09 21:59:57 +00:00
Zsolt Vasvari
ac9778cdb0 Changes first argument of video_screen_* functions to take a device_config
All callers that used 0 for the screen number now use machine->primary_screen
As a gap meassure, Where necessary, create a parallel set of video_screen_*_scrnum functions that take scrnum
All callers that specified a specific screen number now call the *_scrnum versions
Changed game info screen and overlay UI to display the screen tag instead of screen number
2008-03-09 15:41:17 +00:00
Brian Troha
681b413bce arranges Greyhound Trivia sets based one known question series. 2008-03-08 22:12:06 +00:00
Zsolt Vasvari
48f7d189e6 Changes VIDEO_UPDATE signature to
typedef UINT32 (*video_update_func)(const device_config *screen, int scrnum, bitmap_t *bitmap, const rectangle *cliprect);

Adds const device_config *primary_screen to running_machine (not yet used)
2008-03-08 15:57:43 +00:00
Zsolt Vasvari
8f318637d9 This fixes the crash in Galaga caused by the slightly altered video timing 2008-03-08 02:39:39 +00:00
Couriersud
459baa66d2 Fix mantis bug ID 00898 (gseeker0101yel) 2008-03-07 20:48:37 +00:00
Pierpaolo Prazzoli
0d4d375938 Joker Poker, Super Bowl and Amuse are working.
Be aware that some set names are changed and for Amuse I don't know where the 2nd half of the banks is mapped.
2008-03-07 15:35:05 +00:00
Zsolt Vasvari
d0870c6936 Moves 'refresh' from public to internal video state and renames it to 'frame_period'
Changes all drivers that previously accessed 'refresh' to use video_screen_get_frame_period()
2008-03-07 14:34:04 +00:00
Zsolt Vasvari
d0f5196025 - the public screen_state is made to only contain items that are currently accessed by drivers
- populating screen_state is moved from mame.c to video.c
- defstate is gone -- the default screen parameters live in screen_config directly
2008-03-07 12:53:00 +00:00
Zsolt Vasvari
9ad9532722 Seperates out the notion of screen specific vs. "global" VBLANK callbacks
"Global" VBLANK callbacks, of course, make no conceptual sense -- it should probably fire every once in a while even if there is no screen
2008-03-07 08:18:28 +00:00
Zsolt Vasvari
5f53680e03 - Removes video_data from running_machine
- Private state screen information now hangs off the public one, instead of the other way around
- Combines video_global and video_private into a single structure
2008-03-07 07:19:38 +00:00
Aaron Giles
e803f5c1d4 Fixed a number of compile errors caused by previous MC6845
changes.
2008-03-07 06:31:05 +00:00
Zsolt Vasvari
6302df116d This changes the MC6845 to take and pass device_config's only
The following shook out from this that are applicable to other devices as well:

- running_machine is no longer taken, passed or stored
- mc6845_t is now private
- since passing device_config's is not device type safe, I added a
  get_safe_token() to mc6845.c to check the device passed in for the valid type.
  I think something like this should be added to the core.

- As a side note, I really don't think that device_config is a good name,
  naming it simply device_t or something like that might be better.
2008-03-07 02:45:35 +00:00
Tomasz Slanina
8b444900ca In-game music in Knuckle Joe/Bone Crusher - kncljoe0101u5gre (a couple of changes to sound hw emulation) 2008-03-07 01:56:51 +00:00
Zsolt Vasvari
8f43de6a46 Removed runnning_machine as the first parameter of a VBLANK callback
video.c: some Machine->machine changes
2008-03-07 00:08:19 +00:00
Tomasz Slanina
183f506a2f debug build - fixed compilation error and warning. 2008-03-06 23:23:57 +00:00
Aaron Giles
befcee37ad Changed device interfaces to pass the device_config * rather
than tokens and individual bits to the device callbacks. Updated
all existing devices accordingly.

Removed machine from the parameters of some of the device_get_info
and device_set_info calls because that information is stored
with the device now.
2008-03-06 15:28:00 +00:00
Zsolt Vasvari
9c172be162 vblank_state_changed_func now has a device_config argument 2008-03-06 14:22:08 +00:00
Zsolt Vasvari
553d92bcb5 Machine -> machine 2008-03-06 10:27:33 +00:00
Zsolt Vasvari
8bb64eb911 - Fixes flickering in Electric Yo-Yo. Case of missing video_screen_update_now() calls
- Uses the MC6845's VSYNC notifcation system to generate the main CPU's interrupts
2008-03-06 10:21:51 +00:00
Zsolt Vasvari
d9b90238c6 Removes no longer applicable comment 2008-03-06 08:25:22 +00:00
Aaron Giles
fb26ec7c01 Cleanups and version bump. 2008-03-06 07:31:20 +00:00
Aaron Giles
0046339284 Removed AM_SPACE and matchmask support. Updated relevant drivers
to use AM_MIRROR() and AM_MASK() to achieve the same thing.
2008-03-06 07:02:10 +00:00
Nicola Salmoria
3a22b93b59 Fix 8085 RST75 not working with PULSE_LINE
According to datasheet, RST7.5 is latched on rising edge, while the other maskable interrupts are sampled.
2008-03-06 06:51:05 +00:00
Zsolt Vasvari
c537f056f5 Mysterious Stones gets the "full treatment" 2008-03-06 03:45:15 +00:00
Couriersud
19331ed134 Remove (UINT32) type casts which break build with mingw - again 2008-03-05 22:49:38 +00:00
Couriersud
bcad1267f2 mario.c is "deprecat.h"-free now 2008-03-05 22:10:46 +00:00
Couriersud
3292183f4f * remove deprecat.h and Machine where it was possible 2008-03-05 22:02:25 +00:00
Couriersud
dbd1965d0e * pass running_machine parameter to construct_map_##_name, i.e. ADDRESS_MAP_START
* Change "Machine->" to "machine->" in AM_BASE_MEMBER, AM_SIZE_MEMBER
* Pass Machine in construct_address_map

This is not perfect yet, but there is no need any longer to include deprecat.h in drivers using AM_*_MEMBER.
2008-03-05 22:01:37 +00:00
Couriersud
4bdccc433f Fix crash in gaelco3d.c (radikalb) 2008-03-05 21:24:06 +00:00
Aaron Giles
5b6183f898 From: Oliver Stoneberg
Subject: missing display types in DTD

This patch adds the new display types to the listxml DTD.
2008-03-05 15:32:33 +00:00
Aaron Giles
84ece5c78e From: Corrado Tomaselli
Subject: Frequencies diff

Changed/verified clocks on the following pcbs: 1943, Arkanoid, Action 
Holliwood GalsPanic, Ben Bero Beh, 1000 Miglia, Pit and Run, Prehistoric 
Isle, Rastan, Hotmind, Hardtimes, Stagger1 and Tiger Road

Changed/verified Oki pin 7 on the following pcbs: 1000 miglia, 
Galspanic, Action Holliwood, Hotmind, HardTimes, World Rally, Stagger1
2008-03-05 15:31:22 +00:00
Aaron Giles
f0ad4d73fc From: James E.A. Wallace [mailto:jeaw100@york.ac.uk]
Subject: Deal'Em fixes

Just correcting a few input glitches I spotted, and allowed for the bank

to be read (needed for games >64K in 6809 ROM size)
2008-03-05 15:26:58 +00:00
Aaron Giles
c5a313d314 From: abcd efgh [mailto:cix_999@yahoo.it]
Subject: onetwo Dip fix

As I thought this game is a Shisen rip-off so  the dips are quite same, also added dips location.
Bye Sonikos
2008-03-05 15:26:24 +00:00
Aaron Giles
9ec4fbc1ce From: RansAckeR [mailto:RansAckeR@pandora.be]
Subject: atetris.c dips

atetris.c:
-Added proper dip switch implementation
-Added dip locations
-Simplified input port definitions

--

From: RansAckeR [mailto:RansAckeR@pandora.be] 
Subject: atarisy2.c dips

atarisy2.c:
-Simplified input definitions
-Added service switch
-Corrected some default dip values
-Added dip locations

--

From: RansAckeR
Subject: avalnche.c dips

avalnche.c:
-Improved dip switch definitions
-Simplified input definitions
-Added dip locations

--

From: RansAckeR
Subject: bagman.c dips

bagman.c:
-Added dip locations
-Simplified input definitions

--

From: RansAckeR
Subject: balsente.c dips/inputs

balsente.c:
-Simplified input definitions
-Added dip locations

--

From: RansAckeR [mailto:RansAckeR@pandora.be] 
Subject: lasso.c inputs/dips

lasso.c:
-Added dip locations
-Simplified input definitions
-Fixed bug 00817 (pinbo0122u7gra)
2008-03-05 15:25:03 +00:00
Aaron Giles
a083bd20a9 From: Mark Fugmann [mailto:sailorsat@t-online.de]
Subject: "fix" for the "game information" resolutions.

Hi.
In 0.123u3 the bug "multiscreeninfo0123u2gre" was fixed, however it changed
its behaviour as it now shows the "default" resolution the driver uses
rather than the resolution the screen(s) actually use at the moment.

As I don't know if this change was intentional I've attached a simple diff
that changes from defstate.visarea to the real visible visarea.

Greets,
Ariane "SailorSat" Fugmann
2008-03-05 15:14:58 +00:00
Aaron Giles
31bb5d3f3c Added new macros AM_DEVREAD, AM_DEVWRITE, and AM_DEVREADWRITE,
which specify device read/write handlers in address maps, along
with the type/tag of the device they reference.

Converted MC6845 read/write handlers to READ/WRITE8_DEVICE_HANDLERs.
Updated all MC6845-using drivers to use the new macros and call
the updated functions. Removed the many little helper functions
that used to do this work.

Added validity checks to ensure that the devices referenced
actually exist.
2008-03-05 15:12:58 +00:00
Zsolt Vasvari
856c0a06cf Fixes sprite colors in Exerion. Thanks, LN 2008-03-05 14:37:31 +00:00
Zsolt Vasvari
6d54ed169c - Merged memory maps
- Uses PORT_CHANGED for coins
- Renamed 'Inferno (S2650) to 'Inferno (Meadows)'
- Renamed 'Bowling 3D' to '3-D Bowling'
- Added NO_DUMP entries for Gypsy Juggler's ball graphics and added GAME_IMPERFECT_GRAPHICS flag
2008-03-05 08:00:31 +00:00
Aaron Giles
a724936cb3 Added running_machine * to the device_config, live while the device
is live, and NULL otherwise, just like the token.
2008-03-05 07:54:12 +00:00
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
Zsolt Vasvari
9f03451a61 Uses PORT_CHANGED for coins 2008-03-05 07:19:58 +00:00
Zsolt Vasvari
d41cb7ebce Untangles the Fire Truck driver -- what a nightmare...
Many uses of PORT_CUSTOM and PORT_CHANGED, including another good use case for the gear shift logic
2008-03-05 04:25:29 +00:00
Zsolt Vasvari
793cf2e715 VBLANK based watchdogs can be disabled once again
Removed debugging fprintf
2008-03-05 04:20:01 +00:00
Brian Troha
0eca6ca59c fixes capitol letter in rom name issue in last commit 2008-03-05 00:04:11 +00:00
Brian Troha
98a838fe06 adds info from recent Peekaboo submission
retains / adds a little info and better rom name for the MCU
2008-03-04 23:59:58 +00:00
Andrew Gardner
28c035cca5 Fixes memory map conversion typo for zodiack. 2008-03-04 16:20:41 +00:00
Zsolt Vasvari
f1e2ccd4f1 Better separation of driver and video code.
Gave Top Secret its own (1 line long) video update function.
2008-03-04 11:36:09 +00:00
Zsolt Vasvari
6ae0a85462 Exidy440 - modernized input port handling with CUSTOM_INPUT and INPUT_CHANGED
Cleaned-up (IMO) special case handling
2008-03-04 07:59:35 +00:00
Zsolt Vasvari
5b108ad039 Uses PORT_CHANGED
Removes PORT_IMPULSE from Star Hawk
2008-03-04 04:53:58 +00:00