Commit Graph

7831 Commits

Author SHA1 Message Date
Aaron Giles
e738b79785 Correct a long-standing design flaw: device configuration state
is now separate from runtime device state. I have larger plans
for devices, so there is some temporary scaffolding to hold
everything together, but this first step does separate things
out.

There is a new class 'running_device' which represents the
state of a live device. A list of these running_devices sits
in machine->devicelist and is created when a running_machine
is instantiated.

To access the configuration state, use device->baseconfig()
which returns a reference to the configuration.

The list of running_devices in machine->devicelist has a 1:1
correspondance with the list of device configurations in
machine->config->devicelist, and most navigation options work
equally on either (scanning by class, type, etc.)

For the most part, drivers will now deal with running_device
objects instead of const device_config objects. In fact, in
order to do this patch, I did the following global search &
replace:

  const device_config -> running_device
  device->static_config -> device->baseconfig().static_config
  device->inline_config -> device->baseconfig().inline_config

and then fixed up the compiler errors that fell out.

Some specifics:

  Removed device_get_info_* functions and replaced them with
  methods called get_config_*.
  
  Added methods for get_runtime_* to access runtime state from
  the running_device.
  
  DEVICE_GET_INFO callbacks are only passed a device_config *.
  This means they have no access to the token or runtime state
  at all. For most cases this is fine.
  
  Added new DEVICE_GET_RUNTIME_INFO callback that is passed
  the running_device for accessing data that is live at runtime.
  In the future this will go away to make room for a cleaner
  mechanism.
  
  Cleaned up the handoff of memory regions from the memory
  subsystem to the devices.
2010-01-18 09:34:43 +00:00
Andrew Gardner
3f87f47a2e hng64 : Implemented low-res texture decoding. All red/green polygons should now be textured. [Andrew Gardner]
(It looks like my half-res UVs are a pixel or two off and the palette's wrong for most of these objects.
 There must be a bit somewhere that says what size of the polygon's palette.
 I believe the reason roadedge still has the wrong colors is due to not having found this bit yet.)
2010-01-18 03:58:27 +00:00
Paul Priest
d526ebe24f psikyosh - virtually completed video rendering. Only flipscreen missing (and conversion to tilemaps one day).
Per-line effects now respect per-line alpha, priority and bank. As a result daraku text works without any hacks.
Added various optimisations to get back all games to a playable speed.
Fixed missing soldivid effect on final boss that was broken due to above daraku hack. [PsikyoFan]
2010-01-18 00:41:23 +00:00
Phil Bennett
1227bbfd0c Converted the following drivers to use a driver_data structure: [Atari Ace]
bigstrkb, mugsmash, pass, sbugger, sderby, shadfrce, shootout,
silkroad, spbactn, sslam, stlforce, taitojc, tunhunt,
welltris, wwfsstar, xyonix


---------- Forwarded message ----------
From: Atari Ace <atari_ace@verizon.net>
Date: Fri, Jan 15, 2010 at 4:21 PM
Subject: [patch] [resubmit] More driver_data conversions
To: submit@mamedev.org
Cc: atariace@hotmail.com


Another driver_data patch, this one converting the following drivers
(same as last submission, minus taitoair):

bigstrkb, mugsmash, pass, sbugger, sderby, shadfrce, shootout,
silkroad, spbactn, sslam, stlforce, taitojc, tunhunt,
welltris, wwfsstar, xyonix

~aa
2010-01-17 21:56:15 +00:00
Phil Bennett
637ec4ede0 Improved vsnet sprite/roz alignment [David Haywood] 2010-01-17 20:50:59 +00:00
Couriersud
b423367224 Allow that zlib and expat can be linked dynamically without changing the makefile by specifying "=0":
make BUILD_ZLIB=0 BUILD_EXPAT=0

This was possible before as well but this is more what users (and myself) would expect.
2010-01-17 20:36:46 +00:00
Couriersud
ecec9ae9b1 Added checkautodetect target to makefile delivering e.g. on linux 64 bit:
TARGETOS=unix
PTR64=1
BIGENDIAN=
UNAME=Linux core 2.6.28-17-generic #58-Ubuntu SMP Tue Dec 1 21:27:25 UTC 2009 x86_64 GNU/Linux
2010-01-17 20:26:49 +00:00
Couriersud
9f669d0121 lib/util now includes stdlib.h where needed 2010-01-17 20:15:47 +00:00
Couriersud
5eebfe6ba6 Fix a bug preventing SUBTARGET=tiny compiles 2010-01-17 20:11:00 +00:00
Angelo Salese
ffe2371176 03671: fcrash: Bad sound ingame [Mamesick] 2010-01-17 19:37:34 +00:00
Couriersud
269e2cf4fc Removed stdlib.h from osdcomm.h.
- Added #include stdlib.h where now necessary
Fixed Solaris build
Fixed building unidasm for OSD=sdl on win32
2010-01-17 19:27:03 +00:00
Couriersud
89d20f9866 Undef two defines from Solaris stdlib.h which collide with mame. 2010-01-17 19:21:04 +00:00
Couriersud
91c5f19bf3 All files modified here solely depend on osdcore.h. Therefore changed all malloc/free to osd_malloc and osd_free. 2010-01-17 19:19:48 +00:00
Couriersud
865ef1e9fc Tools now include stdlib.h where needed 2010-01-17 19:14:55 +00:00
Angelo Salese
6cc32bbc68 Improved sprite zooming 2010-01-17 18:58:54 +00:00
Angelo Salese
4230eb97cd Implemented preliminary zooming 2010-01-17 17:46:14 +00:00
Phil Bennett
51f56f0eb6 Missed a file 2010-01-17 16:49:39 +00:00
Phil Bennett
2860295205 New games added or promoted from NOT_WORKING
--------------------------------------------
F-15 Strike Eagle (2 sets) [Phil Bennett]
Battle of the Solar System (rev. 1.1) [Phil Bennett]
Tank Battle (prototype rev. 4/21/92) [Phil Bennett]


