Commit Graph

1150 Commits

Author SHA1 Message Date
Aaron Giles
517a24c0ef Robustified key behavior when the debugger is visible. Should now
properly ignore the "break into debugger" keypress and not allow
related characters to filter through. Removed some hacks related to
making that work in the past.

Changed osd_wait_for_debugger() to take a machine parameter and a
"firsttime" parameter, which is set to 1 the first time the function
is called after a break. The Windows debugger uses this to ensure
that the debugger has focus when you break into it.
2008-07-17 16:09:52 +00:00
Aaron Giles
5244807bf3 Cleanups. 2008-07-17 08:09:52 +00:00
Aaron Giles
b5f2aa1240 Changed direct access EEPROM interface to return the "bus width" of the
EEPROM data, and the size is in terms of units, not bytes. Updated all
drivers accordingly.

Changed the ROM loading code to actually alter the region flags based
on the CPU endianness and bus width when creating the region, rather
than fixing them up on the fly. This means that callers to
memory_region_flags() will get the correct results.

Changed the expression engine to use two callbacks for read/write rather
than relying on externally defined functions.

Expanded memory access support in the expression engine. Memory accesses
can now be specified as [space][num]<size>@<address>. 'space' can be
one of the following:

   p = program address space of CPU #num (default)
   d = data address space of CPU #num
   i = I/O address space of CPU #num
   o = opcode address space of CPU #num (R/W access to decrypted opcodes)
   r = direct RAM space of CPU #num (always allows writes, even for ROM)
   e = EEPROM index #num
   c = direct REGION_CPU#num access
   u = direct REGION_USER#num access
   g = direct REGION_GFX#num access
   s = direct REGION_SOUND#num access

The 'num' field is optional for p/d/i/o/r, where is defaults to the
current CPU, and for e, where it defaults to EEPROM #0. 'num' is required
for all region-related prefixes. Some examples:

   w@curpc = word at 'curpc' in the active CPU's program address space
   dd@0    = dword at 0x0 in the active CPU's data address space
   r2b@100 = byte at 0x100 from a RAM/ROM region in CPU #2's program space
   ew@7f   = word from EEPROM address 0x7f
   u2q@40  = qword from REGION_USER2, offset 0x40
   
The 'size' field is always required, and can be b/w/d/q for byte, word,
dword, and qword accesses.
2008-07-17 08:07:12 +00:00
R. Belmont
b859963772 SH2DRC: cleanups and tweeks from Aaron's suggestions. 2008-07-17 03:46:51 +00:00
R. Belmont
847b927e8d Fixed simple but deadly typo in previous update. 2008-07-15 16:44:25 +00:00
R. Belmont
837d59500a i960: respect the rounding mode for CVTRI [ElSemi] 2008-07-15 16:42:05 +00:00
Nathan Woods
efcaebaea2 Changed ui_menu_get_selection() and ui_menu_set_selection() to use itemrefs
instead of indexes as per Aaron's guidance.
2008-07-15 11:04:30 +00:00
R. Belmont
a0ae9b4bb6 SH-4 update [Samuele Zannoli]
- Fixed TRAPA and some versions of FMOV
- Improved disassembly for MOV.W, MOVA, MOV.L, FIPR, and FSCA.
2008-07-14 23:27:27 +00:00
Aaron Giles
26b6c2cf16 Fixed popmessage. 2008-07-14 15:00:58 +00:00
Nicola Salmoria
89675377ca added save state suport to Konami CPU & Aliens 2008-07-14 14:56:20 +00:00
Aaron Giles
484efe776b Added an exit function to the SH2 drc so that it doesn't leak
memory like crazy.
2008-07-14 14:53:08 +00:00
Nathan Woods
83f6ced61e Added accessors to get/set the currently selected menu item in a menu 2008-07-14 11:34:20 +00:00
R. Belmont
a18b3c3eeb [SH2DRC] Removed remnant of outdated interrupt design. 2008-07-14 01:55:02 +00:00
R. Belmont
1f9a29d7fa UDRC-based SH-2 dynamic recompiler.
- All games on all drivers should work as before except "colmns97" and "stress" which crash due to sound system trouble.
- All idle skips are still included.  They are quite a bit less effective than they were on the interpreter, but they still give a boost.
- Fast RAM bypass is not included yet so this does not represent final performance.  That said, it's consistently faster than the interpreter even now.  Example: sfiii3 on 0.126 gets 609% on the interpreter and 961% on the DRC.

