Commit Graph

1150 Commits

Author SHA1 Message Date
Aaron Giles
587c6c7176 01908: Various: Access Violation when saving a snapshot 2008-06-20 14:42:34 +00:00
Aaron Giles
b9415c289f Fixes for MSVC compile. 2008-06-20 14:35:07 +00:00
R. Belmont
85d9163a63 MultiPCM/315-5560 rewrite by ElSemi. All features are now supported including PLFO and ALFO. 2008-06-19 16:21:46 +00:00
R. Belmont
61bd2a49a1 Added assert as suggested by Olivier. 2008-06-19 01:17:20 +00:00
R. Belmont
ce942e905f Fix for GCC 4.3. Tested with kinst, blitz, carnevil, and cryptklr. 2008-06-18 16:55:33 +00:00
Aaron Giles
b724c35c1f Fixed input port read validation. The previous check was way too aggressive,
and prevented CUSTOM_INPUT handlers from reading other ports. This one sets
an "all clear" flag as soon as the configuration data is loaded.
2008-06-18 02:10:53 +00:00
Aaron Giles
2d035a1c6a Cleanups and version bump. 2008-06-17 15:19:10 +00:00
Aaron Giles
86e20b9b98 From: Oliver Stoeneberg [mailto:oliverst@online.de]
Subject: more Machine -> machine cleanups

