Commit Graph

910 Commits

Author SHA1 Message Date
Zsolt Vasvari
4eecf5199d Removes "global" VBLANK callback hack 2008-03-12 11:06:29 +00:00
Zsolt Vasvari
19b68f421f Next batch of machine->screen[] removal 2008-03-12 10:47:20 +00:00
Zsolt Vasvari
7ec1537d22 - Fixed case when there is no interface given
- Changed C6545-1 description from "Commodore' to "MOS Technology"
2008-03-12 08:29:33 +00:00
Aaron Giles
d5561a8e75 Removed cpu_scalebyfcount().
Changed input ports to register a frame callback, which is
called immediately after throttling and updating. This is the
proper "sync point" between emulated time and real time. Moved
all analog and digital port processing into a central place
here. Added tracking of time since the previous frame update
and use that as an estimate for the time of the current frame.
This is used to scale analog ports without the use of
cpu_scalebyfcount(). This is not perfect in the case where
frame rates are dynamic (vector games), but works well for
other cases.

Further cleanup of memory header and code.
2008-03-12 05:13:03 +00:00
Nathan Woods
61b009597e Fixing MESS-specific category tokenization 2008-03-12 01:58:49 +00:00
Zsolt Vasvari
86b798b37a - More machine->screen removal
- Hooked up swapped videoram in Karnov properly -- same idea as Burger Time
2008-03-11 16:16:30 +00:00
Zsolt Vasvari
706d9f408f Restores the previous toggling behavior 2008-03-11 10:05:45 +00:00
Zsolt Vasvari
77a58d253c - First batch of machine->screen[] access has been removed
- Added video_screen_auto_bitmap_alloc(screen) -- it is just a shorthand for 
  auto_bitmap_alloc(video_screen_get_width(screen), video_screen_get_height(screen), video_screen_get_format(screen))
  which is a common operation
- The Dynax/Don Den Lover games now do their updating in VIDEO_UPDATE instead of VIDEO_EOF.  This semmed to
  have fixed the palette problems
- Went through some of these drivers and changed Machine to machine
2008-03-11 08:37:05 +00:00
Nicola Salmoria
bf88dd74e3 fix loading mixer settings when the driver default value is calculated. Cannot use == to compare float with the loaded value in this case. 2008-03-11 08:28:47 +00:00
R. Belmont
542b489706 [MultiPCM] Saturate on clip and fix envelope discontinuity. (ElSemi) 2008-03-11 02:54:27 +00:00
Zsolt Vasvari
5397db0615 Moves crosshair code from video.c into its own module
Simplifies crosshair logic and makes it screen device based
2008-03-11 02:41:24 +00:00
Zsolt Vasvari
2a8f0936fd Adds some new varieties: MC6845-1, H46505, HD6845 and SY6545-1 2008-03-11 01:34:44 +00:00
Aaron Giles
c4cfa7bde4 Compilation fixes for my last checkin (sorry). 2008-03-10 16:22:01 +00:00
Aaron Giles
8006568b87 More WIP cleanup of memory.*
Made address versus byte offsets explicit throughout.
Removed some unused parameters.
Consolidated initialization process.
Removed maximum memory block count.
Centralized bank management.
Added masked handlers and change_pc to the accessors.
Added memory_get_accessors() to return a pointer to the accessors
   for a given address space/databus width/endian configuration.

More to come.
2008-03-10 16:00:26 +00:00
Zsolt Vasvari
d146f7dabc Removes the scrnum parameter from VIDEO_UPDATE, updates all drivers to use the screen device instead.
render.c now uses screen devices
2008-03-10 14:30:21 +00:00
Nathan Woods
470e72b351 MESS-specific fix 2008-03-10 13:16:23 +00:00
Nathan Woods
43c2c2a002 Changed how the PowerPC MMU is enabled at compile time, to cut down on the
amount of unused functions in MAME.
2008-03-10 13:10:44 +00:00
Zsolt Vasvari
2a8c73cc45 All video_screen_*_scrnum functions have been removed. Next step is to remove the scrnum from VIDEO_UPDATE 2008-03-10 06:39:20 +00:00
Zsolt Vasvari
6e3be05912 Makes atarigen and tms34061 handle based 2008-03-10 05:12:49 +00:00
Aaron Giles
0862cce453 Replaced the following macros (SMH == static memory handler)
MRA*_BANK*/MRA*_BANK* -> SMH_BANK*
   MRA*_RAM/MRA*_ROM     -> SMH_RAM
   MRA*_ROM/MWA*_ROM     -> SMH_ROM
   MRA*_NOP/MWA*_NOP     -> SMH_NOP
   MRA*_UNMAP/MWA*_UNMAP -> SMH_UNMAP

This removes the silly need for a bunch of redundant constants
with faux type definitions that didn't buy anything.

Moved some memory system constants into memory.c.
2008-03-10 02:29:15 +00:00
Zsolt Vasvari
198f401cf5 Changes TMS34010 to take a screen tag instead of the screen number
Everything appears to work, except X The Ball, which sets horz the resolution twice as wide as it should -- no clue why
2008-03-10 02:16:06 +00:00
Zsolt Vasvari
9b3ac2606e Voodoo now takes a device_config for the screen
Added video_screen_get_visible_area()
2008-03-10 00:39:20 +00:00
Zsolt Vasvari
84a1d99c67 Added a bunch more asserts 2008-03-09 23:49:59 +00:00
Zsolt Vasvari
343bcb4cda Changes MC6845 to take a screen tag instead of a screen number 2008-03-09 23:01:34 +00:00
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