Major thanks to Aaron for his assistance with several sticky core bugs and other issues encountered writing this.
2008-07-13 23:40:54 +00:00
Aaron Giles
dabae9787b Replaced the crazy number of get/set functions for render containers with
a single get/set of a user settings struct.
2008-07-13 08:03:43 +00:00
Aaron Giles
c4e5ae4e41 Fixed edge case in the DRC front-end that would incorrectly tag the
end of a sequence as "return to start" even if the last instruction
did not abet the starting instruction.
2008-07-13 07:03:30 +00:00
Aaron Giles
4860b171b2 Fix game selection menu. Changed so that it only computes available
drivers once per instantiation instead of on every change.
2008-07-13 06:52:32 +00:00
R. Belmont
90a6836226 64-bit GCC fixes. 2008-07-12 21:23:48 +00:00
Aaron Giles
86fbc45266 Converted UI startup screens to use astrings. 2008-07-12 20:30:47 +00:00
Aaron Giles
d8715ab4ac Note: I have done some testing, but there are probably more bugs
lurking. If you run into anything odd, please let me know.

Added new module uiinput.c which manages input for the user interface.
The OSD is responsible for pushing mouse events and character events
to this interface in order to support mouse movement and text-based
input (currently only used for the select game menu). Added support
for navigating through the menus using the mouse. 
[Nathan Woods, Aaron Giles]