This is mostly a cleanup of src/drivers/* and src/machine/*
2008-06-17 09:44:03 +00:00
Aaron Giles
8628f1dafe UML:
- reactivated back-end validation mechanism
 - added back-end validation for ADD/SUB/MUL/DIV/CMP forms
 - fixed several errors in dealing with more obscure flag combinations
2008-06-17 09:19:07 +00:00
Wilbert Pol
01756b3bcb Renamed "Nintendo z80gb" cpu core to "Sharp LR35902". 2008-06-16 18:22:10 +00:00
Aaron Giles
a7be43dc68 Added new function video_get_view_for_target() which selects a view based
on a command-line parameter and the configuration. Changed Windows OSD
code to use this instead of its own logic. Changed -snapview to share the
logic as well, enabling 'auto' as a -snapview option.
2008-06-16 17:05:44 +00:00
Aaron Giles
69ba0bd294 Cleaned up software bilinear filtering code. Added bounds checking.
Enabled by default for snapshots and movie rendering.

Added new option: -snapsize, which lets you specify the target
resolution for snapshots and movies. The existing behavior is still
the default: create snapshots and movies at native pixel 
resolutions.

Added new option: -snapview, which lets you specify a particular
view to use for rendering snapshots and movies. The existing 
behavior is still the default: use a special internal view and 
render each screen to its own snapshot in its own file. When using 
this option to specify a view other than 'internal', only a single 
snapshot file will be produced regardless of how many screens the 
game has.

Improved AVI and MNG recording to properly duplicate/skip frames
as appropriate to keep the correct framerate.
2008-06-16 16:34:51 +00:00
Curt Coder
a93fb6b1bf Added a validity check against reading input ports at init time. 2008-06-16 15:05:06 +00:00
Curt Coder
6950cd07a7 COP4xx:
- fixed typo in disassembler
2008-06-16 15:00:20 +00:00
Aaron Giles
5deab27d6d Created common virtual TLB managment module.
Updated MIPS and PowerPC code to make use of it.
2008-06-16 03:12:49 +00:00
Nathan Woods
01a8513bcc Removed some MESS-y code 2008-06-13 10:48:15 +00:00
Aaron Giles
2e8eddb648 MIPS3 recompiler:
* added UML comments for common state variables
 * removed some unused fields
 * implemented LL/LLD/SC/SCD (only works single-processor for now)
2008-06-13 07:29:28 +00:00
Aaron Giles
4bc9630265 Turned off logging on the mips core. 2008-06-13 06:43:21 +00:00
Nathan Woods
1c989c1f59 Typo fix 2008-06-13 00:18:48 +00:00
Aaron Giles
5a162da3d4 Cleanups and version bump. 2008-06-12 19:59:19 +00:00
Aaron Giles
1855238186 Undo change 1933 temporarily ... not quite ready to unleash this on the world
with no substantial dev exposure.
2008-06-12 19:51:49 +00:00
Curt Coder
aa15601968 Added a validity check against reading input ports at init time. 2008-06-12 19:34:37 +00:00
Aaron Giles
a701f8537e Added bilinear filter option to software rendering. Not hooked up to anything yet. 2008-06-12 19:14:18 +00:00
Curt Coder
f8912e4a2d COP4xx:
- Added COP421 variant

Thayer's Quest:
- Fixed SSI-263 timings, service mode works now
- Changed to use COP421
2008-06-12 17:20:08 +00:00
Aaron Giles
c10b238896 Added option -[no]coin_lockout (-[no]coinlock) to control coin lockout behavior. 2008-06-12 17:06:49 +00:00
Aaron Giles
9b80898ee0 From Shimapong
MAMETesters Bugs Fixed
----------------------
00277: [Misc.] groundfx.c, gunbustr.c, superchs.c, taito_f3.c,
       undrfire.c, psikyosh.c: Cheat search causes fatal error

Source Changes
--------------
Updated cheat system
 - Changed the function of default memory read in case of the search
   to prevent from crashing if a game uses cpu_spinutil()
   Now basically used do_memory_read() instead of do_cpu_read()
   (Try to search in actfancr between this and previous version)
   NOTE : It's not fundamental solution but no longer crash
 - Cleaned up read_data() and write_data()
 - Cleaned up save/load routine and added open_cheat_database()
 - Added new menu "Cheat Commands" into the cheat main menu
     the following commands are supported in this menu
      * reload cheat code (the same as Reload Database key)
      * cheats ON/OFF (the same as Toggle Cheat key)
      * watchpoints ON/OFF (the same as Shift + Toggle Cheat key)
      * save description (save the title of the game)
      * save raw code (save raw cheat code with new format)
 - Fixed several bugs which has found in testing
 - Renamed functions based on coding guidlines
2008-06-12 16:46:29 +00:00
Aaron Giles
b171ca8111 From: Micko [mailto:mmicko@gmail.com]
Subject: 8080/8085 fix

Hello Aaron,
 
While working on drivers for some 8080 machines, I have noticed that there are some errors in flags settings in CPU implementation.
I have done fixes and now sending patch for code . Also there are changes to set right timings for both 8080 and 8085 since not all timings are up to documentation.
 
Regards,
Miodrag
2008-06-12 16:34:47 +00:00
Aaron Giles
50bbb369bb From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] Static qualifiers, header file cleanups, and new
include files for MAME

The first patch adds static qualifiers where appropriate, adds missing
#include statements, source comments and header declarations, as well
as removes dead declarations.  The only part that required judgement
was deciding whether audio/galaxian.c declarations should be in
galaxold.h or galaxian.h, it doesn't make sense for them to be
declared in both.  This exercise did find a bug, galaxold_init_stars
was declared incorrectly in video/fastfred.c.
2008-06-12 16:25:34 +00:00
Aaron Giles
13a86d728f From: Oliver Stoeneberg [mailto:oliverst@online.de]
Sent: Thursday, June 05, 2008 9:00 PM
To: submit@mamedev.org
Subject: Machine -> machine cleanups

This cleans up the usage of Machine in many of the src/video files.
2008-06-12 16:19:45 +00:00
Aaron Giles
e852db663a x86/x64 back-ends:
* fixed adc/sbb so that they don't optimize out ever
 * fixed detection of special and/or/xor cases
 * fixed GETFLGS opcode so that it doesn't return anything other than requested flags
 * changed LZCNT/BSWAP to be more flexible in register selection

C back-end:
 * implemented flag variants of SEXT/ROLAND/ROLINS/LZCNT/BSWAP

PPC DRC:
 * added more symbols for debugging
 * fixed lmw/stmw if rA is one of the loaded/stored registers
 * removed unnecessary variables & structure members
 * optimized for the XER and CR0 case where XER doesn't need an overflow calculation
 *
2008-06-12 16:13:05 +00:00
Aaron Giles
20ee6bc325 PPC DRC:
* changed SPU receive model to a push model; updated drivers accordingly
 * added macros for setting the SPU transmit handler and sending bytes
 * cleaned up ppc.h
2008-06-12 02:48:11 +00:00
Jim Stolis
f4e88036ac Timer 0's second split counter was incorrectly checking the Timer 1 Run Control Bit 2008-06-12 00:47:44 +00:00
Curt Coder
d8c3b0e4f1 COP4xx:
- fixed LEI instruction
2008-06-11 19:19:00 +00:00
Aaron Giles
2f524636c6 PPC DRC:
* added detection of MMU enablement in 403GCX case
 * fixed bug in protection bounds violation detection for 4XX to get ppd
    to the "ppc4xx_spu_rx_data unimplemented" message
2008-06-11 14:37:33 +00:00
Aaron Giles
7079892d7e Fixed left/right accesses to work with recent memory handler changes. 2008-06-11 13:44:46 +00:00
Aaron Giles
fe1200fdcb Thayer's Quest:
* fixed conflicting layout (not super happy with the technique...)

x64 back-end:
 * added a "hop" around the prolog of the HANDLE opcode to allow fall-through

x86 back-end:
 * redesigned stack management to keep the stack at the same 16-byte alignment

PPC DRC:
 * fixed parameter ordering for masked reads/writes
2008-06-11 05:27:13 +00:00
Aaron Giles
e9b6f6be04 Firebeat driver:
* Added VBLANK IRQ clear
 * Added ATAPI IRQ clear
 * Tried to add UART IRQ clear but it doesn't yet work
 * Most of the games start to show something again with these changes
 * Added fast RAM region

PPC DRC:
 * Fixed TLB filling for 4XX protection ranges

PC16552d:
 * Tried to wire up assert/clear signals for this chip based on guesswork
   (anyone want to implement it properly? :)
2008-06-10 21:49:33 +00:00
Aaron Giles
a96458747d PPC common:
* reduced address bus width of 4xx series to 31 bits per the
    documentation

PPC DRC:
 * fixed bug that would jump to incorrect PC after filling the
    TLB during a mismatch event
 * added explicit address truncation to 31 bits for 4xx series
 * added new PPCDRC_ACCURATE_SINGLES option, which removes the
    excessive (and very likely unecessary) extra rounding when
    performing the "fast" single-precision floating point ops

Konami drivers:
 * designated fast RAM accesses for work RAM
 * removed unnecessary mirroring
 
Model 3:
 * identified and fixed VBLANK bit in real3d status which was
    causing the system to hang at startup
 * designated fast RAM accesses for work RAM

53C810:
 * changed read/write handles to proper READ8/WRITE8_HANDLER
    callbacks so they can eventually be used directly
2008-06-10 20:10:57 +00:00
Couriersud
4074d8cec7 01827: All sets in galaga.c: DIP switch information is not being readded properly when .CFG is read.
* commit 1728 got lost somehow - reapplied
2008-06-10 19:32:13 +00:00
Aaron Giles
ec6953c047 PPC DRC:
* Added basic cycle counts for longer instructions
 * Added penalty for polling timebase and decrementer registers
 * Fixed dependencies in cpu.mak
2008-06-10 09:03:45 +00:00
Aaron Giles
156d61c760 DRC frontend:
* changed from tracking "live" registers to tracking "necessary" registers
 * genericized register tracking to be more flexible
 * added previous instruction pointer to opcode descriptions

PowerPC frontend/DRC:
 * cleaned up register tracking implementation
 * fixed numerous errors and shortcomings in the tracking
 * added support for removing unnecessary XER CA and CR0 computations
 * updated UML logging to output new frontend statistics

MIPS3 frontend/DRC:
 * tweaked register tracking to match new DRC frontend system
 * updated UML logging to output new frontend statistics
2008-06-10 07:34:48 +00:00
Aaron Giles
cfab49b884 map command in the debugger now does separate read/write/fetch lookups 2008-06-09 17:30:01 +00:00
Aaron Giles
e9c099ef71 Don't show disclaimers/warnings if the debugger is enabled. 2008-06-09 16:49:52 +00:00
Aaron Giles
8ba5758341 Oops, broke the TLB. 2008-06-09 16:49:33 +00:00
Aaron Giles
748e83917a PPC DRC:
* minor flags optimizations:
    - broke CR into several individual bits of state
    - extracted the SO bit from XER into its own state
2008-06-09 16:18:19 +00:00
Aaron Giles
282300c587 x86/x64 back-ends:
* fixed DIVS/DIVU opcode so they properly compute SZ flags when requested;
    fixes camera wackiness in nbapbp

PPC DRC:
 * added support for 4xx protection registers via the MMU
 * added TLBH, TLBU, and DEC to the list of registers in the debugger
 * turned off "end of transfer" DMA signals in favor of "transfer count 0"
    signals; fixes memory-to-memory DMA in fiveside
2008-06-09 04:58:41 +00:00
Aaron Giles
003a6e94ca Fixed bug in x86 and x64 backends where sometimes the flags would be corrupted.
In particular, we always clobbered the flags for the subfze instruction, which
broke the nbapbp camera and some other things.
2008-06-08 08:43:26 +00:00
R. Belmont
9ecc076521 64-bit GCC compile fixes. 2008-06-08 02:52:17 +00:00
Aaron Giles
bc9235ad0f gticlub:
* Converted sysreg_r/w to 8-bit handlers
 * Added hack to make network IRQs work; brings some games back to life

UML:
 * Fixed STORE opcode description to allow immediate source operands

x86/x64 back-ends:
 * Added flag support to SEXT, ROLAND, ROLINS, LZCNT opcodes

PPC DRC:
 * Rewrote lswi/stswi as subroutines
 * Made accesses to tempdata explicitly dword or qword
 * Fixed SRR0 when generating a syscall
 * Removed no longer necessary TESTs on extsb/w, rlwinm, rlwnm, rlwimi, cntlzw
 * Fixed bug where the SO flag was not being computed for compares
 * Fixed flag computations for mulhw/mulhwu/mullw
 * Fixed subtlety of shifts between 32 and 63 in srw/sraw
 * Fixed mffs/mtfsf to use FP registers
 * Fixed mtfsfi to use the immediate value properly
 * Now marking terminal count bit in DMA status register
2008-06-07 08:13:22 +00:00
Aaron Giles
0148608c39 UML:
* Added simple symbol table to the UML for improved disassembly
 * Changed optional disassembler cache parameter to a drcuml object

PPC DRC:
 * Added symbols for most common variables
 * Fixed bug in handling XER carry flag for subo. forms
 * Simplified flag insertion logic for opcodeo. forms
2008-06-06 23:00:30 +00:00
Aaron Giles
1a63c29d04 UML:
* Improved disassembly output
2008-06-06 22:13:09 +00:00
Aaron Giles
cacc9b25ca UML:
* Added logic to simplify opcodes as much as possible at the UML layer.
 * Removed similar logic in the x86 and x64 back-ends.
 * Added stricter parameter validation for registers and mapvars
2008-06-06 19:45:29 +00:00
Aaron Giles
40d2b88ef5 UML:
* Added NOP opcode
2008-06-06 17:13:53 +00:00
Wilbert Pol
73625e2656 Fixed handling of the U register in the RET instructions and when taking an interrupt in the Nintendo Minx cpu core. 2008-06-06 16:28:00 +00:00
Aaron Giles
1c1498b0fc UML:
* Removed explicit flag requests from the shorthand opcodes
 * Added optimization function to drcuml which is called at block end
 * Added logic to compute the necessary flags based on upcoming opcodes
    and only select those flags which are required
 * Updated the PPC and MIPS3 DRCs to no longer explicitly specify flags
2008-06-06 07:36:36 +00:00
Aaron Giles
ee8162eff9 UML:
* Wrote new disassembler based on enhanced opcode info structure.
 * Moved disassembler into drcuml.c and removed old code.
 * Extended disassembler buffer sizes to at least 256 bytes.
2008-06-06 06:42:21 +00:00
Aaron Giles
829cf37d87 PPC DRC:
* Fixed bug where a branch and link to the link register would
    overwrite the link register before fetching the target address
2008-06-06 04:23:13 +00:00
Aaron Giles
b80ba7e56c UML changes:
* Added more extensive per-opcode information in preparation for UML 
    optimization step.
 * Made validation more thorough using the extended information.
 * Disabled back-end validation for now until it can be revisited
    using the new tables.
 * Changed GETFLGS encoding so that the mask is in parameter 2 instead
    of the flags field.
2008-06-06 04:02:06 +00:00
Jonathan Gevaryahu
89769efec7 Update comments for tms5220 and sn76496. Add a Couriersud-style pinout to tms5220.c 2008-06-06 03:16:02 +00:00
Nathan Woods
5ea9b4a12a Passing a running_machine parameter 2008-06-06 00:38:58 +00:00
Nathan Woods
136db6075d Fixed compilation error when neither HAS_PPC403GA nor HAS_PPC403GCX are defined 2008-06-06 00:38:33 +00:00
mariuszw1
fbda64287d 68681 DUART update
- converted to device interface
- converted to 8 bit device
- added input and output port
- added X1/16 timer
2008-06-05 20:58:08 +00:00
Aaron Giles
524dde249b Fix -listxml again. 2008-06-05 17:23:32 +00:00
Aaron Giles
cf4b81fba9 Separated condflags into two individual fields. 2008-06-05 17:21:35 +00:00
Aaron Giles
1bc774b32b Cleanups/version bump. 2008-06-05 15:57:00 +00:00
Aaron Giles
cfb9caf08f 01829: bermudat, gwar, ikari, victroad + clones: MAME freezes at "initializing" screen 2008-06-05 15:36:27 +00:00
R. Belmont
317607a143 64-bit GCC compile fixes. 2008-06-05 14:10:56 +00:00
Nathan Woods
5b94cc19d5 MESS-specific compilation fix 2008-06-05 11:12:33 +00:00
Aaron Giles
2deed30b29 Fixes for 64-bit MSVC compile. 2008-06-05 09:49:23 +00:00
Aaron Giles
bba83b69aa 01859: looping, loopinga, skybump: Fatal Error crash
The CPU context is not active in a timer callback. You have to set it
yourself.
2008-06-05 09:47:46 +00:00
Aaron Giles
48332dea92 Added compile-time error if PTR64 is incorrectly set. 2008-06-05 09:41:02 +00:00
Aaron Giles
a5abe031ca It is now an actual error to have duplicate input bits. 2008-06-05 09:36:23 +00:00
Aaron Giles
7474bb220a MAMETesters Bugs Fixed
----------------------
- 01845: [Core] all games: cheats are broken
- 01846: [Misc.] -CHEAT trigger causes MAME crash with PSX-type CPU drivers

Source Changes
--------------
Updated cheat system
  - Locked search region when malloc fails to allocate gigantic memory
    instead of fatal error. Also locked zero malloc error in case of
    search speed = all memory in 32-bit CPU. And added search region
    range checker to lock a search region with a big risk

  - Fixed a bug that old code is always converted to specified
    separator in enable/disable menu

  - Refined new cheat format.
     * Rewritten cheat format again. newest format is
       ":gamename::type::address::data::extend_data:(description:comment)"
       Expanded type field now requires 10 bytes (not 8 bytes) and
       it divides internal cpu (2 bytes) and type (8 bytes) parameters

     * Removed VWrite, VRWrite. The flag of Value Selection is merged
       into expanded type field now.

     * Added CBit (Condition Bit). This checks bit in read data then
       set or clear bit in case of true.

     * Rearranged cheat code viwer based on newest cheat format

  - Fixed unworking Load Old Format option. If you want to load old or
    older format code, set it (default is OFF)

  - Renamed functions/structures based on coding guidlines
    All structures and included parameters are completed

  - Merged resize_*_no_dispose() into resize_*()

  - Removed the hack of search region for SH-2 CPU because required
    region is now set as expected without this hack
2008-06-05 08:46:48 +00:00
Aaron Giles
56279e2780 From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] memory_region madness

The memory_region and memory_region_length functions are probably the
two most common functions in MAME that don't take a machine parameter
but probably should given the direction MAME has been going in
removing global variable references.  Attached are massive patches to
accomplish this.  I wish they could be smaller, but sadly, this is
butchery, not brain surgery.

The first patch makes some simplifications to help the second patch
along.  It is a general improvement as well, and hopefully can be
applied even if the second patch is rejected.  Specifically:

1.  Introduced/updated some include files for files that export
functions whose apis will need to be changed (cps1.h, decocrpt.h,
ms32.h, pgm.h, fd1089.h, konami1.h).  In the case of konami.c, I
renamed the file konami1.c and changed the api and callers to only
require one function export.
2.  Pulled memory_region*() calls out of for loops and folded the
occasional duplicated call.  The compiler can't likely infer that the
results are constant, so this should be a minor performance win as
well.
2008-06-05 08:40:22 +00:00
Aaron Giles
ed6ad8b4f9 PowerPC dynamic recompiler: [Aaron Giles]
- rewrote PowerPC implementation as a dynamic recompiler on top
    of the universal recompiler engine
 - wrote a front-end to analyze PowerPC code paths and register usage
 - wrote a common shared module with C implementations of tricky
    CPU behaviors
 - added separate CPU types for the variants supported, instead of
    relying on a hidden model enum
 - rewrote the serial port emulation for the 4xx series to be more
    accurate and not rely on separate DMA handlers
 - rewrote the MMU handling to implement a software TLB that faults
    in pages and handles changed bits appropriately
 - implemented emulation of the PowerPC 603's software TLB, which
    allows the model 3 games to run without a hack to disable the MMU

Updated the PowerPC disassembler to share constants with the rest of
the core, and to more aggressively use simplified mnemonics, especially
for branches. [Aaron Giles]

Universal recompiler:
 - fixed frontend to handle opcode widths different from bus width
 - added several new opcodes:
    * (D)GETFLGS - copies the UML flags to a destination operand
    * FDRNDS - rounds a double precision value to single precision
 - renamed several opcodes:
    * SETC   -> CARRY
    * XTRACT -> ROLAND
    * INSERT -> ROLINS
 - consolidated the following opcodes:
    * LOAD?U -> LOAD
    * LOAD?S -> LOADS
    * STORE? -> STORE
    * READ?U -> READ
    * READ?M -> READM
    * WRITE? -> WRITE
    * WRITM? -> WRITEM
    * SEXT?  -> SEXT
    * FTOI?? -> FTOINT
    * FFRI?  -> FFRINT
    * FFRF?  -> FFRFLT
 - removed some opcodes:
    * FLAGS - can be done with GETFLGS/LOAD4/ROLINS
    * ZEXT - can be achieved with AND
    * READ?S - can be achieved with READ/SEXT
 - updated C, x86, and x64 back-ends to support these opcode changes
 - updated disassembler to support these opcode changes
 
MIPS3 dynamic recompiler:
 - updated to use new/changed opcode forms
 - changed context switch so that it only swaps a single pointer

Konami Hornet changes: [Aaron Giles]
 - updated to new PowerPC configurations
 - updated some memory handlers to be native 8-bit handlers
 - cleaned up JVS implementation to work with new serial code
 - added fast RAM for the work RAM to give a small speed boost

Konami GTI Club changes: [Aaron Giles]
 - updated to new PowerPC configurations
 - updated some memory handlers to be native 8-bit handlers

Konami Viper/ZR107 changes: [Aaron Giles]
 - updated to new PowerPC configurations

Sega Model 3 changes: [Aaron Giles]
 - updated to new PowerPC configurations
 - reimplemented/centralized interrupt handling
 - these games are broken for the moment

Fixed crasher due to some Konami games using 8 layers in
the K056832 implementation, even though it was only written
for 4. [Aaron Giles]

Added fisttp opcode to i386 disassembler. [Aaron Giles]
2008-06-05 08:34:13 +00:00
Nicola Salmoria
8ea2d9e334 optimised tilemap_draw rowscroll case to avoid overhead when used with clip rects smaller than the tilemap. This reduces by an order of magnitude the time taken to render the bg in Gunnail stage 5. 2008-06-05 08:04:46 +00:00
Wilbert Pol
752af71d6e Fixed flag results for INC, DEC, AND, OR, and XOR instructions in the Nintendo Minx cpu core. 2008-06-04 21:32:22 +00:00
Curt Coder
113d019062 Used cpunum_ instead of active_cpu_. 2008-06-04 20:24:31 +00:00
Curt Coder
6d6a5b237d - Added HALT opcode and halt mode to the COP410
- Added Microbus support, clock divisor selection, and CKO mode selection to the COP420
- Changed Thayer's Quest keyboard interface to at least slightly resemble the schematics
2008-06-04 20:15:15 +00:00
Wilbert Pol
114c783141 Fixed opcodes 45, 4D, 55, 5D, B5, B6, B7, FC, FD, and CF 70-7F in the Nintendo Minx cpu core. 2008-06-04 18:41:38 +00:00
Couriersud
eab9ba4983 00788: Problem about Joy Axis Input for Pedal.
* Remapping now works as described in report.
2008-06-04 01:07:52 +00:00
Couriersud
9aacf830fb Credit Fabio Priuli: Remove port_input_read_indexed in favor of the use of proper tags in a number of drivers
* Checked sprintf calls for sufficient buffer space [couriersud]
2008-06-02 20:00:25 +00:00
Wilbert Pol
e290212a9d Fixed taking of interrupts in the Nintendo Minx cpu core. 2008-06-02 19:28:29 +00:00
R. Belmont
bdbbf5ccaf 53c810 now passes IRQ state with the IRQ callback. 2008-06-02 16:46:36 +00:00
Wilbert Pol
6b1719e1c6 Some Nintendo Minx cpu core updates:
- Styling changes
- Added instruction cycle counts.
- Added interrupt support.
- Added HALT support.
- Fixed INT instruction.
- Added incomplete support for DIV and MUL instructions.
- Fixed MOV [#nnnn],BA and MOV [#nnnn],HL instructions.
2008-06-01 16:43:24 +00:00
Aaron Giles
91f55454e4 Fixed Cause register for bad COP instructions. Verified with
mtetrisc and starsldr that they both throw and handle these
exceptions.
2008-05-30 05:59:06 +00:00
Couriersud
c1a1cab523 Fix for Mantis 01699: asteroid, asteroi1, asteroib, asterock, meteor, meteorts: Abnormal discrete sounds
* added NODE_RELATIVE(NODE, offset) macro to discrete.h
* fix asteroid.c, canyon.c, skydiver.c and tank8.c to use this macro instead of adding directly to the node
2008-05-29 21:11:10 +00:00
Aaron Giles
fe4a4c70b4 64-bit compile fix (d'oh!) 2008-05-29 17:00:13 +00:00
Nathan Woods
e067dc7d9d Made it possible to pass a NULL errorbug to input_port_config_alloc() 2008-05-29 10:56:20 +00:00
Nathan Woods
aa14505377 MESS-specific fix 2008-05-29 10:55:52 +00:00
Aaron Giles
c852c42952 Cleanups for 0.125u3. 2008-05-29 09:25:51 +00:00
Aaron Giles
7247ecbce2 From: ShimaPong
fixed Testers bug [01039]
-------------------------------

Updated cheat sytem drastically
  * Supported (preliminary) new cheat format
     - Added new operations
        PDWWrite, RWrite, VRWrite, CWrite, Move, Branch, Loop, Popup
     - Added new options
        ValueSelectNegative, Return, AddressReadFrom, DataReadFrom
     - Added cheat variables
        You can store data with Write or Move operations and
        read as an address or data from each fields
     - Added condition check
        for CWrite, Branch and Popup operations
     - Added new custom codes
        Separator, Layer
     - Supported Shared Code [MESS ONLY]
        different machine shares common code for a game

  * Allowed mixed label-select or user-select with standard code

  * Added label selector menu for label-selection code

  * Added extend comment displayer for multi-line comments

  * Added command menu for cheat list and watchpoint
     Easy selectable cheat commands in this menu

  * Added debug view menu [DEBUG BUILD ONLY]
     It displays internal info to debug cheat system

  * Supported unique separator by ui_draw_menu() in several menus

  * Added user defined search region
     You can set free memory range from cheat database

  * Enhanced error check for cheat code to prevent from unexpected working
     Error code is locked. If you select this code, the analyser works
     instead of the code activater

  * Enhanced value input with keyboard-less
     Cheat edit key gives new input system in several menus
     Left/right keys moves the edit cursor and up/down keys changes a value

  * Added cheat command save, reload, reset in option menu

  * Supported address shift in searching
     Now searchable default region in TMS340*0 cpu games (Trog, Smash T.V. etc)

  * Refined cheat menu handling with function pointer called cheat_menu_handler

  * Added format strings table to manage in an integrated fashion

  * Deleted unused hacks of default search region for Neo Geo and TMS34010

  * Refined code based on MAME coding guidelines
     - Renamed many functions/structures/constants
        But not complete due to too many items
     - Converted small but often used functions to INLINE
     - Fixed a comparison in case of 0 or NULL
     - Added missing function prototype for several functions
2008-05-29 08:54:21 +00:00
Aaron Giles
7733c26136 Removed obsolete comment. 2008-05-29 08:40:40 +00:00
Aaron Giles
c9caffe405 Added internal default tags for input ports when saving/loading. 2008-05-29 08:39:27 +00:00
Aaron Giles
e06d8f3ce8 Fixed bug that caused DIP switches to be improperly read from game cfg file. 2008-05-29 08:28:20 +00:00
Aaron Giles
650dfb8a28 Moved implementation-specific state into a pointer hanging off of the core
MIPS3 state.

Removed large context in favor of a pointer to the large context to help
improve context switch times.
2008-05-29 08:22:50 +00:00
Nicola Salmoria
ceeb086b24 removed meaningless service_coin_lockout_w function
updated the zaxxon driver to correctly handle the coin enable lines
2008-05-29 08:02:46 +00:00
Aaron Giles
65934e7aa5 Added new option -snapname which lets you provide a template for how snapshot
names are generated.

Added new astring functions astring_del, astring_replace, and astring_replacec
to help perform simple search/replace substitution.
2008-05-29 08:00:23 +00:00
Aaron Giles
eeb821032e Several miscellaneous changes:
1. In the MIPS core:
    - renamed struct mips3_config -> mips3_config
    - updated all drivers to the new names
    - removed MIPS3DRC_STRICT_COP0 flag, which is no longer used
    - a few minor cleanups

2. In the CPU interface:
    - added new 'intention' parameter to the translate callback to
       indicate read/write/fetch access, user/supervisor mode, and
       a flag for debugging
    - updated all call sites to pass an appropriate value
    - updated all CPU cores to the new prototype

3. In the UML:
    - added new opcode SETC to set the carry flag from a source bit
    - added new opcode BSWAP to swap bytes within a value
    - updated C, x86, x64 back-ends to support the new opcodes
    - updated disassembler to support the new opcodes

4. In the DRC frontend:
    - fixed bug in handling edge case with the PC near the 0 or ~0
2008-05-29 07:18:35 +00:00
Nathan Woods
f2c5b0db7d Fixed a benign bug in the x86 DRC backend 2008-05-28 12:04:08 +00:00
Couriersud
26e4f50fc0 Credit Miodrag Milanovic: Implement autoload mode in 8257
* added support for autoload mode
* fixed bug in calculating count
2008-05-27 19:45:27 +00:00
Nicola Salmoria
246885e3c2 fixed cpu_getiloops() which was not returning the correct value.
This fixes
01780: pingpong: Level select arrow's not displayed 
and possibly other timing related bugs.
2008-05-26 08:31:34 +00:00
Aaron Giles
40dea6049e Added new front-end flag to tag privileged instructions.
Minor tweaks/cleanups to the MIPS3 drc.
2008-05-25 22:09:21 +00:00
Aaron Giles
238dc3aada Removed empty input ports from the empty driver, in favor of a NULL entry. 2008-05-25 22:07:15 +00:00
Aaron Giles
62fb5f8f0d 01822: OSD causes crash when try to show the Screen Refresh Rate menu 2008-05-25 22:03:20 +00:00
Aaron Giles
564be8e7a2 Refinement of previous check-in to handle conditional inputs.
Fixed 01836: qcrayon2: Conditional input not visible/working for dip game control joystick
2008-05-25 21:59:19 +00:00
Aaron Giles
67db0742f0 Added TOKEN_SKIP_* macros to tokenize.h.
Changed error reporting during input port detokenization to fill a buffer
rather than fatalerror-ing immediately. Should now properly skip over
any invalid tokens.

Enhanced error detection during input port detokenization to catch 
duplicate bits. There are a lot of these!

Updated initialization code to print errors and fatal only if the input
ports were unable to be constructed at all.
2008-05-25 21:24:19 +00:00
Nathan Woods
200cda66f1 MESS-specific: Added hook for default keyboard key names 2008-05-25 19:39:13 +00:00
Nathan Woods
2bd5a419b1 Changed text used to specify a menu separator, and now using a #define 2008-05-25 18:31:29 +00:00
Nathan Woods
0a624c8f7a Updates from MESS in response to 0.125u2 2008-05-25 12:58:14 +00:00
Aaron Giles
7cb1326459 Renamed EEPROM_* to eeprom_*
Typedef'ed a real eeprom_interface structure.

Added a PORT_CUSTOM for the eeprom bit reading. Updated several
drivers to use that by specifying it in their input ports instead
of having a custom read handler that inserted the bit forcefully.

Added a PORT_CUSTOM for the ticket dispenser callback as well.
Updated the dcheese driver to use it.

Many more drivers can be updated to use these new PORT_CUSTOMs
in the future, eliminating hacky input port read handlers.
2008-05-25 05:38:24 +00:00
Couriersud
558aab9d08 Fix DEBUG=1 compile 2008-05-24 20:45:29 +00:00
Aaron Giles
a643604cbd 01825: Toggling Tab menu works as F2 key in games with their service
mode DIPs on the top of the menu

Fixed behavior of toggle switches so that they don't lose their value
when the UI is up. They also can now be used for multibit DIP switch
settings in which case they toggle through all the options.

New functions input_field_select_next_setting() and 
input_field_select_previous_setting() which can be used to iterate
properly through DIP switches. Fixed the behavior for cases where
conditional ports are in play (you could get stuck). Changed uimenu.c
to call these instead of implementing its own.

Changed uimenu.c so that hitting ENTER on a DIP switch resets it to
its default value. This is analagous to how the OSD sliders behave.
2008-05-24 17:01:49 +00:00
Wilbert Pol
4e1afc32f5 Fixed memory access in the 80286 cpu core which made i286.h obsolete. Changed CPUINFO_INT_MAX_INSTRUCTION_BYTES to prevent crashes during disassembly. 2008-05-24 15:14:12 +00:00
Nicola Salmoria
939f6d8b98 fix PORT_IMPULSE handling. The old code would force inputs to be asserted for at least the number of frames indicated, but keeping the button pressed would keep the input asserted. Now the input is asserted far exactly the number of frames indicated. 2008-05-24 11:49:31 +00:00
Couriersud
55c18d1204 Mantis 01819: "Coinlock disabled coin x" message displayed upon startup
* Only check for coin lockout if actually pressed
2008-05-23 20:30:58 +00:00
Curt Coder
879dc21122 Fixed COP420 instructions XAS and INIL. Fixed cycle count for extended opcodes. Added CKO general purpose input. 2008-05-23 15:15:41 +00:00
Nathan Woods
4f6b8e9d91 Passing more running_machine* parameters around 2008-05-23 11:22:34 +00:00
Roberto Fresca
cc5dc262de Improvements to American Poker II driver.
- Reworked the color routines switching to resnet system.
 - Added a resistor network diagram.
 - Switch to pre-defined crystal value.
 - Changed the WATCHDOG_TIME_INIT to be based on miliseconds instead of hertz.
 - Other minor cleanup/fixes.
 - Updated technical notes.
2008-05-23 10:46:26 +00:00
Curt Coder
9962c0f826 Fixed COP420 instructions JSRP, LBI, LQID, and SKT. Draco now has sound. 2008-05-22 15:16:06 +00:00
Aaron Giles
d5ff8c002a Cleanups and version bump. 2008-05-22 05:19:16 +00:00
Aaron Giles
f4523617ed Fix 01815: All Sets: Saved machine states do not properly adjust to changes in -samplerate 2008-05-22 05:15:33 +00:00
Aaron Giles
11b1331d3f Fixed incorrectly sized array that led to stack corruption during validity checks.
Fixes CPS1 no-start issue.
2008-05-22 05:04:14 +00:00
Aaron Giles
defcc8895b From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] Missed Machine->machine changes

Hi mamedev,

A short incremental to my last deprecat.h patches.  This one is the
result of a slightly improved fixup script, which finds more cases
where Machine can be replaced with machine.  Six more files lose
deprecat.h.

~aa
2008-05-22 03:24:45 +00:00
Aaron Giles
a300da2178 From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] More Machine->machine changes, add machine to irq
callbacks

Hi mamedev,

Here are two more patches to eliminate Machine globals.  The first
patch was autogenerated by the attached fixup script.  That script has
been updated to catch additional cases which it previously missed
(when Machine is the last parameter to a function or Machine is used
in an assignment).  This makes ~50 more files deprecat.h free.

A sizable chunk (~20%) of the remaining uses of the Machine global in
the drivers are due to irq callbacks for sound and machine updates.
Typically such callbacks need to call cpunum_set_input_line, which
requires a machine parameter, so if the callbacks don't pass the
machine parameter, these routines have no choice but to reference the
global variable.

The second patch attempts to address most cases of this by adding the
machine parameter to the callback interfaces.  This allows us to
remove #include "deprecat.h" from ~150 files, at the cost of having to
fix up hundreds of callbacks.

In total, these patches reduced the number of files with deprecat.h
from 783 to 575.

~aa
2008-05-22 03:23:28 +00:00
Aaron Giles
98a8e73947 From: Antoine Mine [mailto:Antoine.Mine@ens.fr]
Subject: saturn CPU patch

Dear MAMEDev,

The attached patch corrects several bugs in the emulation of the saturn 
CPU. These corrections are needed to make new HP48 drivers (to be 
submitted to MESS imminently) work.
AFAIK, MESS is the only place where this CPU is used, so, the patch
should 
not cause any regression in MAME.
The patch is against 0125u1.

Best regards,
-
Antoine Mine
2008-05-22 03:09:01 +00:00
Aaron Giles
bb9fec0f86 Moving old DRC out of the way. 2008-05-22 03:06:49 +00:00
Aaron Giles
1561edf049 UML changes:
* Added new opcode LZCNT which returns the number of leading zeros in
   a parameter.
 * Added new opcode XTRACT which is a combined rotate/mask (basically
   rlwinm from PowerPC)
 * Added new opcode INSERT which is a combined rotate/mask/blend
   (basically rlwimi from PowerPC). Best. Opcode. Ever.
 * Updated all back-ends to support these new opcodes.
 * Fixed several bugs relating to shifts/rotates and optimizing out
   cases incorrectly.

MIPS3 DRC changes:
 * Updated to use INSERT and XTRACT where appropriate
 * Cleaned up register usage to enable an additional direct mapping;
   this means Linux gets 1 now and Windows gets 3
2008-05-22 03:05:13 +00:00
Aaron Giles
229e42f524 Turn on joysticks by default. 2008-05-21 16:59:26 +00:00
Aaron Giles
caa2a53c7f Added support in the MIPS recompiler to map a few common registers to
machine registers if the machine supports it. Currently only x64 on
Windows has enough free registers to do so, though PowerPC will almost
certainly be able to take advantage of this. Gives a minor speedup.
2008-05-21 10:59:05 +00:00
Aaron Giles
96c8dfd0ab Fix compiler error. 2008-05-21 08:59:20 +00:00
Aaron Giles
21920d4e44 Minor cleanup. 2008-05-21 07:54:40 +00:00
Jonathan Gevaryahu
009fcb7b7c Added proper interpolation sub-cycles ('PC' cycles and A/B subcycles of each) to tms5110 and updated comments. Also added code to update lfsr 20 times instead of once per sample, so it matches the real chip. Updated tms5110 to use shifts instead of divides during interpolation. 2008-05-20 04:38:56 +00:00
Jonathan Gevaryahu
ae6bf98511 Added proper interpolation sub-cycles ('PC' cycles and A/B subcycles of each) and updated comments 2008-05-20 01:53:25 +00:00
Aaron Giles
3c6278aef8 Fix crasher in drcfe.c. 2008-05-20 00:59:20 +00:00
Aaron Giles
fdf128e2d7 Implemented IDT instructions. All invalid instruction asserts are now runtime-only. 2008-05-20 00:22:50 +00:00
Wilbert Pol
50ec9b1076 Fixed 80286 databus widths. 2008-05-19 19:43:17 +00:00
R. Belmont
071164f3a7 64-bit GCC compile fix. 2008-05-19 17:10:32 +00:00
Aaron Giles
d411c2c74c Numerous MIPS3 DRC updates:
* Fixed front-end so that virtual no-op instructions are still targeted
as branch targets.

* Fixed front-end to mark the beginning of each sequence as needing TLB
validation, since any sequence can be jumped to from anywhere.

* Redid the MIPS3 TLB implementation. Fixed the exception vector and
type handling. Changed the bitfields to directly map from the MIPS TLB
format. Added distinction between TLB fill and TLB valid/modified
exceptions.

* Added separate modes for user, supervisor, and kernel modes. Each mode
does proper verification of addresses now and generates address errors
for invalid accesses.

* Fixed several bugs in the TLB implementation; not everything works
yet but it's a lot closer.

* Made COP0 access checking mandatory in non-kernel modes.

* Fixed several crashes when recompiling virtual no-ops.

* Fixed TLB bug where entries for virtual address 0 were present by 
default.

* Fixed bug in the map variable implementation that would sometimes
result in incorrectly recovered values.
2008-05-19 16:58:42 +00:00
Curt Coder
d41a31dd12 Fixed CDP1869 character memory access, and Cidelsa sprite flashing. 2008-05-19 15:38:19 +00:00
R. Belmont
8d210c82b5 Fixed compiler warning for Apple GCC. 2008-05-19 02:03:59 +00:00
Aaron Giles
969a705508 Added back-end validation mechanism, and a handful of tests as examples.
This will be expanded in the future.

Added two new opcodes: SAVE and RESTORE to save and restore the entire
virtual machine state for examination/setup.

Added new back-end function get_info() which returns information from
the back-end about how many actual registers will be mapped.

Fixed a bug that mapped the high a low parts of registers to the same
address. This should help the C back-end run better on big-endian
architectures.
2008-05-19 00:58:16 +00:00
Aaron Giles
1c33c2f29b Fixed crash when reading ports by tag, when some ports don't have tags. 2008-05-18 14:21:28 +00:00
Nathan Woods
d2123b2803 Passing running_machine* parameter 2008-05-17 22:42:22 +00:00
Aaron Giles
28855e088a Fixed a couple of obvious errors in the TLB implementation. 2008-05-17 19:48:17 +00:00
Aaron Giles
0c1aaf1526 Added some instrumentation for the MMU. To enable it, turn on PRINTF_MMU at the top
of the file. Currently it is left on because none of the MAME games rely on it.
2008-05-17 17:11:12 +00:00
Aaron Giles
5c0e902901 Cleaned up operand sizing in the C core. Should be closer to working
on big-endian systems.
2008-05-17 06:47:25 +00:00
Aaron Giles
9abf2c3efa Added support for ROUNDSS and ROUNDSD on Penryn architectures. 2008-05-17 02:11:48 +00:00
Aaron Giles
b2ad4af505 As if Intel didn't already have enough opcodes. Added defines for new
Penryn opcodes.
2008-05-16 14:36:54 +00:00
Aaron Giles
271ac2a7a2 Added a quick & dirty attempt at implementing tlb_mismatch. It's likely wrong,
but it's better than nothing. Also added an assertion if you jump to unmapped
code and added handling for compile-time page faults.
2008-05-16 05:21:25 +00:00
Aaron Giles
be680b1346 Oops forgot to save EBX. 2008-05-16 05:20:41 +00:00
Aaron Giles
0d249058cf Fix bug 1804. Now checking for SSE3 before using truncation functions.
Also fixed incorrect floating point assertion in x86 back-end.
2008-05-16 05:08:32 +00:00
Couriersud
eb59ae219e Fix 64bit build on linux
* Changed (void *) <some int32> to (void *)(FPTR)<some int32>
2008-05-15 21:29:09 +00:00
Aaron Giles
096331c856 Restructured input port internals and cleaned up inptport.c:
* Input ports are now maintained hierarchically. At the top
level are input ports, which contain a list of fields. Each
field represents one or more bits of the port. Certain fields
such as DIP switches and configuration switches contain a
list of settings, which can be selected. DIP switch fields
can also contain a list of DIP switch locations.

* Normalized behavior of port overrides (via PORT_INCLUDE or
by defining multiple overlapping bits). All fields within a
port are kept in strict increasing bit order, so altered DIP
switches are now kept in the appropriate order. This addresses
MAMETesters bug 01671.

* Live port state is now fully separate from configured 
state. This is manifested in a similar way to devices, where
a const list of ports can be managed either offline or live.
Each port has a pointer to an opaque set of live state which
is NULL when offline or valid when live. Each port also has
a running_machine * which is also NULL when offline.

* Because of this new arrangement, the conversion from tokens
to a list of ports now requires reasonably complex memory
allocation, so these port lists must be explicitly allocated
and freed (they are not mantained by automatic resource
allocation).

* Custom and changed callbacks now take a pointer to a field
config instead of a running machine. This provides more
information about what field triggered the change notification.
The machine can be found by referenced field->port->machine.

* The inptport.c module has been cleaned up and many 
ambiguities resolved. Most of this is internal, though it did
result in osd_customize_inputport_list() being changed to
osd_customize_input_type_list(). The parameter to this function
is now a linked list instead of an array, and the structures
referenced have been reorganized somewhat.

* Updated config.c to pass machine parameters to its callbacks.

* Updated validity checks, XML output, and UI system to handle
the new structures.

* Moved large table of default input settings to a separate
include file inpttype.h.

* Removed gross hacks in trackfld and hyperspt NVRAM. These
may be broken as a result.
2008-05-15 16:25:03 +00:00
Aaron Giles
21a686cf7d Cleanups and version bump. 2008-05-15 08:56:29 +00:00
Aaron Giles
934fbd9fc2 Removed unused functions. 2008-05-15 08:53:58 +00:00
Aaron Giles
44fbeff9bf From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] Remove opbase globals from the public interface

Hi mamedev,

There are several variables associated with opbase handling which are
global and documented in memory.h and thus their use is not well
controlled.  This patch attempts to remedy this.  Because they are
used in various inline memory functions, they can't yet be made local
to memory.c, but by rescoping their declaration they can be hidden,
much like we hide totalcpu.

Most of the uses are in OPBASE_HANDLER() macros, so by encapsulating
the opbase state into a struct and adding that to the handler
interface those can be converted to local variable manipulation. There
is one use in missile.c in a MACHINE_START that I simply removed, it
shouldn't be needed.

One side effect of this patch is that the various unsafe memory macros
can't be used directly, they will be a compiler error now.  That is
probably for the best.

~aa
2008-05-15 08:22:17 +00:00
Laurent Desnogues
a97ec0a587 - revert commit 1566 2008-05-13 10:22:16 +00:00
Laurent Desnogues
45e055c624 - don't use $(LIBS) for linking where it's not needed (hope I did not break
Windows or cross builds)
2008-05-13 08:34:03 +00:00
Jonathan Gevaryahu
16942d210b Update TMS5200/5220 documentation and comments
Fix the chirp table implementation in both the 51xx and 52xx chips.
2008-05-13 04:56:47 +00:00
Aaron Giles
86dd599aa8 Added uncompressed AVI recording. Extended aviio to be able
to write RGB bitmaps. Unfortunately, the only option is fully
uncompressed, which means the resulting AVIs are *HUGE* and
may not play correctly in realtime due to high data rate. The
intention is that these uncompressed AVIs are post-processed
by other utilities to compress the video and produce a
realtime playable result.

Added new command-line option -aviwrite which works just like
-mngwrite, except it produces AVIs and streams sound to them.
Updated documentation accordingly.

Shift+F12 still produces MNGs for now, though this might change
in the future.

Modified fileio.c to retain the full pathname to the file so
that it can be queried while the file is open.
2008-05-13 03:02:11 +00:00
Jonathan Gevaryahu
a01a97367c s14001a.c - updated comments and version 2008-05-13 01:27:43 +00:00
R. Belmont
3fbca2dbba Fixed unused function and uninitialized variable errors. 2008-05-12 17:00:26 +00:00
Curt Coder
0376d5359f [CDP1852] Minor fixes. 2008-05-12 16:17:54 +00:00
Curt Coder
2528b956f5 Added CDP1852 I/O buffer chip, and used it in Altair/Draco. 2008-05-12 16:10:28 +00:00
Laurent Desnogues
5d02da3db2 - define isnan as _isnan for MSC_VER 2008-05-12 14:51:45 +00:00
Aaron Giles
7bb9e27f80 Fix incorrect assertion. 2008-05-12 14:51:45 +00:00
Manuel Abadia
90f263f8a3 DS5002FP core 2008-05-12 09:03:33 +00:00
Aaron Giles
e23b3c3776 Potential fix for Linux crashes. 2008-05-12 05:35:13 +00:00
R. Belmont
2e363855ba Fixed a bunch of compiler errors w/64-bit GCC. Result does not run. 2008-05-12 02:29:07 +00:00
Aaron Giles
b735b4be6c New universal dynamic recompiler system. The central module
is drcuml.c, which defines a universal machine language
syntax that can be generated by a frontend recompiler and
then retargeted via a generic backend interface to any of
a number of different architectures. A disassembler for the
UML is also included to allow examination of the generated
UML code.

Currently supported backend architectures include 32-bit x86,
64-bit x86, and a platform-neutral interpreted C backend that
can be used as a fallback for platforms without native 
support. The C backend also performs additional validation
to ensure assumptions are met.

Along with the new architecture is a new MIPS III/IV 
recompiler frontend. This frontend has been rewritten from 
the old x64-specific recompiler to generate UML opcodes
instead. This means that the single recompiler can be used
to target multiple backend architectures and should in
theory produce identical results across all of them.

The old 32-bit and 64-bit MIPS recompilers are now officially
retired. The new system provides similar performance (within
5% generally) to the old system and has similar compatibility.
The only currently known issues are some problems with the
two Gauntlet 3D games.
2008-05-11 22:15:13 +00:00
Curt Coder
1a32caa7e0 [CDP1802] Appease compiler. 2008-05-10 09:54:48 +00:00
Curt Coder
0999af40c5 [CDP1802] Added memory address parameter to DMA callbacks, and added a macro for the CPU interface. 2008-05-09 18:49:52 +00:00
Roberto Fresca
351f215b12 Added XTAL_30MHz to the list. This one is used by Impera Magic Card. 2008-05-07 19:32:54 +00:00
Roberto Zandona
f14541031b another fix typo 2008-05-07 07:18:37 +00:00
Roberto Zandona
1dfeb3ba53 fyx typo 2008-05-07 07:10:50 +00:00
Roberto Zandona
4c138a09fc add feature to the cia6526: in READ operation the value can be forced by a extern electric circuit; this feature is necessary to the mess side 2008-05-07 07:01:48 +00:00
Aaron Giles
692a5e4674 Spacing and version bump. 2008-05-05 07:10:47 +00:00
Aaron Giles
0cee075e0d Added xchg opcodes. 2008-05-05 06:11:13 +00:00
Nathan Woods
c75d63a569 Removed bogus assertion - DEVICE_TYPE_WILDCARD is NULL 2008-05-04 23:09:07 +00:00
Nathan Woods
fae89f0d4c MESS-specific change; added running_machine parameter 2008-05-04 14:23:41 +00:00
Nathan Woods
d2414bddfe Changed MESS-specific key for pasting (PrtScn was _not_ a good choice on Windows) 2008-05-04 01:01:52 +00:00
R. Belmont
1119d3f129 Fixed an envelope corner case in the SCSP and AICA (kingshriek) 2008-05-03 23:59:54 +00:00
Nathan Woods
dfe585bf85 Added a MESS-specific "paste" command; used to paste clipboard data into MESS's
natural keyboard
2008-05-03 17:56:41 +00:00
Couriersud
b7880b33fa ay8910.c:
* Fixes mantis bugs 01767, 01769
* Corrected some comments
2008-05-02 10:58:11 +00:00
Aaron Giles
67e76e92f5 Cleanups/version bump. 2008-05-01 14:32:31 +00:00
Aaron Giles
37c56cf592 01752: Warnings making standard .124u4 in GCC 4.3.0 (mingw)
Well, two of them were valid.
2008-05-01 14:12:20 +00:00
Aaron Giles
23890e5da7 This is a better fix for MAMETesters 00149: No error report for invalid BIOS setting 2008-05-01 14:02:12 +00:00
Aaron Giles
89c9e00953 From: Micko [mailto:mmicko@gmail.com]
Subject: PIC 8259 changes

Hello Aaron,
 
As I have announced before, here are some changes on pic8259.
 
for changelog:
 
[PIC8259] Adding support for 8080/85 mode interrupts
 
Please just check it against x86 platform, not sure if is_x86 in ICW4 is obligatory in case of using it on x86 platform.
 
Regards,
Miodrag
2008-05-01 13:54:19 +00:00
Aaron Giles
a910dafd37 From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] Small deprecat.h related cleanup

Hi mamedev,

While doing some work on eliminating some uses of deprecat.h, I came
across a few files that didn't have it that used deprecated features.
A little investigation revealed they were getting it through
debugger.h, typically by referencing m68000.h.  Since deprecat.h is
intended to document the files that need updating (otherwise it would
just be included in a common header), I reworked debugger.h to not
import it when the debugger is not enabled, and fixed the files that
broke as a result.

~aa
2008-05-01 13:52:28 +00:00
Aaron Giles
c967dcb102 From: Duke [mailto:startaq@gmail.com]
Subject: MSM6242 device

Hello,

the attached patch changes the MSM6242 RTC into a proper device.

--Dirk
2008-05-01 13:48:49 +00:00
Aaron Giles
04f54299af Couple of minor tweaks to sync with offline WIP work. 2008-05-01 08:53:23 +00:00
davidhay
f398a24db2 de-hack metro tilemaps... (lightly tested..) 2008-04-28 07:52:21 +00:00
Couriersud
fc1cb8d473 ay8910: Cosmetic
* bring more in line with coding standards
* add more comments
2008-04-27 00:26:41 +00:00
Couriersud
899c47f7b8 Fix AY-3-8910/YM2149 and derivatives envelope handling. 2008-04-26 18:57:15 +00:00
Nathan Woods
8d1c77366c MESS specific fix 2008-04-26 18:35:40 +00:00
Couriersud
0e77434bec Added DISCRETE_KEY_SALLEN_FILTER to discrete sound system 2008-04-25 08:42:13 +00:00
Aaron Giles
08c75151c7 Cleanups for 0.124u4. 2008-04-24 06:43:16 +00:00
Aaron Giles
6a955fc076 From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] Remove more Machine globals, #include "deprecat.h"

Hi mamedev,

The attached patch goes through and converts a number of Machine
globals to machine locals, and then removes #include "deprecat.h" if
appropriate.  The script that generated it is included, since the
patch itself is rather large and would have been time consuming to
produce otherwise.

The script doesn't convert cases of Machine that aren't in common
macros.  I'll try to tackle those later if someone doesn't beat me to
it.

~aa
2008-04-24 06:15:00 +00:00
Aaron Giles
737ff53930 From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] Eliminate assignments in conditionals

Hi mamedev,

Assignments in conditionals are never really needed in C and are
occasionally just plain bugs (== gets typed as =).  As such, it would
be good to remove these from MAME so that compilers that warn on this
construct can flag the likely bugs (MSVC does this for example).  The
attached patch does just that.  In addition, it refactors some
repeated code which had this in taito_f3.c into a couple macros. Using
inline functions would unfortunately have required more significant
changes, perhaps I'll tackle that another day.

~aa
2008-04-24 05:59:39 +00:00
Aaron Giles
38ee64ae77 From: Lei Wu [mailto:lanewu@hotmail.com]
Subject: fixed official mame bug #426 [Emuman]
2008-04-24 05:56:52 +00:00
Aaron Giles
14c852c8e9 Updated to use ACCESSING macros like memconv.h. 2008-04-24 05:53:47 +00:00
Aaron Giles
c205e10516 Fix 01742: punchout, armwrest + many vsnes.c and playch10.c games: Refreshspeed causes fatal exception in punchout. 2008-04-24 05:32:57 +00:00
Couriersud
b4fd76f158 ay8910.c:
* change DC offset for AY-3-8910 to 0.2V
* tones are now distinguishable again
galaxian.c:
* adjust "konami" sound volume
gyruss.c:
* adjust sound volume
2008-04-23 23:31:14 +00:00
Nicola Salmoria
e14a331553 increased Gyruss volume, changed UI to allow volumes higher than 2.0. 2008-04-23 07:47:23 +00:00
Couriersud
85a5a3d827 AY-3-8910 rewrite:
* adds a model to calculate mixing of channels with different resistance loads.
* based on above, each channel may be assigned a different load in individual case
  i.e. channels not tied together
* rewrote ay8910.c to make emulation simpler
* changed the config structure to include a flag field and output resistor loads.
* Updated all drivers affected.
* Added some "Todos" related to stuff I discovered when reading datasheets.
* Fixed a bug in disc_flt.c (konami filters)

galaxian.c:
* Fixed discrete sound and konami filter addressing
* Changed addressing of AY-3-8910 to be in line with schematics

gyruss.c:
* Added discrete sound for filtering ("konami"-style) and mixing.
2008-04-22 21:58:36 +00:00
Aaron Giles
cb8514a175 From: Miodrag Milanovic
Hello Aaron,
 
I have found few more things not ok in T11, this time I have fixed it myself.
 
1. HALT - should call interrupt vector
2. ILLEGAL - had PC=0 at the end which makes code not run fine
3. MARK - now it is implemented

Can you please check if your drivers are working fine with these cahanges.
 
After adjustments I have some things working finaly.
 
Please inform me,
 
Miodrag Milanovic
2008-04-21 03:41:51 +00:00
Aaron Giles
af71decdb7 D'oh, another accidental checkin. :) 2008-04-21 00:13:37 +00:00
Aaron Giles
ae4002a56d From: Corrado Tomaselli [mailto:corrado.to@tiscali.it]
Subject: ghost and goblins (italian bootleg, harder)

this is an italian bootleg with a really hard gameplay. it's quite 
impossible to say the truth ;)
pics of the board:
http://www.citylan.it/gngitaly/main%20PCB%20component%20side.jpg
http://www.citylan.it/gngitaly/roms%20PCB%20component%20side.jpg

New clones added:
Ghosts'n Goblins (Italian bootleg, harder)
2008-04-21 00:11:19 +00:00
Aaron Giles
5edbda88da From: Atari Ace
Subject: [patch] Fix 01711: connect4, mpu4met0, mpu4tst2, mpu4utst, bctvidbs: Using -CHEAT trigger causes a crash
Hi mamedev,

This patch fixes bug 01711.  Given the location of the original assert
it is clear the original code wasn't quite right.

~aa
2008-04-21 00:09:58 +00:00
Aaron Giles
9fb86da645 From: Atari Ace
Subject: [patch] Fix 00149: No error report for invalid BIOS setting.
Hi mamedev,

This small patch makes specifying an invalid bios a fatalerror and
removes the need to expose system_bios to the drivers by reworking the
code in playch10.c to determine its bios more directly (in other
words, it removes an ugly hack).  This should resolve bug 00149,
although I did not implement the popmessage as suggested.

~aa
2008-04-21 00:05:54 +00:00
Aaron Giles
e26f80fde0 (from Mariusz Wojcieszek)
Attached is diff which makes Touchmaster games playable.

General changes:
- Added preliminary 68681 DUART (machine\68681.c)
- Moved Microtouch touch screen controller emulation to separate module (machine\microtch.c)

New games added or promoted from NOT_WORKING status
---------------------------------------------------
Touchmaster [Mariusz Wojcieszek]
Touchmaster 3000 [Mariusz Wojcieszek]
Touchmaster 4000 [Mariusz Wojcieszek]
Touchmaster 5000 [Mariusz Wojcieszek]
Touchmaster 7000 [Mariusz Wojcieszek]
2008-04-21 00:00:55 +00:00
Aaron Giles
e91eb4007c Flipped the damn mem_mask. It is no longer inverted when passed to
read/write handlers. Updated all drivers accordingly. Hope I didn't
miss anything important!

Blame OG and smf for goading me into it. :)
2008-04-20 02:38:35 +00:00
Aaron Giles
9dd3f691ba Expanded the set of memory accessor functions. In addition to
direct byte, word, dword, and qword accessors for all bus sizes,
there are now masked word, dword, and qword accessors for all
bus sizes.

IMPORTANT: masks that are passed to the _masked_* functions are
NOT inverted. Although inverted masks are still passed to callback
functions, when you request a masked read or write the masks should
represent the bits you want.

Updated the various MIPS cores that use these functions to invert
their masks.
2008-04-19 19:09:24 +00:00
Wilbert Pol
446e65fb98 Changed the inline validity checks to work around GCC bug #35885. 2008-04-19 18:17:02 +00:00
Wilbert Pol
0d4aca282f Converted the ppi8255 implementation to a device. 2008-04-19 18:11:47 +00:00
Roberto Fresca
4b86e644f9 65C02/65CE02 CPUs and variants:
Fixed the 6502 family of disassemblers to show the correct bit to operate for BBR, BBS, RMB and SMB instructions.
2008-04-18 06:06:04 +00:00
Curt Coder
e8abef328c [CDP1869] Added a macro for the interface, and made write handlers optional. 2008-04-17 14:29:25 +00:00
Nathan Woods
c7c9bc1341 Fixed compilation error when using memory_install_read_handler() and
memory_install_write_handler()
2008-04-17 11:36:33 +00:00
Aaron Giles
b35c15fef5 Cleanups and version bump to 0.124u3. 2008-04-17 05:26:05 +00:00
Aaron Giles
2028ecc2f7 Removed ancient 720 kludge.
Added support in the T-11 core for an external vector via irq_callback.
Apparently the hardware actually did support this and it is necessary
for emulating the BK 0010/11 computer in MESS.
2008-04-17 02:58:24 +00:00
Aaron Giles
12836eea2c Created new macro: AM_RAM_WRITE(handler) which specifies a memory
range to be RAM-like for reads but calls the given handler for writes.

Replaced AM_READWRITE(SMH_RAM, handler) with AM_RAM_WRITE(handler).
Also replaced AM_RAM AM_WRITE(handler) with AM_RAM_WRITE(handler).
2008-04-16 14:38:12 +00:00
Aaron Giles
a7c928efaa Memory map merges. 2008-04-16 04:54:57 +00:00
Nathan Woods
212d7e36d4 Changed MESS's hooks used by natural keyboard support, eliminating MESS's need
for input_port_set_digital_value()
2008-04-16 01:43:37 +00:00
Aaron Giles
ffc326f8be Converted the IDE controller to a device. Updated all drivers
accordingly.

Added new functions for dynamically installing device memory 
read/write handlers.

Updated install_memory_XXX_handler() functions to take a machine
parameter. Updated all drivers accordingly.

Merged installation of read and write handlers where appropriate.

Simplified memory.c code for dynamic installation so that a single
function handles all the work; a NULL read or write handler 
indicates not to install anything for reads or writes.
2008-04-15 16:49:50 +00:00
Aaron Giles
71ca9ecec2 Switched subhandlers to using masks instead of shifts. Reduced the number
of stub handlers required as a result. Updated all drivers accordingly.
2008-04-15 06:39:34 +00:00
Curt Coder
e7cfe56749 [CDP1802] Added machine parameter and macros for the callback functions. This seems to have fixed the player sprite flashing in Destroyer/Altair/Draco. 2008-04-14 18:06:56 +00:00
Aaron Giles
7b97535eae Added support for using smaller-sized memory handlers directly in
memory maps. To do so, you either need to specify a shift amount 
(mapping to a particular subset of the bus) or SHIFT_PACKED, which
maps a single larger sized read/write down to multiple reads or
writes at the smaller size.

Removed word-sized handlers from 6821pia.c. Updated drivers that
needed them to use these new interfaces instead.

Updated gaelco3d.c and itech8.c to remove the need for memconv.h
by using this new feature.

Re-removed input_port_set_digital_value().
2008-04-14 16:47:02 +00:00
Nathan Woods
f9766f2052 Changes from MESS:
src/emu/cpu/m68000/m68kmame.c:
src/emu/cpu/minx/minx.c:
	- Fixed compilation errors on CPU cores not enabled in MAME
	
src/emu/inptport.c:
src/emu/inptport.h:
	- Readded input_port_set_digital_value() (which is needed for natural
          keyboard inpout in MESS)
	- Added a running_machine parameter to inputx_update()
2008-04-14 11:12:42 +00:00
Andrew Gardner
76e7b85e1f Finished memory map merge for W drivers.
Some whitespace touch-ups.
2008-04-13 18:02:50 +00:00
smf-
59b480f561 fixed calculation of bit 31 of GTE FLAG register, when writing to it directly.
added lm mode to OP and fixed the calculation.
added lm mode to SQR.
2008-04-13 16:02:16 +00:00
smf-
02b2ba8a6d fixed cross-hair update when the game is not polling the coordinates 2008-04-13 15:42:20 +00:00
Wilbert Pol
4725e2fa8e Fixed DA A instruction when A is > 0xF9. 2008-04-13 15:09:06 +00:00
Aaron Giles
842ed3efb0 Changed device read/write functions to take a const device_config *.
Reverted recent hacks to get around this and removed unnecessary casts.
2008-04-13 15:01:23 +00:00
Roberto Zandona
dfe1952883 fix an opcode in quizf1
fix dasm for bp+ix+offset8 and bp+it+offset8
2008-04-13 09:22:07 +00:00
smf-
6d87810b1f added sf/lm support to INTPL, improved flag calculation & calculates correct rgb
tidied up DPCS a bit.
2008-04-12 21:51:38 +00:00
Wilbert Pol
7fb79442c1 Changed the pic8259 implementation into a device. 2008-04-12 19:15:27 +00:00
smf-
d713e9cce6 tidied up DPCS, improved flag calculation and added support for lm/sf fields. 2008-04-12 18:08:27 +00:00
smf-
303caf3f8b removed casts and removed unnecessary decoding from NCLIP.
added signed values to PAIR & PAIR64.
renamed PAIR64.lw to PAIR64.q
2008-04-12 10:47:39 +00:00
R. Belmont
7544575aea Fix compile error on systems where time.h isn't automagically included. 2008-04-12 06:14:31 +00:00
Aaron Giles
439dbe872a Cleanups and version bump to 0.124u2. 2008-04-12 05:16:26 +00:00
Nathan Woods
9402f05a08 MESS specific fix 2008-04-12 03:41:30 +00:00
smf-
5f75c62fb9 fixed avsz3 & avsz4 flag & otz calculation. 2008-04-11 23:10:07 +00:00
smf-
5ed8b1252b fixed flag calculation in F macro. 2008-04-11 21:42:05 +00:00
smf-
22df06f724 fixed sign extension when inverting mem_mask. 2008-04-11 18:01:14 +00:00
Aaron Giles
58842fd57b Various tweaks/fixes from MAMEPlus:
* save state support for FD1094 chips
 * improved graphics in athena
 * improved sound balance in armedf
 * derived refresh rate for toaplan1 games
 * improved sound balance in tmnt games
 * derived clocks for suprridr
 * tweaked xmen visible area
 * derived clocks and refresh rate in twin16 driver
2008-04-11 14:25:38 +00:00
Aaron Giles
250e9056d5 From: Oliver Stoeneberg [mailto:oliverst@online.de]
Subject: change for cpunum_set_irq_callback() callback function

This patch adds the running_machine* parameter to the function passed 
into cpunum_set_irq_callback() and adds the IRQ_CALLBACK macro for 
the callback function.
2008-04-11 14:00:47 +00:00
Aaron Giles
ab2154804c From: Tomas Garcia-Meras Capote
Subject: Update for "Euro League (bootleg)"
Hello,
 some tiny updates for the driver wc90b.c :
 
-Added dumps for all GALs on the PCB
-Removed the second YM2203, it isn't present on the bootleg boards
-Changed the clocks according to the oscilators found on the board,
 the previous speeds were measured on a goal92 PCB, not using a real "Euro League" PCB.
-Added a new osc to xtal.h
 
If you need any info about this update, please mail me.
 
Regards: ClawGrip (Tomas Garcia-Meras)

--

Also merged memory maps [Aaron Giles]
2008-04-11 13:58:17 +00:00
Aaron Giles
dbb98c5473 Reduced the number of save state callback types from 3 to 1. The
only remaining form is the one that takes a pointer parameter.

Added macros for STATE_PRESAVE and STATE_POSTLOAD to define common
functions. Added machine parameter to these functions.

Updated all drivers and CPU/sound cores  to use the new macros 
and consolidate on the single function type. As a result pushed
the machine parameter through a few initialization stacks.

Removed unnecessary postload callbacks which only marked all tiles
dirty, since this is done automatically by the tilemap engine.
2008-04-11 05:41:46 +00:00
Roberto Zandona
e1a8ab0d1b fix dasm for rep instruction 2008-04-10 21:50:31 +00:00
Aaron Giles
4867aa38b9 Take two of the previous changes. I think this is a little simpler,
using masks instead of the generic byte/word/dword read functions.
2008-04-09 14:48:22 +00:00
Aaron Giles
b4e4b1d3f0 Oops, remove accidentally checked-in makefile changes. 2008-04-09 13:23:25 +00:00
Aaron Giles
eeee1cb437 Rewrote core memory handlers as inline functions. These should be easier to
trace through in a debug build, yet should operate the same as before.

Created a complete set of functions for all databus sizes (8,16,32,64) and
all endiannesses. A few functions are redundant, but it is now very clear
which functions to use in which scenarios. It is also now possible to rely
on being able to access values of 8, 16, 32 or 64 bits via the built-in
accessors without fear of crashing.

Updated all cores using 8-bit handlers to explicitly call the 8-bit handlers
with the appropriate endianness.

Fixed a few games which were calling n-bit handlers directly to use the
generic forms. In the future, this is all the access drivers will have.
2008-04-09 07:31:47 +00:00
Roberto Zandona
7800d2bb70 fix dasm for two code and prefix opcode in real time encryption 2008-04-08 22:39:28 +00:00
Wilbert Pol
8dcedabb57 Removed the hardcoded dependency on a 8254 device from the 8042kbdc code. Changed the drivers using the 8042kdbc to define their own 8042kdbc - 8254 dependency. 2008-04-08 18:35:48 +00:00
Nathan Woods
3364fdb2d8 Initializing device_config.machine to NULL 2008-04-08 00:30:56 +00:00
smf-
ee9ce122a9 removed useless casts in BLEZ/BGTZ 2008-04-07 23:49:48 +00:00
smf-
af97c741b3 fixed OTZ sign extension
fixed reading from SXYP
fixed reading from IRGB
fixed writing to LZCR
fixed sign extension of GTE control registers
fixed writing to FLAG

New games added or promoted from NOT_WORKING status
---------------------------------------------------
1 on 1 Government (JAPAN)
2008-04-07 23:20:31 +00:00
Roberto Zandona
486cdcb6b5 1) fix nec v30 dasm when a "real-time encrypted cpu" is used
2) fix Execution Clocks for add,addc,and,or,xor,cmp,sub,subc instruction
2008-04-07 22:30:52 +00:00
Wilbert Pol
35462b15c5 Changed the 8237dma implementation into a device. 2008-04-07 17:53:56 +00:00
Aaron Giles
bcb340612b Fixed bug that prevented the initial input port update from working properly. 2008-04-07 00:21:00 +00:00
smf-
4d21cff799 added IR1/IR2/IR3 saturation when calculating ORGB
fixed spelling mistake.
2008-04-06 22:48:25 +00:00
Aaron Giles
8a914b3d22 Renamed input port functions:
readinputport           -> input_port_read_indexed
  readinputportbytag      -> input_port_read
  readinputportbytag_safe -> input_port_read_safe

Added machine parameter to input port functions. Updated
many drivers to accomplish this.
2008-04-06 22:02:39 +00:00
smf-
be21ac9e08 fixed IRGB truncation and conversion to IR1/IR2/IR3 2008-04-06 21:38:25 +00:00
smf-
3d05dc8d91 fixed SZ0 truncation. 2008-04-06 21:12:02 +00:00
smf-
d485e8ed3c Fixed the SR masks for MTC0.
Added ability to test the instruction/data cache ram. The scratchpad and BIU register are now handled internally to the CPU.

All writes are performed with masks. SWL/SWR used to be implemented with two writes ( one byte and one word ) when writing three bytes, now it only ever performs one. Byte and Word writes use masks as they leave the rest of the register on the bus, which can be picked up by larger registers.

The read/write functions to use are cached when the SR bits are updated, as are the bad address masks.

Added coprocessor 1 & 3 support, though they don't do anything useful.

All loads now go through the delay pipeline, a lwl/lwr will grab the value out of the pipeline if it's updating the same register.

Added undocumented behaviour of BLEZ/BGTZ. The comparison for zero can be changed by specifying an alternate register in the RT field ( the documentation says you should always use register 0 ).

Restricted to 16 COP0 registers & generate an exception if any of the 5 for the MMU are used.

Added BCF/BCT instructions, although I have found no conditions that affect them yet.

Generates an exception if any MMU instructions are executed.

Sets the CE instruction for all exceptions, not just those involving a coprocessor. The bits of the opcode that specify the coprocessor are grabbed no matter what the instruction.

Added TAR register and BT bit in SR. When an exception occurs during a branch, BT determines whether it was taken or not. The TAR register gets set to the destination of the branch.

Fixed the BD bit when you are in a branch delay slot and you didn't take the branch, this shows up in the pipeline as !pc.

Fixed branches within a branch delay slot.

Multiply & divide instructions can be aborted if you write to HI/LO before reading the result.
Added data breakpoints, you don't appear to be able to set breakpoints on any of the addresses internal to the CPU.

Multiply/divide/GTE instructions can execute when an exception is taken, although the EPC indicates that it hasn't. The BIOS avoids rerunning GTE instructions as they are destructive, so you have to make sure they run.

Added bus error handling, PSXCPU is limited to 8mb of ram & any access outside this range will trigger an exception. I believe this is to be an internal limit.

Added CXD8611R as a specific CPU type, System 12 appears to allow more than 8mb of ram & it's possible that this is different.

Mapped out all instructions to either generate an exception or ignore bits.

Updated the disassembler to match the decoding.

Fixed disassembling of branch instructions in a branch delay slot.

Lui checks for a ori/addiu following and will show you the result.

Added step over/out support.

Fixed standalone disassembler.
2008-04-06 16:42:10 +00:00
Aaron Giles
830b8836fc 01609: Various - tested srmp4 (ssv.c), ttmahjng (route16.c), vsmahjng (vsnes,c), tokkae (konamigx.c), sf2 (cps1.c): INP playback loses sync quickly
Rewrote INP recording from scratch, since all old INPs are broken anyways.
Header now includes timestamp, which overrides the default time base for MAME's system time.
Each frame recorded now gets a timestamp.
Analog ports are recorded once per frame and interpolated.
Analog port calculations are all done in fixed point for consistent results.
A bunch of other minor tweaks in the input port code.

There may still be a few changes to the final INP format (considering adding 
NVRAM data directly in the INP file, for example....) but this at least seems
to work for the games I've tried.
2008-04-06 06:03:00 +00:00
Nathan Woods
8fcdf39e8e Added a temporary MESS specific hook 2008-04-06 01:19:15 +00:00
Couriersud
0d10d0df2c 00761: finalapr: Heavy performance hit.
Actually remove tilemap invalidating from tilemap_set_palette_offset (tilemap.c)
Following recommendation from Aaron added a comment to tilemap.h
2008-04-04 19:43:20 +00:00
R. Belmont
0dbbecd2b3 [SCSICD] Reverted previous change. 2008-04-04 17:05:53 +00:00
Aaron Giles
356d5dd812 Fixes 01659: stereo balancing is wrong
Apparently if you cast a negative number to a UINT32 at compile-time,
gcc does the "right thing" and saturates it to 0.
2008-04-04 14:17:56 +00:00
Aaron Giles
2c63abdad0 Actually fixed -refreshspeed. 2008-04-04 13:31:25 +00:00
Couriersud
0c79f46193 01663: Hat switches not working
All custom itemids were mapped to class SWITCH. With the recent modification, this implicitly changed to ABSOLUTE.
This fix will use the passed itemid to determine the class.
2008-04-04 07:38:35 +00:00
Nathan Woods
6498f1b8f2 Updated devconv.h to work with 0.124u1 2008-04-04 01:51:39 +00:00
Couriersud
2cfb327cbe Show a message if coin-lockout is active and coin x is pressed. 2008-04-03 15:37:45 +00:00
Aaron Giles
31336e491e Cleanups and version bump to 0.124u1. 2008-04-03 07:57:25 +00:00
Aaron Giles
efbe64428a Switched from ACCESSING_BYTE_*, ACCESSING_WORD_*, ACCESSING_DWORD_*
macros to ACCESSING_BITS_*_* macros.
2008-04-03 07:36:23 +00:00
Aaron Giles
ca3d7d01e6 From: Wilbert Pol
Subject: pit8253 device

I have converted the pit8253 implementation into a device. To make it  
easier to use I've also created a src/emu/devconv.h in the same style  
as src/emu/memconv.h.

I do not have all roms/disk images to test all drivers.  I have only  
been able to test pf2012, filetto, and topgunnr.
2008-04-03 05:26:47 +00:00
Aaron Giles
e621d87cfe From: Oliver Stoeneberg [mailto:oliverst@online.de]
Subject: MESS machine stuff

Another machine parameter added to a MESS function call.
2008-04-03 05:21:51 +00:00
Curt Coder
1859e012d2 - converted CDP1869 to the new device system
- refactored to represent how the hardware actually works
- added PMA latching on OUT5
- separated Cidelsa video to its own file
2008-04-02 14:43:06 +00:00
Curt Coder
12589d9abd More COP400 fixes:
- fixed serial timer
- fixed clocks
- fixed COP410 RMB3, XAD instructions
- general cleanup
2008-04-02 14:36:50 +00:00
Nathan Woods
36af5b18bc Tweaked the hooks that MESS has in the MAME initialization process 2008-04-02 10:59:32 +00:00
Aaron Giles
fa67773ba7 From: JEA Wallace [mailto:jeaw100@york.ac.uk]
Subject: Further ACIA changes

Added dynamic control of RX and TX pins to 6850 ACIA emulation - this is
needed for correct operation of the MPU4 Video communications system, 
and may be handy for some MESS systems. To use, set the rx and tx clocks
to 0 in the acia interface, then use acia_tx_clock_in() and 
acia_rx_clock_in() respectively.
2008-04-02 08:37:28 +00:00
Aaron Giles
35b88f45fe From: Oliver Stoeneberg [mailto:oliverst@online.de]
Subject: small change for MESS cleanup

This adds the "Machine" parameter to a MESS function call in MAME 
code to go along with Machine -> machine ckeanups in MESS
2008-04-02 08:34:24 +00:00
Aaron Giles
bddaca5de2 From: Oliver Stoeneberg [mailto:oliverst@online.de]
Subject: Machine -> machine cleanups

This patch changes "Machine" to "machine", when the runnin-machine 
parameter is already available. In some cases I could even remove the 
dprecat.h.

I will look for some occurances where it can be easily changed and 
afterward take a step at adding the running_machine parameter in a 
few places.
2008-04-02 08:33:06 +00:00
Aaron Giles
2a9d6c09bf Added missing #include. 2008-04-02 08:17:56 +00:00
Nathan Woods
ff3b615c69 Removing false assertion; NULL is also DEVICE_TYPE_WILDCARD 2008-04-02 01:39:31 +00:00
Couriersud
f4b7ad20e2 discrete sound system:
* Fix timing of stream_update in discrete_sound_w
  All sound cores update before processing changed data
* Add streeam_update to discrete_sound_r
* Now supports multiple output nodes per module. 
  There is the possibility to support multiple outputs per module.
  In this case, NODE_XXX is the default output. Alternative outputs may
  be accessed by using NODE_XXX_YY where 00<Y<08.
  
  You may also access nodes with macros:
  
      NODE_XXX = NODE_SUB(XXX, 0)
      NODE_XXX = NODE(XXX)
      NODE_XXX_YY = NODE_SUB(XXX, YY) with YY != 00 
      
  This should e.g. make discrete sound emulation easier
  when dealing with e.g. flip flops (Q & QQ) and binary counters

* added sanity checks to check consistency issues introduced by this change
* modules specify number of outputs ==> Certain special modules (WAVELOG) 
  may no longer be used as input nodes
* removed explicit (NODE_XX + expr) from a couple of drivers
2008-04-01 21:17:17 +00:00
Nicola Salmoria
a284b2fd9e fix tilemap viewer to draw the whole tilemap when categories are used 2008-04-01 16:01:34 +00:00
Nathan Woods
68db1ed583 Typo fix 2008-04-01 01:24:10 +00:00
R. Belmont
2a869f8673 Various SCSI devices register state items by their disk ID, which are not unique across device types. This introduces a device-type offset for CD-ROMs so their registrations don't clash with harddisks. 2008-03-31 03:04:34 +00:00
smf-
6c238b4395 Fixed state loading now that the digital i/o board's serial number has been changed to a const by not saving it. As the serial number cannot be changed at run time it was rather pointless. I can only imagine I did it so you could hack the state file instead of having to recompile, though it should probably load it from an external file so you can supply your own. 2008-03-30 22:37:06 +00:00
Nathan Woods
52f6db9e2b MESS specific change; part of MESS' device changeover 2008-03-30 17:14:03 +00:00
Couriersud
cac4d00e7d Add ITEM_IDs for additional axes and switches
Add ITEM_IDs for up to 4 hats/POVs
2008-03-30 14:28:08 +00:00
smf-
ad4ef5d256 New macros added for checking mem_mask. ACCESSING_BYTE_n, ACCESSING_WORD_n & ACCESSING_DWORD_n. These check for any access within the bounds, currently the pattern for checking whether both bytes of a word is written is to make two byte checks ( this pattern existed before because there was no macro for testing a 16 bit word, though you could have used ACCESSING_LSW32 ).
All occurrences of ACCESSING_LSB, ACCESSING_MSB, ACCESSING_LSB16, ACCESSING_MSB16, ACCESSING_LSB32, ACCESSING_MSB32, ACCESSING_LSW32, ACCESSING_MSW32 & simple mem_mask checks have been replace with the new macros.
The old macros are gone.
2008-03-30 09:19:23 +00:00
R. Belmont
40f3c081f4 [AICA, SCSP] Fixed encoding/decoding of negative denormal floats in the DSP. Shouldn't actually affect any games. (kingshriek, Deunan Knute) 2008-03-30 00:12:07 +00:00
Couriersud
4e4c63ba21 Added NODE(x) macro to avoid avoid (NODE_00 + 3) in code. 2008-03-29 23:06:29 +00:00
Couriersud
6a8fa36bcc adds DISCRETE_RCFILTER_SW to discrete sound
* this implements multiple RC networks with CD4066 switches to connect/disconnect capacitor
2008-03-29 21:10:06 +00:00
Nathan Woods
1e57031838 MESS-specific changes; mame.h no longer include's MESS's device.h 2008-03-29 14:46:37 +00:00
Curt Coder
e241656170 Reverted to old execute, new broke more than it fixed. 2008-03-29 14:13:09 +00:00
Curt Coder
6bdcdb0769 Removed debugging code. 2008-03-29 12:18:41 +00:00
Curt Coder
d23a72d1cd Rewrote the COP400 execute function. 2008-03-29 12:17:59 +00:00
Phil Bennett
ed397c466a 1. Added driver for JPM 'Give us a Break' hardware, supporting:
* Give us a Break [2 sets]
* Ten Up [2 sets]
Neither are playable; they don't register coins for some reason.

2. Fixed interrupt handling and 16-bit memory accessors in 6840ptm.c
Also cleaned up code for the sake of readability.

3. JPM games now have their own object archive file.
2008-03-29 01:35:02 +00:00
Aaron Giles
6350ab3302 Minor cleanup and simplification. Removed palette_config(). 2008-03-28 18:59:31 +00:00
Aaron Giles
c5335ee5d4 Fixed compile error in MSVC. 2008-03-28 18:32:09 +00:00
Curt Coder
cb38b8b0d5 - implemented interrupt
- implemented serial input/output
- fixed XAD/LDD, XIS1, RMB3 opcodes
- fixed clock divider
- fixed internal memory map size
- added some cpu variants

As a result, Draco at least initializes the AY-8910 now.
2008-03-28 16:10:23 +00:00
Aaron Giles
4821d456dd Fixed:
- 01622: [Core] -refreshspeed has no effect (aaron) - Resolved.
2008-03-28 10:10:21 +00:00
Aaron Giles
ec36f9c06f Converted special-case DIP switches (service, unknown, unused) into their
own token type rather than expanding into other tokens. The reduces the
number of redundant strings and data.
2008-03-28 00:04:22 +00:00
Aaron Giles
984380354e Added fatal error if AM_READ_PORT() references a non-existent port. 2008-03-28 00:03:25 +00:00
smf-
5ed703d6d5 fixed another bug in new debug hook code, data wasn't shifted properly in all cases. 2008-03-27 21:04:02 +00:00
smf-
07459e6491 Passes mem_mask to the read and write debug hooks. This allows the address & size of the memory access to be correctly calculated when using a memory call that takes a mem_mask. Unexpected results will occur if you pass in a mem_mask that has a gap in. For example 0x00ff00ff is treated as a 3 byte operation, a watchpoint for the gap will still trigger. To simplify the mem_mask decoding it is inverted before passing to the debugger. 2008-03-27 20:23:36 +00:00
smf-
7d38bf085f reverted, I misunderstood something and it's broken. I'm on it. 2008-03-27 19:56:24 +00:00
smf-
8b7582a477 Passes mem_mask to the read and write debug hooks. This allows the address & size of the memory access to be correctly calculated when using a memory call that takes a mem_mask. While testing I found that the address had already had it's lower bits masked out, so watch points were broken already. Unexpected results will occur if you pass in a mem_mask that has a gap in. For example 0x00ff00ff is treated as a 3 byte operation, a watchpoint for the gap will still trigger. To simplify the mem_mask decoding it is inverted before passing to the debugger. 2008-03-27 19:22:20 +00:00
Couriersud
1355872b9a Fix cfg file corruption if joystick is not connected
* itemclass now part of token if item is not found

Settings for joysticks which use a custom item id will still be lost. A fallback has to be provided here since those will use a token generated from the input item name.
2008-03-26 19:06:24 +00:00
Nathan Woods
ec82be4ab3 Removed a MESS-ism 2008-03-26 02:57:08 +00:00
Aaron Giles
a070ad63d8 Fix for incorrect sound bug in 0.124. 2008-03-25 03:24:21 +00:00
Luca Elia
757d289163 Driver for Astro Corp. hardware.
New game:

- Show Hand (roms/current/s/showhand.zip)
2008-03-24 18:29:07 +00:00
Aaron Giles
9476c50ee6 Cleanups for 0.124. Marked Mermaid as working per checkin comment. 2008-03-24 04:07:46 +00:00
Aaron Giles
126d821654 From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] Minor static/const/include fixups

Hi mamedev,

Another batch of minor static/const/include fixes.  Very boring, very
pedantic.  ;)

~aa
2008-03-24 01:51:12 +00:00
Aaron Giles
e04bb4f699 From: Lei Wu [mailto:lanewu@hotmail.com]
Subject: MSVC9 fix [Emuman]

the original macro is too long, which caused a MSVC9 internal compiler error
2008-03-24 01:36:47 +00:00
Aaron Giles
d77d9fdb64 Added validity check to ensure input port tags don't have duplicates.
Fixed several drivers where there were duplicates.
2008-03-24 01:33:12 +00:00
Aaron Giles
abda9cf18b Undid recent change to remove pen lookups in 16bpp modes. This code
is shared between INDEXED16 and RGB15 rendering and we're not ready 
to remove the lookups yet.
2008-03-24 01:20:39 +00:00
Zsolt Vasvari
c27dfa66fa Added mc6845_set_hpixels_per_column() for the Hercules gfx adapter 2008-03-23 15:24:56 +00:00
Aaron Giles
9f4e71d8b3 From: Duke [mailto:startaq@gmail.com]
Subject: Unnecessary assert in video.c

The assert

assert(machine->config->devicelist != NULL);

in video.c causes the MESS mk1 driver to fail because it doesn't have
any devices - no screens and no sound devices. It works fine when the
assert is removed.

--Dirk
2008-03-23 13:48:43 +00:00
Nathan Woods
0fd62f5d4f Added a machine_config* parameter to certain MESS specific hooks 2008-03-23 11:32:46 +00:00
Zsolt Vasvari
ffaddce8f4 Adds the 'static' as per AtariAce, but he screwed up the alignment of an important table :(, which is why I am sending it myself 2008-03-23 05:26:19 +00:00
Zsolt Vasvari
dc01a6b148 - Converted crystal.c from RGB32 to INDEXED16
- Added PALETTE_INIT( RRRRR_GGGGGG_BBBBB )
2008-03-23 02:41:49 +00:00
Nathan Woods
bbecd3b886 MESS-specific: Interim change in the process of changing over to MAME's device
system
2008-03-22 22:26:25 +00:00
Zsolt Vasvari
8fcc91c77f Added option to programatically set the clock pin. This is needed by at least one MESS driver 2008-03-22 09:49:45 +00:00
Zsolt Vasvari
d2b44c842f DGPIX: Converted to INDEXED16
Removed temp bitmaps
       Changed ugly recursive video RAM code

DDZ:   Removed RGB15 -- it's a "skeleton" driver, so why have it?

video\generic.c: Added PALETTE_INIT(RRRRR_GGGGG_BBBBB) and PALETTE_INIT(BBBBB_GGGGG_RRRRR)
2008-03-22 06:05:05 +00:00
R. Belmont
20e3fa7eb1 [SCSI] Fixed case when no device exists (e.g. running the sys573 BIOS directly). 2008-03-22 03:55:23 +00:00
Aaron Giles
509dc4c064 De-deprecat-ed ui.c.
Changed xmlfile.c to pass in memory handlers to expat so that
our memory overrides are properly managed.
2008-03-21 14:51:26 +00:00
Zsolt Vasvari
5cd63ef3de Fix 01557: dealem: Assertion 2008-03-21 00:25:13 +00:00
Aaron Giles
b28f2c2504 Explicitly fixed unmapped handler masks so that we don't report
all unmapped addresses as 0.
2008-03-20 14:16:00 +00:00
Curt Coder
bc8eb54a5e Cleaned driver up to the latest spec. 2008-03-19 21:55:16 +00:00
Nicola Salmoria
72889926e1 Added Noise Output to the MSM5232 emulation
Added placeholder effects for cymbal and hihat to equites.c. These will need further work to properly emulate the discrete circuitry.
2008-03-19 09:35:57 +00:00
Aaron Giles
4a5001927c Cleanups and version bump. 2008-03-19 08:52:53 +00:00
Aaron Giles
4967410073 From: Oliver Stoeneberg [mailto:oliverst@online.de]
Subject: SH-4 debugger output fix

This patch fixes "garbage" (newlines) in the debugger window when 
debugging the SH-4 CPU.

It also conatins a small comment fix in video/playch10.c and the 
removal of some yet unused or just obsolete macros in emu/cpuint.h.
2008-03-19 08:38:01 +00:00
Aaron Giles
5807e98052 Removed excessive assertions in the device_list code -- it is ok to pass
a NULL list head (in which case you have an empty device list). All the
code works fine with a NULL head and returns appropriate values. Removed
changes to video_screen_count() and video_screen_first() which were added
to work around this behavior.
2008-03-19 08:15:37 +00:00
Aaron Giles
d75b3d1dff Added return value to video_screen_update_partial() indicating whether
or not the VIDEO_UPDATE was called as a result.

Modified amiga.c to use this information so that we guarantee a call
to amiga_render_scanline() regardless of the video state.

Fixes 01521: ar_sdwr: Game hangs on title screen
2008-03-19 07:58:51 +00:00
Zsolt Vasvari
772311642a Removed unneeded pen lookups.
Some code formatting clean-up.
2008-03-18 08:34:01 +00:00
Nicola Salmoria
23a0601055 Alpha Denshi major update
This is still WIP bug I've been working on it for sveral weeks and I want to get it out before leaving for holidays.

- Fixed Alpha 8201/830x MCU simulation.
  - all hacks from the equites driver removed
  - fixed equites restart position after going underground
  - fixed hvolume, splndrbt 2 players
  - removed hacks from exctsccr2
  - fixed CPU gameplay in shougi

- Gekisou promoted to working

- added dump of Alpha 8201 MCU to games that use it (the ROM isn't used yet, HMCS44 CPU core needs to be written first)

- major cleanup of the mess in equites.c:
  - many thanks to Corrado Tomaselli for precious hardware info.
  - implemented bg perspective scrolling using PROMs
  - fixed sprite flip & disable
  - fixed bg color
  - converted bg to tilemaps
  - fixed fg banking
  - fixed screen flip
  - removed meaningless banking of player inputs
  - added UI adjuster for MSM5232 frequency
  - MSM5232 volume control

- fixed MSM5232 noise LFSR formula (done by Jarek Burczynski; thanks to Corrado Tomaselli for samples)

- changed MSM5232 emulator to output channels separately

- added output of SOLO channels to MSM5232 emulator.

- mametesters bugs fixed:
  - 00217 splndrbt: On boot the pcb displays a clean light blu screen while in mame there is a black road. 
  - 00220 splndrbt: Concerning the gfx, on the pcb the background is not linear as shown in mame.
  - 00223 splndrbt: On the first level when you pass the asteroid belt the star road should be light blue instead of black like mam 

- fixed champbas inputs

- merged talbot with champbas, some driver clenaup

- fixed shougi inputs

- switched exctsccb to use the correct gfx ROMs (matches screenshot found in 01058 exctsccb: Exciting soccer bootleg should be placed in champbas.c.)

- fixed sprite bpp in exctscrr, removed the horrible hacks that were used to fix colors and transparency.

- fixed sound clipping in exctsccr
2008-03-17 19:07:23 +00:00
Aaron Giles
e4e17a4fcd Fix 00150: alpinr2b, alpinesa : Assertion with -debug 2008-03-17 16:51:19 +00:00
Aaron Giles
91bc82c487 Better multisession fix. Reverted previous change (1002) and simply
initialize the digital joystick state in input_port_init().
2008-03-17 16:36:26 +00:00
Aaron Giles
ec550fa07b Fixed pick_best_mode in both d3d and ddraw cases to manually extract
refresh information from the device's inline_config, since this is
done before the screen devices are start. Fixes 01491: switchres 
causes Exception at EIP=009413BF: ACCESS VIOLATION.

Also, fixed render_target_get_minimum_size() to return nominal values
if no screens are found.
2008-03-17 15:50:12 +00:00
Aaron Giles
75056eb1b5 Moved per-screen initialization into DEVICE_START and per-screen cleanup
into DEVICE_STOP.
2008-03-17 15:38:18 +00:00
Aaron Giles
7a0931f08d Fix chicken and egg problem with device_start callbacks.
Added DEVINFO_INT_TOKEN_BYTES, which is queried before device
startup. It should return the size of the structure that will
be hung off of device->token. It must not return 0.

Changed the core device interface to allocate and zero a block
of memory the size of DEVINFO_INT_TOKEN_BYTES before calling
device_start. The pointer to this memory is already attached
to device->token at the time device_start is called.

The primary motivation for this is to allow the device_start
function to make internal calls and pass the device_config *
around as if the object were fully constructed. Since the token
is used to indicate whether or not a device is live, this makes
the device "live" at the time device_start is called rather
than after it completes.
2008-03-17 15:23:07 +00:00
Zsolt Vasvari
c7b072564c Restores the previous verifyroms() code. Left verifysamples() untocuhed for now. 2008-03-17 15:21:07 +00:00
Aaron Giles
ce011916b4 Made it a fatalerror to registr save state callbacks at the wrong time
if the current driver claims to support save states.
2008-03-17 14:45:27 +00:00
Nathan Woods
6a7c3d1589 Added a crosshair_set_screen() to allow drivers to control which screen(s) on
which crosshairs are displayed.
2008-03-17 12:47:22 +00:00
Nathan Woods
e7508371ed Fix for screenless (and deviceless) systems - this fix assumes that it is
illegal to pass a NULL listhead to device_list_first() and that the assert there
should stand.  Please review and correct if appropriate.
2008-03-17 10:52:16 +00:00
Zsolt Vasvari
c031746599 Fix: 01538: -verifysamples: Inconsistent handling of missing sample sets
I applied the same fix to verifyroms.  Now a status message is printed for every sample/ROM set regardless if an individual or all the sets are audited.
2008-03-17 09:19:11 +00:00
Zsolt Vasvari
9eb278b911 Fixed memory leak 2008-03-17 08:56:10 +00:00
Zsolt Vasvari
b78ff83cd0 Fix: 01529: AICA memory leak 2008-03-17 00:58:24 +00:00
Zsolt Vasvari
c230321cdc The on-screen "Reset by watchdog" message only appears in debug builds 2008-03-17 00:44:00 +00:00
Pierpaolo Prazzoli
0895d395a9 Added missing prototype for get_info function. It didn't compile. 2008-03-16 10:43:36 +00:00
Zsolt Vasvari
cb3fffef61 Missing semicolon -- how did it even compile? 2008-03-16 04:34:19 +00:00
Zsolt Vasvari
c64886cc69 Fix: 01499: Various Drivers: Launching games from in-game [TAB] menu 2-3 times in a row throws access violation.
My fix is a bit heavy handed.  The real access violation happens in update_digital_joysticks() after the comment "read all the associated ports" and before the next comment
2008-03-16 04:31:40 +00:00
Zsolt Vasvari
c66bb0adc5 Fix: 01530: Various Drivers: bitmap memory leaks 2008-03-15 14:14:03 +00:00
Zsolt Vasvari
16e18f24af Fixed: 01508: most vector-based drivers: Assertions 2008-03-15 09:32:24 +00:00
Zsolt Vasvari
f61e037749 Fix 01526: futflash, laserbas, laserbsa: Assertion
Fix 01524: btoads: Assertion 
Fix 01523: nkdodge, nkdodgeb, spdodgeb: Assertion 
Fix 01522: all ddragon.c drivers: Assertion 
Fix 01528: pzlestar, sexyboom: Assertion 
Fix 01527: all meritm.c drivers: Assertion
2008-03-15 03:54:44 +00:00
Zsolt Vasvari
3512bc695d Changes MDRV_TIMER_DURATION to MDRV_TIMER_START_DELAY
Renames duration to start_delay in timer_adjust_periodic() as well
Moves MDRV_ macros into proper header files
2008-03-15 03:13:57 +00:00
Nathan Woods
81fcbd9a2c MESS-specific changes 2008-03-15 00:14:32 +00:00
smf-
5d52f08b7e fixed collision of TIMER define 2008-03-14 21:53:19 +00:00
smf-
a0afb4c516 fixed collision of TIMER define 2008-03-14 21:50:22 +00:00
smf-
b4418ff847 fixed unused variable warnings when assert is not enabled. 2008-03-14 21:35:36 +00:00
Zsolt Vasvari
d4893e2535 Makes suggested changes to MDRV_TIMER macros. Hasn't moved them yet. 2008-03-14 15:13:46 +00:00
Zsolt Vasvari
e4a07ea688 Implements scanline based timer devices.
Converted Centipede, as an example.

To define a scanline timer, use something like this:

MDRV_TIMER_ADD("32V", SCANLINE, generate_interrupt)
MDRV_TIMER_SCANLINE("main", 0, 16)

The first number is the first scanline the timer will fire on, the 2nd number is the increment.
So in this case, the timer will fire on 0, 16, 32, ..., 224, 240, then wrap around
because the screen is defined as 256 lines high.
The current scanline is passed to the callback in its 'param' argument
2008-03-14 11:15:31 +00:00
Zsolt Vasvari
e42b02f565 Implements the periodic timer device functionality 2008-03-14 09:52:28 +00:00
Aaron Giles
8fcd45cab1 Renamed *_vbl_cb to *_vblank_callback.
Fixed 01475: Screenless systems are broken because of a vblank callback.
We now create an artificial update mechanism when there are no screens.
2008-03-14 05:19:53 +00:00
Zsolt Vasvari
c0ca716e62 Added skeletion device interface for timers. Just wanted to get feedback.
- Where applicable, added a parallel set of timer functions that take a device_config instead of emu_timer:
	void timer_device_adjust_oneshot(const device_config *timer, attotime duration, INT32 param);
	void timer_device_adjust_periodic(const device_config *timer, attotime duration, INT32 param, attotime period);
	void timer_device_reset(const device_config *timer, attotime duration);
	int timer_device_enable(const device_config *timer, int enable);
	int timer_device_enabled(const device_config *timer);
	int timer_device_get_param(const device_config *timer);
	void *timer_device_get_param_ptr(const device_config *timer);
	attotime timer_device_timeelapsed(const device_config *timer);
	attotime timer_device_timeleft(const device_config *timer);
	attotime timer_device_starttime(const device_config *timer);
	attotime timer_device_firetime(const device_config *timer);

- Added MACHINE_CONFIG macros:
	MDRV_TIMER_ADD(_tag, _type, _callback)	/* type can only be PERIODIC right now (can scanline based later, or even NE555) */
	MDRV_TIMER_REMOVE(_tag)
	MDRV_TIMER_MODIFY(_tag)
	MDRV_TIMER_TYPE(_type)
	MDRV_TIMER_CALLBACK(_callback) 
	MDRV_TIMER_DURATION(_duration)
	MDRV_TIMER_PERIOD(_period)
	MDRV_TIMER_PARAM(_param)
	MDRV_TIMER_PTR(_ptr)

