Commit Graph

504 Commits

Author SHA1 Message Date
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