Redesigned the UI menus so that they can maintain a richer state. Now
the menus can be generated once and reused, rather than requiring them
to be regenerated on each frame. All menus also share a comment eventing
system and navigation through them is managed centrally. Rewrote all the 
menus to use the new system, apart from the cheat menus, which are now 
disabled. Reorganized the video menu to make it easier to understand.
[Aaron Giles]
2008-07-12 20:18:25 +00:00
Wilbert Pol
e379509455 Removed a no longer needed #ifdef MESS part 2008-07-12 07:43:50 +00:00
Wilbert Pol
740ebd5401 pit8253 updates:
- Changed the implementation to use timers internally.
- Removed the frequency change callbacks.
2008-07-11 20:16:30 +00:00
Nathan Woods
bc9879f754 MESS-specific fix 2008-07-08 10:05:41 +00:00
Aaron Giles
7c2e170a5a Crazy idea: run mame -valid after altering the validity checks.... 2008-07-06 23:40:25 +00:00
Aaron Giles
cc03405ca2 Cleanups and version bump. 2008-07-06 23:19:23 +00:00
Aaron Giles
1794fddf8d 01965: driveyes: Access Violation
01951: cybrcycc: Crash during intro.
01964: gtg2j: Access Violation
2008-07-06 22:48:41 +00:00
Couriersud
b261a88395 01983: Force Range cheats not working 2008-07-06 18:49:27 +00:00
Nathan Woods
697181c8cd Adding per-device and per-CPU validity checks 2008-07-06 15:02:12 +00:00
Couriersud
84e9ab7d4e Fix scrolling speed in case a cheat dat has invalid (i.e. 0) settings 2008-07-06 10:37:52 +00:00
Aaron Giles
6105826fb8 01971: Cheat menu flickers
Also made it display (null) only in debug builds.
2008-07-06 06:45:29 +00:00
Aaron Giles
161b2a86e8 01963: screenless systems: memory leak with -mngwrite 2008-07-06 06:07:23 +00:00
Roberto Zandona
342b2370be update cheat system (fix mantis #01969) (credit ShimaPong) 2008-07-04 16:49:20 +00:00
Nathan Woods
a0866bcacd MESS-specific tweak 2008-07-04 03:10:33 +00:00
Aaron Giles
e376a53661 Cleanups and version bump. 2008-07-03 15:50:46 +00:00
Aaron Giles
b82b111e69 Lighter weight debugger optimization for ADSP2100. 2008-07-03 15:34:27 +00:00
Couriersud
b97ff5fcca Credit ShimaPong - Updated cheat system
- Roll back older periodic function
   Now standard/old format work in this function
   Otherwords, several operations which doesn't exist in older
   function and added recently are now disabled
 - Separated load_cheat_code() to 3 indipendent functions
   And added new cheat options, "Load New/Standard/Old Format Code"
   (Default : load all format codes)
     NOTE : delete all cheat options in the database before start
            or reload default options (Shift + Reload key)
            in cheat general menu
 - Added format strings structure to accept huge size strings
   in loading a database to prevent from breaking other strings
 - Changed Link in new format
   Label code is now "Link-Label" and sub-label is "Label-Sub-Link"
   "Standard-Link" is no longer label
 - Added choose_label_index() to manage label selection
 - Fixed build_label_index_table() to prevent from crashing
   And disabled to build label index table in case of
   standard/old format
 - Fixed memory free problem in case of standard/old code
 - Fixed several reported/found bugs
2008-07-01 22:53:31 +00:00
Wilbert Pol
8b8ff45369 I80286: Fixed POP ES in protected mode. 2008-07-01 18:16:42 +00:00
Aaron Giles
fc9f7d2fa6 01942: All konamim2.c sets: hang
heatof11 gets to the color bars but only if you enable the debugger.
Not sure why.
2008-07-01 16:49:23 +00:00
Aaron Giles
fc20a0e0c3 Fixed sense of debugger flag in ADSP-2100 optimization. 2008-07-01 09:05:22 +00:00
Aaron Giles
32b803dad5 Fixed LWXC1/LDXC1; corrects gauntleg camera. 2008-07-01 08:09:23 +00:00
Aaron Giles
0773e2550d Fixed 64-bit writes in C back-end. 2008-07-01 07:38:42 +00:00
Aaron Giles
10bca54ab0 Fixed incorrect assumption in HASHJMP that the base table for a mode
will always be allocated when a fixed mode is first used.
2008-07-01 04:40:25 +00:00
Jonathan Gevaryahu
3efbf0333d s14001a.c: fix a minor bug with the 4-bit dac range. wolfpack clips again, and I'm almost sure its an encoding error on the original speech 2008-06-30 18:57:41 +00:00
Aaron Giles
f33daa0877 01948: All alg.c and cliffhgr.c sets: Access Violation when taking a snapshot 2008-06-30 16:27:56 +00:00
Aaron Giles
7d1d630f91 Fixed some save state problems in the DCS driver. Still comes out garbled
on a load, however. Extended memory.c to support up to 4096 banks.
2008-06-30 16:03:49 +00:00
Jonathan Gevaryahu
05946c0fda s14001a.c: Remove a TODO line for a bug which has been fixed. 2008-06-30 08:32:00 +00:00
Aaron Giles
1b941383f0 MIPS recompiler:
* marked IDT instructions for R4650 only
 * accounted for time taken in throwaway likely branch slots
 * fixed jalr to respect the correct link register
 * fixed c.eq, c.lt, c.le to fail if unordered
 * fixed swxc1, sdxc1 to use the correct source register (fixes many Gauntlet problems)
 * fixed CCR31 display in debugger
2008-06-30 08:23:20 +00:00
Jonathan Gevaryahu
785f4c5898 Update S14001A core: improved filtering to be more accurate to the chip, changed internal audio renderer to produce 4 bit sound as the real chip does. Moved filter outside of the main rendering loop into the glue code. Note: with this update, you may hear a whining noise that was not previously present. This is accurate to the chip! The real chip would almost always have an analog filter placed on its output to suppress this whine. 2008-06-30 07:36:44 +00:00
Aaron Giles
df4f70a0a7 Split ADSP2100 execution loop between debug/non-debug. 2008-06-29 16:45:55 +00:00
Aaron Giles
bc5eecc7a2 Stash jump target address before executing delay slot.
Also, don't update link register until delay slot has finished
executing.

Fixes hang in gauntleg, though there are math problems lurking still.
2008-06-29 06:19:59 +00:00
Aaron Giles
66360324c1 Fixed 32031 so that it doesn't call the debugger if not enabled. 2008-06-28 21:04:16 +00:00
Aaron Giles
64048d74f7 Oops, forgot to shift addresses for 16,32,64-bit watchpoint stubs. 2008-06-28 17:55:58 +00:00
Couriersud
9e41bb9864 Partial fix: 01945: All asteriod.c sets: Assertions
* fixes assert: src/emu/video.c:664: visarea->min_x < width
* Test whether screen type is vector and ignore min_x < width in this case
* This affected a number of vector games and the only other fix would be to rewrite the vector code
2008-06-28 13:22:41 +00:00
Aaron Giles
75d18b3a33 Changed how watchpoints work so that supporting them adds 0 overhead
unless some are actually live.

Changed a few call sites from using memory_set_context() to cpuintrf_push_context().
2008-06-28 07:21:54 +00:00
Couriersud
9ce918c465 01937: All Sets: Fatal Exception on In-Game Menu 2008-06-28 00:06:29 +00:00
R. Belmont
7a3449f968 SH2: convert context struct to go through a pointer 2008-06-27 19:42:58 +00:00
Aaron Giles
96d3879704 Don't generate compare interrupts unless the compare register was written
to. Fixes hangs in blitz, calspeed, and others. Also fixed vegas input
ports.
2008-06-27 14:23:50 +00:00
Yasuhiro Ogawa
246e71dccf Pitch calculation fix (by h0pdmiYX0) 2008-06-27 09:44:10 +00:00
R. Belmont
f6c3274df2 Refactor SH2 to separate out things that aren't part of the interpreter. 2008-06-27 05:33:54 +00:00
Nathan Woods
aa3dfa8811 MESS-specific compilation fix 2008-06-27 01:10:39 +00:00
Couriersud
08308f1f36 01935: All output commands (-listxml, -cc, -listfull, ETC) crash with error 2008-06-26 21:32:50 +00:00
Aaron Giles
1e7bfa9b94 Update docs a bit. Turn off debugger by default. 2008-06-26 16:51:19 +00:00
R. Belmont
077cd49d2e GCC 64-bit compile fix 2008-06-26 16:33:51 +00:00
Aaron Giles
3d1376ed97 Cleanups/version bump. 2008-06-26 16:05:46 +00:00
Aaron Giles
652fc279ae From: Oliver Stoeneberg [mailto:oliverst@online.de]
Subject: another Machine -> machine cleanup
This cleans up most of the Machine stuff in src/emu/machine. There is
a bit left to clean up, but it's mostly stuck at some interfaces now.
2008-06-26 15:34:42 +00:00
Aaron Giles
ba2fb8554b From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] make MSVC_BUILD=1 -j<n> build fix