- Modified Space Encounters to create two timers and use those:

	MDRV_TIMER_ADD("STROBE_ON", PERIODIC, spcenctr_strobe_timer_callback)
	MDRV_TIMER_PARAM(TRUE)	/* indicates strobe ON */
	MDRV_TIMER_PERIOD(UINT64_ATTOTIME_IN_HZ(SPCENCTR_STROBE_FREQ))

	MDRV_TIMER_ADD("STROBE_OFF", PERIODIC, spcenctr_strobe_timer_callback)
	MDRV_TIMER_PARAM(FALSE)	/* indicates strobe OFF */
	MDRV_TIMER_DURATION(UINT64_ATTOTIME_IN_HZ(SPCENCTR_STROBE_FREQ * 100 / SPCENCTR_DUTY_CYCLE))
	MDRV_TIMER_PERIOD(UINT64_ATTOTIME_IN_HZ(SPCENCTR_STROBE_FREQ))
2008-03-14 00:27:07 +00:00
Aaron Giles
a6b4a6ad50 Cleanups and version bump to 0.123u5. 2008-03-13 16:21:46 +00:00
Aaron Giles
4d5014585a From: Fabio Priuli
Subject: small fix to cpu.mak

Attached please find a small patch to include M68000 CPU only when you're 
compiling a build with the M68K. this is needed to e.g. compile tiny 
builds .
2008-03-13 15:45:39 +00:00
Aaron Giles
3a082a644f From: notaz [mailto:notasas@gmail.com]
Subject: patch for SVP (Sega Virtua Processor) emulation