Added Am29000 CPU core [Phil Bennett]
2010-01-17 16:21:57 +00:00
Aaron Giles
4ec052a035 device_find_child_by_tag() -> device->subdevice() 2010-01-17 15:50:08 +00:00
Paul Priest
de7db8ada6 MT03663: Missing background-clear ('pre') line-fill on tgm2/tgm2p warning screen due to incorrectly testing the alpha/blend field. I'm fairly convinced this isn't utilised in this context, although every other game sets it to 0x80 or 0x7F. 2010-01-17 11:49:33 +00:00
Fabio Priuli
0749920dac Fixed ldplayer compilation (MT03664) 2010-01-17 10:25:43 +00:00
Aaron Giles
d061ced592 Created new template class tagged_list which manages a simple list
along with a tagmap. Changed memory regions, input ports, and devices
to use this class. For devices, converted typenext and classnext
fields into methods which dynamically search for the next item.
Changed a number of macros to use the features of the class, removing
the need for a bunch of helper functions.
2010-01-17 09:26:29 +00:00
R. Belmont
14e2b9acf3 Changed DSP56k macros to avoid collision with OS X 10.6+ system headers 2010-01-17 02:58:59 +00:00
Roberto Fresca
51d5cf69e3 Properties were screwed-up... 2010-01-17 02:13:35 +00:00
Roberto Fresca
4a6e0d1c3c Improvements to subsino.c
(general):

 - Lowered CPU clock to 1.5 MHz.
 - Reworked former inputs.
 - Added specific game and technical notes.
 - Added lamps support.
 - Cleaned-up a bit the driver.

 Victor 5:

 - Mapped the M6295 but commented out due to missing sample roms.
 - Added keyin, keyout, payout, stats and settings inputs.
 - Added coin/keyin/keyout counters.
 - Limited the bet and coin pulses to avoid repeats and coin jams.
 - Added complete coinage and keyin DIP switches.
 - Added main game and double-up rates DIP switches.
 - Added minimum bet DIP switches.
 - Added maximum bet DIP switches.
 - Added attract music DIP switch.
 - Added button-lamps layout.

 Victor 21:

 - Mapped the M6295 but commented out due to missing sample roms.
 - Added bet x10, keyin, keyout, stats and settings inputs.
 - Added coin/keyin/keyout/payout counters.
 - Limited the bet and coin pulses to avoid repeats and coin jams.
 - Added complete coinage and keyin DIP switches.
 - Added main game rate DIP switches.
 - Added minimum bet DIP switches.
 - Added attract music DIP switch.
 - Added button-lamps layout.

 Poker Carnival (crsbingo):

 - Added change card, keyin, keyout, stats and settings inputs.
 - Added coin/keyin/keyout/payout counters.
 - Limited the bet and coin pulses to avoid repeats and coin jams.
 - Added complete coinage and keyin DIP switches.
 - Added double-up rate DIP switches.
 - Added minimum bet DIP switches.
 - Added maximum bet DIP switches.
 - Added cards graphics DIP switches.
 - Added double-up type DIP switches.
 - Added button-lamps layout.

 Super Rider, Super Moto:

 - Added stats and settings inputs.
 - Added coin counters.
 - Added main game and double-up rates DIP switches.
 - Added double-up and control type DIP switches.
 - Added coinage and demo sounds DIP switches.
 - Added button-lamps layout.

 Shark Party:

 - Added stats and settings inputs.
 - Added coin counters.
 - Added main game and double-up rates DIP switches.
 - Added double-up, coinage and demo sounds DIP switches.
 - Added button-lamps layout.