Hi mamedev,

The following build tweak fixes make MSVC_BUILD=1 -j2.  It also fixes
an oversight in the cross-build support.

~aa
2008-06-26 15:27:12 +00:00
Aaron Giles
ea3780417a From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] Fix minor CPU/SOUND core build issues

Hi mamedev,

This small patch fixes a few build problems with the cpu/sound cores
M65CE02, ALPHA8201, TMC0285, TMS5200 and corrects the dependencies for
the mips core.

~aa
2008-06-26 15:24:55 +00:00
Aaron Giles
01f5d8cb93 From: Corrado Tomaselli [mailto:corrado.to@tiscali.it]
Subject: the fairyland story clocks
Verified clocks on Fairyland Story
2008-06-26 14:57:56 +00:00
Aaron Giles
68f3a9ab9e Removed DEBUGGER flag from makefile and ENABLE_DEBUGGER
macro from the source code. All MAME builds now include
the debugger, and it is enabled/disabled exclusively by
the runtime command-line/ini settings. This is a minor 
speed hit for now, but will be further optimized going 
forward.

Changed the 'd' suffix in the makefile to apply to DEBUG
builds (versus DEBUGGER builds as it did before).

Changed machine->debug_mode to machine->debug_flags.
These flags now indicate several things, such as whether
debugging is enabled, whether CPU cores should call the
debugger on each instruction, and whether there are live
watchpoints on each address space.

Redesigned a significant portion of debugcpu.c around
the concept of maintaining these flags globally and a
similar, more complete set of flags internally for each
CPU. All previous functionality should work as designed
but should be more robust and faster to work with.

Added new debugger hooks for starting/stopping CPU
execution. This allows the debugger to decide whether
or not a given CPU needs to call the debugger on each
instruction during the coming timeslice.

Added new debugger hook for reporting exceptions.
Proper exception breakpoints are not yet implemented.