hello,

this patch adds support for Sega Virtua Processor, to run
Genesis/MegaDrive version of Virtua Racing, intended to be used by
MESS. It consists of a CPU core SSP1601, and updates in megadriv.c:
* SSP1601 replaces SSP1610, as it has been confirmed by Stiletto and
other sources that SVP actually contains SSP1601. The current SSP1610
is placeholder only (nearly completely unimplemented) anyway.
* Changes in megadriv.c add a new driver for Genesis/MegaDrive+SVP
combination, also add SVP memory controller logic and memory map.

The diff has already been reviewed by Reip and SSP1610 removal was one
of his suggestions (SSP1610 is not used by any drivers).
2008-03-13 15:35:17 +00:00
Aaron Giles
9d3f7f8680 From: Mariusz Wojcieszek
Attached is update for Merit hardware based on V9938 (CRT-250 and CRT-260 - meritm.c).

New playable games:

Pit Boss II
Super Pit Boss
Pit Boss Megastar
Megatouch IV
Megatouch IV Tournament Edition
Megatouch 6
2008-03-13 15:04:33 +00:00
Zsolt Vasvari
70eeb9ff23 - Removes the public screen_state object -- all access is via functions
- Removes screen[] object from running_machine
- Removed MAX_SCREENS constant -- there is no longer a hardcoded upper bound
2008-03-13 08:25:21 +00:00
Aaron Giles
dbd6e5e93e Fixed 68000 prefetching operation.
Changed slapstic management to always install an opbase handler to more
aggressively catch code executing in the slapstic region. Updated all
drivers to separate the slapstic region of ROM into a different ROM
section from the fixed ROM.
2008-03-13 08:09:58 +00:00
Zsolt Vasvari
9626c879db video_screen_get_vblank() was also incorrect for games with MDRV_SCREEN_VBLANK_TIME, this could easily explain a bunch of changed screenshots. 2008-03-12 12:19:43 +00:00
Zsolt Vasvari
4bd4eceb06 Forgot to state save a variable 2008-03-12 11:47:57 +00:00
Zsolt Vasvari
839e3f073c Fixed VBLANK end time computation -- it wasn't taking into account games that use MDRV_SCREEN_VBLANK_TIME
Aaron, could you please double check what I did?
2008-03-12 11:43:31 +00:00
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
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
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
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
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
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
Couriersud
19331ed134 Remove (UINT32) type casts which break build with mingw - again 2008-03-05 22:49:38 +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
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
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
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
793cf2e715 VBLANK based watchdogs can be disabled once again
Removed debugging fprintf
2008-03-05 04:20:01 +00:00
Zsolt Vasvari
34b3ab9841 Added running_machine* to the CUSTOM_INPUT callback - updated drivers to use it 2008-03-03 05:17:57 +00:00
Zsolt Vasvari
62466dd08f - Added PORT_CHANGED macro which calls a callback if the given port changes.
Usage is very similar to PORT_CUSTOM.  See the Astro Invader driver for an example
- Removed input_port_set_changed_callback and converted all users to PORT_CHANGED
  The only difference between the old callback and the ones supplied by PORT_CHANGED is
  that values passed by PORT_CHANGED are normalized to start at bit 0, just like
  PORT_CUSTOM.