2010-01-17 02:03:49 +00:00
Couriersud
c5854615f6 Missed one :-( 2010-01-17 00:56:04 +00:00
Couriersud
a4e663bdc4 Solaris already hijacks quad and _quad in types.h 2010-01-17 00:21:05 +00:00
Couriersud
b347a5135a Minor cosmetic changes:
- order of includes
- remove duplicate code
2010-01-16 22:21:11 +00:00
Couriersud
f702582726 Added GTL_INSTLL_ROOT to optionally build win32 with the mame debugger. 2010-01-16 22:18:47 +00:00
Aaron Giles
0c191eac42 Compile fix for MSVC psikyosh (dynamic array sizes are a later
extension).

Improved stack walking on crash in Windows. Now using StackWalk64 to
do the stack walk, resulting in cleaner logs. Also will try to use
system function to look up symbol and source/line information if
present. End results:

- 32-bit gcc: parses symbol info from map file as before (this would
work better if we could coax gcc into outputting static functions in
the map)

- 64-bit gcc: has runtime issue that causes the exception handler to
not be invoked. Will work with mingw folks on it.

- 32/64-bit MSVC: nice stack dumps with symbol and source/line info,
if the PDB file is present. If not, falls back to the MAP file.
2010-01-16 21:14:23 +00:00
Couriersud
ec71e879db It worked on OSX, broke on windows ... 2010-01-16 19:45:53 +00:00
Couriersud
ab8ac327eb sdl.mak rewrite
- TARGETOS=freebsd may now be given on make invocation
- modular approach, separate sections for opengl, x11, debugger
- most target specific settings parametrized.
2010-01-16 19:34:04 +00:00
Angelo Salese
b21cdf8e5a Implemented flip x and negative y offsets 2010-01-16 19:04:56 +00:00
R. Belmont
6ec1f9c3a4 Missed another one (no whatsnew) 2010-01-16 18:58:37 +00:00
R. Belmont
c1acc8696e One more PPC GCC fix that I missed committing. (no whatsnew) 2010-01-16 18:54:33 +00:00
Angelo Salese
6cfacff97b Some minor improvements 2010-01-16 18:35:35 +00:00
Angelo Salese
a7ede53591 Fixed sprite height 2010-01-16 17:03:47 +00:00
Paul Priest
e6c8cc813d More likely implementation for line zoom in psikyosh. No whatsnew. 2010-01-16 16:36:56 +00:00
Paul Priest
5ba7e63961 Add support for per-scanline scroll/zoom and per-column effects. This is adds a significant performance penalty when enabled. Removed warning flag from s1945ii and s1945iii. s1945iii needs confirmation of correctness and x-zoom is a guess. [PsikyoFan]
This can be seen on:
* s1945ii level 7 intro, level 8 boss. (Hold PL1 Button 1 which hitting F2 for stage select).
* s1945iii level 7 intro, level 7 main, level 8 intro, level 8 boss (Enter "8-1-6-5-0" as code in test mode for stage select).

Note that this is slow. Suggestions for speeding it up are welcome.
Rendering each tilemap to an ARGB bitmap, including applying the per-pen or fixed alpha.
Extracting an entire scanline from the bitmap, transforming it and then blending the ARGB scanline.
Obvious optimisations for transparency and fixed alpha in place.

Alternative is to just try and draw with drawgfx directly and fiddle with cliprects, but zooming makes that impossible to get nice without fudging the scaling/positioning slightly and unlikely to be faster.

Hack for daraku is still there, working to get rid of it. Aside from above and MT03663 games are now believed to be pixel-perfect.
2010-01-16 16:18:33 +00:00
Angelo Salese
84b096a805 Redumped sound roms in Cyber Tank [Antonio Gonzalez Jr., Dumping Union] 2010-01-16 16:14:28 +00:00
Scott Stone
d827ebbfe0 crimfght.c - Correct Manufacturer Copy/Paste error (no whatsnew needed) 2010-01-16 16:08:26 +00:00
R. Belmont
cfa1a02096 Add SDLMAME keymaps (no whatsnew) 2010-01-16 14:40:50 +00:00
Couriersud
feb8630108 Autotest for BIGENDIAN. A bit hacked, though. 2010-01-16 13:02:03 +00:00
Aaron Giles
98c015372e Fix memory allocation issue in debug builds. 2010-01-16 11:57:58 +00:00
Phil Bennett
df5863a2d6 Replaced vsnetscr GFX ROMs with correct dumps [Team Japump, Dumping Union] 2010-01-16 11:34:22 +00:00
Phil Bennett
5758be57e9 New games marked as GAME_NOT_WORKING
------------------------------------
King Tut (Australia) [David Haywood]
Money Bank (Australia) [David Haywood]
2010-01-16 11:30:32 +00:00
Aaron Giles
1c38c3eb87 Fix SDL Win32 build to build as unicode. 2010-01-16 05:55:15 +00:00
R. Belmont
c6d4f5faa8 YM2612: More accurate LFO implementation and channel clipping [Eke-Eke, Nemesis, R. Belmont] 2010-01-16 05:01:55 +00:00
Aaron Giles
f373246c42 Fix PTR64 autodetect for Windows 2010-01-16 04:40:55 +00:00
Aaron Giles
aebc07a897 Cleanups and version bump. 2010-01-16 04:12:04 +00:00