Added new module debugger.c which is where global
debugger functions live.
2008-06-26 14:51:23 +00:00
Couriersud
9e2e2fd776 Fixes menu scrolling speed as described by Haze 2008-06-25 22:17:15 +00:00
Couriersud
37ad515d2a Updated cheat system / Credit Shimapong
- Merged 3 different search menu functions to search_main_menu()
 - Added new cheat options, "Vertical/Horizontal Key Repeat Speed"
     NOTE : delete all cheat options in the database before start
            or reload default options (Shift + Reload key)
            in cheat general menu
 - Changed assignment of Entry for Activation Key and Pre-enable
   command code. Now there are check the tag in comment field
   instead of index number. But it's only for new format command
   and old is as before
 - Added tag output in save_activation_key() and save_pre_enable()
 - Cleaned up save_cheat_options() to output description
 - Changed memory read function in watchpoints
   No longer "Debugger" watchpoint mis-hit "Cheat" watchpoint
 - Fixed several reported/found bugs
 - Renamed funcitons/enum based on coding guidlines
   All functions are completed in this update
2008-06-25 18:24:55 +00:00
Aaron Giles
25abe2749d Hornet driver:
- connected EEPROM (doesn't seem to affect much)
 - cleaned up system register access

GTI Club driver:
 - altered network IRQ clear to fix several problems
 - added Guru readme
 - fixed crashes due to missing inputs
 - gticlub "works" again

ZR107 driver:
 - added Guru readme
 - cleaned up system register access
 - these games work again with altered network IRQ timing

NWK-TR driver:
 - added Guru readme

DRC frontend:
 - now passes pointer to previous instruction when describing

PPC frontend:
 - attempts to roughly take into account branch and CR logical
    folding in timing computations
2008-06-25 15:02:07 +00:00
davidhay
1ab9a6bd40 Promoted to Working
-------------------

Survival [nuapete]
2008-06-24 20:17:59 +00:00
Wilbert Pol
88e208dce0 Fixed typo in changelog 2008-06-24 20:03:08 +00:00
Wilbert Pol
9a76a3e65d i8x41 cpu core changes:
- Updated the ram sizes. 8041 uses 128 bytes, 8042
    8042 uses 256 bytes.
  - Added support for re-enabling interrupts inside
    an interrupt handler.
  - Fixed cycle count for DJNZ instruction.
2008-06-24 19:36:34 +00:00
Aaron Giles
870607fe7b 01886: gradius4: 3D gfx problem
Fixed LZCNT opcode in x86 and x64 back-ends
Added support for flags in LZCNT and BSWAP opcodes on x86 and x64 back-ends
2008-06-24 16:05:36 +00:00
Aaron Giles
a39d6ed967 01927: Effects overlay showing in snapshots
Explicitly disabled overlays for non-native snapshots (native snapshots already had them disabled)
2008-06-24 05:28:58 +00:00
Aaron Giles
2ac4c9da66 01901: kinst13, kinst14, kinstp: Attract mode graphics regression
Fixed DCMP opcode on the 32-bit back-end
2008-06-24 05:22:30 +00:00
Aaron Giles
75a009ac40 Do not stop in the debugger while we are waiting for a pending
event to occur. This eliminates some confusion during reset and
state loading.
2008-06-24 05:21:19 +00:00
Aaron Giles
2be66a245c Fixed WRITEM opcode on 64-bit to call through memory instead of directly. 2008-06-24 04:46:15 +00:00
Wilbert Pol
6f4b3add14 I8x41 cpu core fixes:
- Added configurable i8x41/i8x42 subtype support.
- Fixed carry flag handling in ADDC A,#N instruction.
- Fixed carry flag handling in RLC A instruction.
2008-06-23 18:52:12 +00:00
Wilbert Pol
f4f26cdd1a i8x41: Fixed disassembly for opcode 0x67. 2008-06-23 17:59:03 +00:00
R. Belmont
1d2a733d95 Fixed compile where DEBUG=1 and DEBUGGER=0. 2008-06-23 17:00:18 +00:00
Aaron Giles
a4918351e1 Save state support:
* added save state support to the SHARC CPU core
 * added save state support to the PowerPC recompiler
 * added save state support to the virtual TLB system
 * added save state support to the RF5C400 sound core
 * added save state support to konppc module
 * added save state support to K056800 host controller
 * added save state support to the Konami hornet driver

Fixed poor default CLUT handling in the voodoo driver
2008-06-23 16:37:34 +00:00
R. Belmont
dfb5755f25 Fixed placement of stream_update in the NiLe emulation. 2008-06-23 13:15:28 +00:00
Aaron Giles
57c35a0efc From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] memory_region madness reloaded
Hi mamedev,

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 should given the syntax of the related apis memory_region_type and
memory_region_flags.  Clearly they didn't get the parameter because of
the sheer number of changes needed to change the apis.  This pair of
patches makes the change, and deals with the consequences.