2008-03-03 04:10:51 +00:00
Aaron Giles
e31f9a6313 Normalized function pointer typedefs: they are now all
suffixed with _func. Did this throughout the core and
drivers I was familiar with.

Fixed gcc compiler error with recent render.c changes.
gcc does not like explicit (int) casts on float or
double functions. This is fracking annoying and stupid,
but there you have it.
2008-03-03 01:51:31 +00:00
Zsolt Vasvari
05702939cd Removed used srcnum from ccpuRegs
State saves more stuff -- wasn't 100% sure if they are all needed saved, but it appears they do.
2008-03-03 01:22:21 +00:00
Aaron Giles
8042e50f87 Added video_screen_get_time_until_vblank_end() and
video_screen_get_time_until_update().

Fixed CCPU and QB3 to no longer rely on cpu_scalebyfcount().
Fixed busted timing in the CCPU core. Changed watchdog to
count internally rather than using external watchdog support.
Altered CCPU to accept interrupt signals from the driver.
Updated clocks in the cinemat driver to be derived from the
clock crystal.
2008-03-03 01:02:16 +00:00
Zsolt Vasvari
713f03885f MC6845: Added support for the Commodore 6545-1 device type
Added support for the status register
Pops up message if display mode is not zero
some minor clean-ups
2008-03-02 23:25:35 +00:00
Couriersud
490713dea8 render.[ch]: change type of target_orientation in target_compute_visible_area to int for consistency with other calls. 2008-03-02 22:21:54 +00:00
Couriersud
e8c24a40d9 Changed z80dma to new device interface, updated mario.c and dkong.c to use new interface
* Illustrates how to keep existing memory read/write handlers
  This is slower than caching the device interface, but does not have an impact on
  devices accessed at a low frequency like in this case.
2008-03-02 15:40:24 +00:00
Zsolt Vasvari
1a0ccf8101 tp84: Replaces sprite multiplexing hack with video_screen_update_now() on sprite RAM write
General driver clean-up
tilemap.h:  Deletes no longer applicable comment
2008-03-02 13:26:10 +00:00
Zsolt Vasvari
2ddf3da8dd - Watchdog gets its own namespace for state saving
- Corrected some comments
2008-03-02 03:39:43 +00:00
Zsolt Vasvari
c7a0a7942f Moves watchdog processing logic into its own module 2008-03-02 03:32:54 +00:00
Zsolt Vasvari
56ad71eccf Some more #includes's removed 2008-03-02 02:50:21 +00:00
Zsolt Vasvari
9adda05850 Removes unneeded #includes 2008-03-02 02:43:26 +00:00
Zsolt Vasvari
807d71db76 Removes cpu_getcurrentframe() and replaces it with video_screen_get_frame_number(int scrnum)
Updates all callers
2008-03-02 02:38:20 +00:00
Couriersud
7df031fb4f Rewrote some potentially compiler specific code:
* added ATTR_FORCE_INLINE to osdcomm.h
* added ATTR_NONNULL
* moved U64 S64 fram mamecore.h to osdcomm.h
* define SETJMP_GNUC_PROTECT() in osdcomm.h for use in ppc602, ppc603
2008-03-02 00:35:58 +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
Zsolt Vasvari
7198a00e65 - Moves all video timing logic from cpuexec.c to video.c
- Added a video_screen_register_vbl_cb() function for registering VBLANK callbanks
- Changed inptport.c and debugcpu.c to make use the VBLANK callbacks
- Added video_screen_get_time_until_vblank_start()
- CCPU and anything using cpu_scalebyfcount() are currently broken
- I did some fairly extensive testing, but this is a very signficant internal change,
  so some things may have broke
2008-03-01 15:50:12 +00:00
Couriersud
e90a92697c * Wrapped unused code in "#ifdef UNUSED_FUNCTION" 2008-03-01 11:29:29 +00:00
Couriersud
7ce83ee92b memory.c: removed further code never to be executed
* removed "return 0" from READWORD & READWORD16/32/64/MASKED since it is unreachable
2008-03-01 11:25:57 +00:00
Aaron Giles
b8a64773fd Added macros to define device functions. Updated existing devices
to use the macros.

Added the concept of device classes. Devices specify their class
in their get_info function. Classes can be used to walk through
devices at a more general level than their type. Functions have
been added to iterate through devices by class just as you can
by type.

Removed some unused fields from device_config.
2008-03-01 08:41:56 +00:00
Zsolt Vasvari
2fba8bdb8a - Removes a couple of unused items from the cpuexec_data structure
- Adds one more validty checks -- screenless drivers cannot have a VBLANK
2008-03-01 05:30:22 +00:00
R. Belmont
cd802cf4d1 [AICA] Better (not perfect) slot monitoring. (kingshriek) 2008-03-01 03:28:18 +00:00