The second patch then changes the api for memory_region and
memory_region_length, and fixes the fallout.  It generally plumbs
through machine parameters where needed, except for the case of sound
apis which I deferred doing so till later.  This increased the number
of deprecat.h includes by ~50.  Given it is a massive patch, there are
bound to be a few mistakes in it (I had to make ~20% of the changes by
hand), but I exercised care and reviewed the patch several times to
minimize the problems.
2008-06-23 08:32:42 +00:00
Aaron Giles
b3743812df From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] memory_region madness reloaded
Hi mamedev,

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 should given the syntax of the related apis memory_region_type and
memory_region_flags.  Clearly they didn't get the parameter because of
the sheer number of changes needed to change the apis.  This pair of
patches makes the change, and deals with the consequences.

The first patch makes some changes to help the second patch
along, as well as moves some uses of the memory_region apis within for
loops outside the loops.
2008-06-23 08:17:42 +00:00
Aaron Giles
ec54e3911d Save state support:
* added save state support to the MIPS3 recompiler
 * added save state support to CAGE audio system
 * added save state support to the voodoo emulator
 * added save state support to the smc91c9x emulator
 * added save state support to the kinst, seattle, and vegas drivers
 * fixed core video handling of save states with dynamic screen resolutions

SMC91C9x:
 * converted to proper device
 * updated seattle and vegas drivers to allocate devices
 * added separate 91C96 device for eventual 2049 use
 * cleaned up code
2008-06-23 07:58:17 +00:00
R. Belmont
bdd608f8ba Various NiLe fixups. Music in-game now sounds quite acceptable, if not yet perfect. 2008-06-23 02:07:52 +00:00
Aaron Giles
0dc00ab33f Converted voodoo into a proper device.
Updated drivers accordingly.
2008-06-23 01:28:05 +00:00
R. Belmont
167df11887 Correct the loop flag in the NiLe. Still more to do. 2008-06-23 01:14:48 +00:00
Wilbert Pol
a01d5624a3 Removed i8x41.ram hack from the i8x41 cpu core. 2008-06-22 20:21:51 +00:00
Tomasz Slanina
cecb9c22a9 Preliminary emulation of ST-0026 NiLe (sound).
Added audio (imperfect) to Super Real Mahjong P6.
(2nd attempt)
2008-06-22 20:14:14 +00:00
Couriersud
f18db5b067 implemented 8257 dma controller as proper device
* rewrote 8257dma.[ch]
* updated dkong.c accordingly
2008-06-22 13:48:55 +00:00
Couriersud
0bee46b0ac x86emit.h: Back out commit #2007 which accidentally commited this file as well 2008-06-22 11:44:26 +00:00
Couriersud
b85a4f86e5 Cleaned up z80dma interface - missing files from last commit)
* removed compatibility to old z80dma driver
* now uses std. callbacks (READ8_HANDLER, WRITE8_HANDLER)
* updated mario and dkong3 accordingly
2008-06-22 11:41:50 +00:00
Aaron Giles
8138105277 01916: srmvs: Assertion
Removed erroneous assertion.
2008-06-22 03:03:43 +00:00
Aaron Giles
d4b702bf33 01900: All sets in kinst.c: Mass coin input disables dipswitch access, and thus further coin input during a fight 2008-06-22 01:40:28 +00:00
Aaron Giles
3245688ccf 01905: Many Sets: Fatal Error crash - Fatal error: Input ports cannot be read at init time! (src/emu/inptport.c:1278)
Removed call to discrete_reset() in the initialization code. It is already
called by the sound system during reset, at which point it is safe to read
input ports.
2008-06-21 05:25:19 +00:00
Aaron Giles
02ad5125b1 01912: Various: Unable to construct input ports! (part 2) 2008-06-21 04:57:44 +00:00
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