Commit Graph

1132 Commits

Author SHA1 Message Date
R. Belmont
98be8ed00d m680x0: show FPU registers in the debugger for 030+ 2010-03-11 04:41:16 +00:00
Aaron Giles
ec586731b9 Made device->tag and devconfig->tag into private member variables (m_tag).
Added inline tag() function to return a const char * version. Updated
callers to use this instead of directly accessing tag.cstr() which
was awkward.
2010-03-08 17:06:27 +00:00
R. Belmont
3ae63e34e5 H8/3334: add analog input ports 2010-03-06 06:22:41 +00:00
R. Belmont
461d257aea H8: add bild and bist opcodes [R. Belmont] 2010-02-22 03:36:46 +00:00
R. Belmont
ccd496af62 H8: fix stack trashing when simultaneous IRQ sources asserted [R. Belmont] 2010-02-20 05:09:24 +00:00
Miodrag Milanovic
c9885fe958 VS2008 compiling fix [Miodrag Milanovic] (no whatsnew) 2010-02-18 18:33:18 +00:00
Wilbert Pol
677d859342 v30mz: Increased MAX_INSTRUCTION_BYTES to prevent disasm crashes (no whatsnew). 2010-02-18 11:33:55 +00:00
Fabio Priuli
e09be306d8 i386: Small fix for the i386 core, correcting the LLDT
instruction. This fix sets up the LDTR base and limit values
correctly, fixing use of the LDT. [Barry Rodewald]
2010-02-18 09:23:35 +00:00
R. Belmont
30d328738d Correct OS X compiler warnings [Scott Michel] 2010-02-14 17:46:59 +00:00
Aaron Giles
6b663f66a7 Cleanups and version bump. 2010-02-14 16:59:22 +00:00
Curt Coder
60d8b99681 Added Intel 8021/8022 CPU types. 2010-02-12 09:46:22 +00:00
R. Belmont
e6caacc74c Removed unused #include. 2010-02-04 14:51:32 +00:00
R. Belmont
01efae2c12 Preliminary Panasonic MN10200 CPU core and Taito ZOOM ZSG-1 sound system [Olivier Galibert]
---

This is just stage one of converting OG's stuff, please do not touch any 
of it yet.  Next up is the skeleton of the ZOOM chip, finishing up 
the missing bits of the CPU core (the interrupt controller and timers), and
debugging the results.
2010-02-04 05:20:18 +00:00
Miodrag Milanovic
573018005b [PDP1] Display the PC in hex as well as octal. [Robbbert] 2010-02-01 12:41:06 +00:00
Miodrag Milanovic
a461dfee73 [APEXC] 1. Added pseudo PC register for the debugger, it will now highlight the next instruction to be executed.
2. Added "normal" addresses to disassembler output, so anyone can see the program flow. [Robbbert]
2010-01-31 13:19:16 +00:00
Miodrag Milanovic
3c29474089 Fixed disassembly of PDP1,TX0 and APEXC [Robbbert] 2010-01-30 14:29:45 +00:00
R. Belmont
940c2b4e9a am29k: fix PPC GCC compile error 2010-01-28 18:01:51 +00:00
Aaron Giles
fe3d7c4af4 Cleanups and version bump. 2010-01-28 08:03:44 +00:00
R. Belmont
0f6b9fc7a8 ARM: preliminary SA-1110 support 2010-01-23 03:40:02 +00:00
Aaron Giles
1a2c20441f Remove some aliases between CPUINFO_ and DEVINFO_ to help clarify
usage.

Also converted a few more places to use the new accessors.
2010-01-21 06:05:57 +00:00
Aaron Giles
a5668c2eb9 Made direct accessors for device configuration state. Currently they
just call through to the get info function. Removed old macros that
wrapped calls.
2010-01-21 03:56:53 +00:00
Couriersud
0328f34acb Autodetection of PTR64 can be inhibited now by specifying PTR64=0.
On mixed 32bit/64bit targets identifying themselves as 64bit this can be used to build a 32bit executable.
2010-01-19 22:09:45 +00:00
Aaron Giles
409add88bb Convrted the rest of devintrf to classes and moved management
functions into methods of those classes. The most wide-ranging
change was converting device_reset() to device->reset(). Apart
from that it was mostly internal shuffling in the core.
2010-01-19 15:08:18 +00:00
Miodrag Milanovic
04875f17b7 - Added MESS dependent code missing in emu.h
- Fixed compiling CPU core of V30MZ (only used by MESS)
- Fixed MESS dependent code of wave.c
- Added include of emu.h in sid (used only by MESS)

no whatsnew needed
2010-01-19 13:00:22 +00:00
Aaron Giles
e738b79785 Correct a long-standing design flaw: device configuration state
is now separate from runtime device state. I have larger plans
for devices, so there is some temporary scaffolding to hold
everything together, but this first step does separate things
out.

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

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

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

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

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

and then fixed up the compiler errors that fell out.

Some specifics:

  Removed device_get_info_* functions and replaced them with
  methods called get_config_*.
  
  Added methods for get_runtime_* to access runtime state from
  the running_device.
  
  DEVICE_GET_INFO callbacks are only passed a device_config *.
  This means they have no access to the token or runtime state
  at all. For most cases this is fine.
  
  Added new DEVICE_GET_RUNTIME_INFO callback that is passed
  the running_device for accessing data that is live at runtime.
  In the future this will go away to make room for a cleaner
  mechanism.
  
  Cleaned up the handoff of memory regions from the memory
  subsystem to the devices.
2010-01-18 09:34:43 +00:00
Phil Bennett
2860295205 New games added or promoted from NOT_WORKING
--------------------------------------------
F-15 Strike Eagle (2 sets) [Phil Bennett]
Battle of the Solar System (rev. 1.1) [Phil Bennett]
Tank Battle (prototype rev. 4/21/92) [Phil Bennett]


Added Am29000 CPU core [Phil Bennett]
2010-01-17 16:21:57 +00:00
R. Belmont
14e2b9acf3 Changed DSP56k macros to avoid collision with OS X 10.6+ system headers 2010-01-17 02:58:59 +00:00
R. Belmont
6ec1f9c3a4 Missed another one (no whatsnew) 2010-01-16 18:58:37 +00:00
Aaron Giles
aebc07a897 Cleanups and version bump. 2010-01-16 04:12:04 +00:00
R. Belmont
51fd1fa822 More PPC GCC warning fixes. 2010-01-15 23:48:40 +00:00
Dirk Best
3997330a94 i386: Improved accuracy of the various emulated models, makes CPU detection programs detect the correct CPU (in MESS).
- eflags mask added
- Initial values for the EAX and EDX registers fixed
- cpuid values improved
- feature flags improved
- initial value for the cr0 register improved
- changed 486 to not support the cpuid instruction by default
- take a trap on invalid instructions instead of throwing a fatalerror
- emulated the undefined flag behavior for the DIV/IDIV instructions on Intel CPUs
2010-01-15 18:54:23 +00:00
Ryan Holtz
8d183da738 Added a mostly-complete SunPlus u'nSP core based on the one in Segher's "Unununium". [Harmony] 2010-01-14 05:35:34 +00:00
Paul Priest
84352b22f3 MT03233: Fix multisession crash in SE3208 affecting crystal.c [anonymous] 2010-01-12 21:26:20 +00:00
Aaron Giles
470f843262 Within src/emu, basic conversions:
devtag_get_device ... machine->device()
  memory_find_address_space ... device->space()
2010-01-12 06:54:57 +00:00
Angelo Salese
968ef7b835 03649: gekisha: Unknown DIP 4-2 toggles Auto Tsumo after Reach. If it is enabled and declare Reach, MAME crashes. 2010-01-11 13:33:43 +00:00
Aaron Giles
2b23d7c017 Bulk driver.h -> emu.h switch. 2010-01-10 18:00:42 +00:00
Aaron Giles
4498faacd9 First round of an attempted cleanup of header files in the system.
- Created new central header "emu.h"; this should be included
    by pretty much any driver or device as the first include. This
    file in turn includes pretty much everything a driver or device
    will need, minus any other devices it references. Note that
    emu.h should *never* be included by another header file.
 - Updated all files in the core (src/emu) to use emu.h.
 - Removed a ton of redundant and poorly-tracked header includes
    from within other header files.
 - Temporarily changed driver.h to map to emu.h until we update
    files outside of the core.

Added class wrapper around tagmap so it can be directly included
and accessed within objects that need it. Updated all users to
embed tagmap objects and changed them to call through the class.

Added nicer functions for finding devices, ports, and regions in
a machine:

   machine->device("tag") -- return the named device, or NULL
   machine->port("tag") -- return the named port, or NULL
   machine->region("tag"[, &length[, &flags]]) -- return the
      named region and optionally its length and flags
      
Made the device tag an astring. This required touching a lot of 
code that printed the device to explicitly fetch the C-string
from it. (Thank you gcc for flagging that issue!)
2010-01-10 00:29:26 +00:00
Aaron Giles
a92de5930c Extended the astring class wrapper into something useful, and
useable as a stack object. Also designed the interfaces to allow
for chaining operations. And added a casting operator to const
char * for seamless use in most functions that take plain old C
strings.

Changed all uses of astring to use the object directly on the
stack or embedded in objects instead of explicitly allocating 
and deallocating it. Removed a lot of annoying memory management
code as a result.

Changed interfaces that accepted/returned an astring * to
use an astring & instead.

Removed auto_alloc_astring(machine). Use 
auto_alloc(machine, astring) instead.
2010-01-08 17:18:54 +00:00
Aaron Giles
91a1b8d634 NOTE: This change requires two new osd functions: osd_malloc() and
osd_free(). They take the same parameters as malloc() and free().

Renamed mamecore.h -> emucore.h.

New C++-aware memory manager, implemented in emualloc.*. This is a
simple manager that allows you to add any type of object to a
resource pool. Most commonly, allocated objects are added, and so
a set of allocation macros is provided to allow you to manage
objects in a particular pool:

  pool_alloc(p, t) = allocate object of type 't' and add to pool 'p'
  pool_alloc_clear(p, t) = same as above, but clear the memory first
  pool_alloc_array(p, t, c) = allocate an array of 'c' objects of type
                              't' and add to pool 'p'
  pool_alloc_array_clear(p, t, c) = same, but with clearing
  pool_free(p, v) = free object 'v' and remove it from the pool

Note that pool_alloc[_clear] is roughly equivalent to "new t" and
pool_alloc_array[_clear] is roughly equivalent to "new t[c]". Also
note that pool_free works for single objects and arrays.

There is a single global_resource_pool defined which should be used
for any global allocations. It has equivalent macros to the pool_*
macros above that automatically target the global pool.

In addition, the memory module defines global new/delete overrides
that access file and line number parameters so that allocations can
be tracked. Currently this tracking is only done if MAME_DEBUG is
enabled. In debug builds, any unfreed memory will be printed at
the end of the session.

emualloc.h also has #defines to disable malloc/free/realloc/calloc.
Since emualloc.h is included by emucore.h, this means pretty much
all code within the emulator is forced to use the new allocators.
Although straight new/delete do work, their use is discouraged, as
any allocations made with them will not be tracked.

Changed the familar auto_alloc_* macros to map to the resource pool
model described above. The running_machine is now a class and contains
a resource pool which is automatically destructed upon deletion. If
you are a driver writer, all your allocations should be done with
auto_alloc_*.

Changed all drivers and files in the core using malloc/realloc or the 
old alloc_*_or_die macros to use (preferably) the auto_alloc_* macros 
instead, or the global_alloc_* macros if necessary.

Added simple C++ wrappers for astring and bitmap_t, as these need
proper constructors/destructors to be used for auto_alloc_astring and
auto_alloc_bitmap.

Removed references to the winalloc prefix file. Most of its 
functionality has moved into the core, save for the guard page 
allocations, which are now implemented in osd_alloc and osd_free.
2010-01-08 06:05:29 +00:00
Fabio Priuli
a406d628ff Replaced all occurrences of cputag_get_cpu with devtag_get_device: the former function was just an alias and now cpus are no different from other devices
Removed cputag_get_cpu and cputag_reset (another alias, not even used in the source) from cpuexec.h
2010-01-06 13:26:30 +00:00
Phil Bennett
52613ad118 Changed berlwall, arkanoid, bakubrkr, mgcrystl to use YM2149 [Corrado Tomaselli]
Verified and corrected clocks in halleys and exctsccr [Corrado Tomaselli]

New clones added
----------------

Exciting Soccer (Japan set 2) [Corrado Tomaselli]
2010-01-05 12:48:14 +00:00
Aaron Giles
a3b0cf0aea Make MSVC compile once again. 2010-01-04 01:30:53 +00:00
Aaron Giles
fe40adfb2b Fix codegen bug that broke kinst. 2010-01-04 00:27:45 +00:00
Aaron Giles
ba0d55cad5 Fix linker warning. 2010-01-04 00:09:40 +00:00
Aaron Giles
b4099c91bc Changes to sync with new toolchain:
1. Removed CPP_COMPILE option. All files (except expat and zlib)
are now compiled as C++ by default. For now, imagine nothing has
changed. The goal is not to go hog-wild with C++isms, but to
leverage it where it makes the most sense.

2. Mapped INLINE to plain old C++ inline now, fixing several
cases where this was problematic.

3. Marked global const structures explicitly extern since consts
are locally-scoped by default in C++.

4. Added new 'default' make target which just builds the emulator.
Use 'make all' to build everything including the tools.

5. 64-bit builds now get a '64' suffix on them. We might want to
just make this true for Windows builds, but it's on for everyone
at the moment.

6. (Windows) Removed UNICODE option. UNICODE is enabled by default
on all Windows builds now. The 32-bit version links against
libunicows.a for continued Win9x compatibility.

7. (Windows) Removed hacks surrounding unicode handling of main().
They are no longer necessary with the new tools.
2010-01-03 21:31:44 +00:00
Wilbert Pol
2baf956ec5 Configured port A on the uPD7801 to an output port. 2010-01-03 10:15:24 +00:00
Wilbert Pol
22c5856130 Implemented uPD7801 timers. 2010-01-02 10:02:47 +00:00
Wilbert Pol
a83b755c7d uPD7801 core changes:
- Fixed incorrect disassembly of some instructions.
- Updated the handling of interrupts to match the documentation.
2010-01-02 08:58:38 +00:00
R. Belmont
b08f51e0aa Trivial BIGENDIAN=1 rsp compile fix, no whatsnew needed. 2010-01-01 16:36:08 +00:00
Aaron Giles
0f6f7ba842 Converted RSP callbacks into device callbacks. Removed a ton of
tag-based queries in favor of using the device passed.
2010-01-01 00:18:16 +00:00
Aaron Giles
b3a8dd2113 Oops, fixed misaligned 32-bit accesses in RSP DRC.
Also  disabled DRC_SQV implementation as it breaks music in mtetrisc.
2010-01-01 00:16:45 +00:00
Aaron Giles
289a309cd3 Cleanups and version bump. 2009-12-31 22:03:37 +00:00
Phil Bennett
f7b4dbfea1 Fixed x86 HLT instruction handling [Phill Harvey-Smith]
Date: Mon, 28 Dec 2009 00:29:31 +0000
From: Phill Harvey-Smith <afra@aurigae.demon.co.uk>
To: submit@mamedev.org
Subject: i86 patch

Hi,

Attatched is a patch correcting the operation of the hlt instruction in 
the i86 core. I have done test builds with both the current mame and 
mess source for both debug and normal builds, and all seems to be ok.

Cheers.

Phill.

-- 
Phill Harvey-Smith, Programmer, Hardware hacker, and general eccentric !

"You can twist perceptions, but reality won't budge" -- Rush.
2009-12-31 00:56:09 +00:00
Ryan Holtz
c0d0d89d1b Fixed a few DRC-ized vector load/store opcodes in the RSP core. [Harmony] 2009-12-30 07:56:09 +00:00
Aaron Giles
152d8a7db0 Explicitly sign-extend 32-bit indexes for load/loads/store on 64-bit
machines to prevent overflow issues. Fixes DRC crash in mtetrisc.
2009-12-30 06:51:42 +00:00
Aaron Giles
31c7c2c219 Fixed error in codegen for drol/dror opcodes in the x86 back-end.
Re-implemented misaligned memory handling in the RSP DRC as before.
2009-12-30 06:19:08 +00:00
Aaron Giles
ad010bc54e Fix some errors the 4.4.3 compiler complains about in C++ mode. 2009-12-30 02:57:38 +00:00
Roberto Zandona
1284b17000 added two opcodes in the nec cpu; this is a temporary fix; we need to check if cb2001 use a custom cpu; in this case we need to split different cpu
cb2001: added more opcodes
2009-12-29 21:39:49 +00:00
Aaron Giles
81523f2e10 gcc 4.5.0 compilation fixes. 2009-12-29 14:35:54 +00:00
Ryan Holtz
50fbe1b27c Fixes the debug build. 2009-12-28 22:08:29 +00:00
Ryan Holtz
7858c436fc Converted a number of vector opcodes to the RSP DRC core. [Harmony]
Unrolled and optimized a number of vector opcodes in the interpreter RSP core. [Harmony]
2009-12-28 16:50:06 +00:00
Aaron Giles
45d1ff4d1e Cleaned up braces in the code so that they are properly balanced. [Atari Ace] 2009-12-28 09:09:20 +00:00
Aaron Giles
bd24fb23c1 Results of running the latest srcclean. 2009-12-28 09:04:00 +00:00
Aaron Giles
f20a2e6b17 Fixes so we can compile as C++ again. 2009-12-28 07:34:17 +00:00
Aaron Giles
c285eb9bcd Cleanups and version bump. 2009-12-23 18:10:25 +00:00
Aaron Giles
79b8f09ad8 From: Samuele Zannoli <samuele.zannoli@sparkbio.it>
Date: Tue, Dec 22, 2009 at 11:57 AM
Subject: Core for PIC 16c62x series of processors
To: submit@mamedev.org


Hello,
         this patch contains a core for the PIC 16c62x series of processors.

It has been made starting from the pic16c5x that is already present.
This version stil misses the various internal devices, however the
opcodes and i/o ports work, and it is enough to run the emulation of
the security pics used with the gd-roms.

Bye,
       Samuele Zannoli
2009-12-23 18:01:49 +00:00
Aaron Giles
505f0d7caf From: Atari Ace <atari_ace@verizon.net>
Date: Tue, Dec 22, 2009 at 4:44 PM
Subject: [patch] Fix srcclean/src2html bugs, misbalanced tokens and
visible whitespace errors
To: submit@mamedev.org
Cc: atariace@hotmail.com


Hi mamedev,

While experimenting with srcclean and src2html as indentation
validators, I stumbled across a couple of bugs.  The first is that
srcclean doesn't properly handle /*...*//.  It sees the last / char at
the end as the second / of an inline comment, where it might be a
division token or the start of either type of comment.

The second bug is that src2html improperly handles strings with
embedded quotes preceded by escaped backslashes, e.g. "ab\\\"cd".  It
believes the string terminated in the middle, and the last quote
starts a new string.  This issue is unlikely in actual code, but
should be handled correctly.

The first patch fixes these, and a some cases where there are
dangling/missing tokens which my validation tools are noticing.  These
occur in some unused macros, dead code sections, and in some macros
that are deliberately misbalanced (v9938.c, psx.c).  In the deliberate
cases, I balanced the braces by making exactly one open and one close
macro and using those throughout.

The second patch is then a set of visible whitespace "problems". Cases
where the closing brace isn't at the same indent level as the open
brace, and some cases where the indent level isn't a multiple of four.
In the case of ssv.c I folded the assignments into init_ssv() to
simplify the code and restore the brace balance, otherwise I kept to
simply adding or removing whitespace.

~aa
2009-12-23 17:59:08 +00:00
Aaron Giles
a825a2427f ---------- Forwarded message ----------
From: Barry Rodewald <bsr@xnet.co.nz>
Date: Wed, Dec 23, 2009 at 2:37 AM
Subject: Yet more i386 fixes
To: submit@mamedev.org


Hi,

Here's two more small i386 fixes.

First, is an implementation of the LSL protected mode instruction.
While it's far from perfect (ie: it doesn't check for anything other
than a null segment selector), it does help get a little bit further
for some FM Towns applications.

Second, is a fix for the REP instruction when used with a segment
prefix.  Essentially, it reverses the use of the segment_override and
segment_prefix variables compared to other instructions.  This fixes
sprite data copied into sprite RAM on the FM Towns version of Raiden
Trad.

Thanks,
Barry Rodewald
mailto:bsr@xnet.co.nz
2009-12-23 17:53:33 +00:00
Aaron Giles
d0af9ba1e8 First round of fixes for post-initialization allocs.
In the process, converted 7474, 74148, and 74153 to
devices.
2009-12-20 23:57:25 +00:00
Aaron Giles
30d57e3f48 Minor drc improvments:
- simplified RSP's misaligned memory accesses
 - removed now-unnecessary shifts from direct memory accesses in
    mips3/powerpc drcs
 - optimized AND with 0xff/0xffff/0xffffffff cases for x86/x64
 - added rudimentary memory/register tracking in x86 backend to
    remove redundant loads
2009-12-20 15:21:26 +00:00
Aaron Giles
c3fb047204 Added new profiler bucket for DRC recompilation.
Removed a number of extraneous sign extensions from the RSP DRC.
2009-12-19 08:50:34 +00:00
Ryan Holtz
2e65d4a968 RSP recompiler improvements / optimizations: [Harmony]
- Split SATURATE_ACCUM into a signed and unsigned version to reduce stack usage.
 - Corrected an issue with the 0h variants of VMRG, VAND, VNAND, VOR, VNOR, VXOR and VNXOR.
 - Slightly optimized unaligned reads and writes
 - Optimized unaligned dword reads
 - Corrected an issue where badly-written RSP programs could jump to invalid addresses
2009-12-18 23:14:19 +00:00
Miodrag Milanovic
ef4d608713 SCMP assert fix (No whatsnew is needed) 2009-12-18 11:55:30 +00:00
Ryan Holtz
0534f875b9 Fixing the RSP disassembler, no whatsnew. 2009-12-17 02:18:15 +00:00
Ryan Holtz
f9045e7268 [RSP] Preliminary RSP recompiler, with all vector ops stubbed out to C functions for now. [Harmony] 2009-12-16 23:26:58 +00:00
Aaron Giles
8bccdbd5cc Enhanced the UML opcodes for LOAD, LOADS, and STORE to support
arbitrary scaling factors. Previously, specifying a size implied
a scaling factor equal to the size (i.e., specifying DWORD meant
the index was scaled by 4). This is still the default. However,
now you can specify the scale explicitly for other cases. For
example, you can specify DWORD_x1 to fetch a DWORD but don't
scale the index at all, or BYTE_x8 to fetch a BYTE while scaling
the index by 8. Updated all backends to make this work.
2009-12-13 20:01:26 +00:00
Phil Bennett
907c61c43e i386 core improvements: [Barry Rodewald]
* Fixed EIP displacement when executing FPU instructions with no 80387 present
* Added 32-bit implementations of SLDT and STR


---------- Forwarded message ----------
From: Barry Rodewald <bsr@xnet.co.nz>
Date: Wed, Dec 9, 2009 at 2:02 AM
Subject: More i386 fixes
To: submit@mamedev.org


Hi,

Here's two more small fixes for the i386 core.

First, is FPU instructions used on 80386.  On a system without a
80387, FPU instructions should have no effect.  Part of the FM Towns
TBIOS (runs as an MS-DOS device driver, providing extra system
functions) initialises the FPU, and tries to detect it.  Upon hitting
the FSTCW instruction, though, it doesn't increase EIP enough when an
extra displacement byte is needed.  So, I've added a call to GetEA to
the escape() function (called when there is no FPU) which will fetch
the extra byte if necessary.

Second, is a 32-bit implementation of the SLDT and STR instructions.
Basically, I copied it from the 16-bit versions, and modified it to
use 32-bit registers.

Thanks,
Barry Rodewald
mailto:bsr@xnet.co.nz
2009-12-10 09:12:35 +00:00
Phil Bennett
c8608dcc22 Cleaned-up several drivers; added missing prototypes and removed dead ones,
marked non-exported functions as static and removed cases of #include "deprecat.h" [Atari Ace]

---------- Forwarded message ----------
From: Atari Ace <atari_ace@verizon.net>

Date: Sat, Dec 5, 2009 at 7:18 AM
Subject: [patch] Header cleanups
To: submit@mamedev.org
Cc: atariace@hotmail.com

Hi mamedev,

This patch improves the quality of the mame driver headers, by adding
missing prototypes and source comments, removing dead prototypes, and
marking some non-exported functions as static within the drivers.  It
also eliminates about a dozen cases of #include "deprecat.h".

~aa
2009-12-08 14:54:29 +00:00
Phil Bennett
54570e176e Fixed srcclean handling of embedded comments within strings [Atari Ace]
(Update of r7501)

---------- Forwarded message ----------
From: Atari Ace <atari_ace@verizon.net>
Date: Sun, Dec 6, 2009 at 5:51 PM
Subject: [patch] srcclean bugfix
To: submit@mamedev.org
Cc: atariace@hotmail.com


Hi mamedev,

My srcclean changes to track C-style quotes didn't handle all the
special cases correctly (for instance, '\"' and "\\\"").  This fixes
it, and adds some /* ... */ to m68k_in.c so that src2html.exe does a
better job on it.

~aa
2009-12-07 11:13:54 +00:00
Aaron Giles
fd34a32091 Added new functions:
memory_install_ram() to assign a un-named bank to a region and specify
    a pointer to where the RAM lives. If this is called in the DRIVER_INIT
    function or MACHINE/SOUND/VIDEO_START functions, then it is permissible
    to specify NULL, in which case the memory system will allocate memory
    and register it for save states.

  memory_install_rom() is like the above except that it only installs a
    read handler.

  memory_install_writeonly() is like the above except that it only installs
    a write handler.

Updated several instances in the code that were assigning banks to these
sorts of static RAM regions and simplified the code.

Also fixed several regressions reported by Tafoid.
2009-12-07 08:32:02 +00:00
Aaron Giles
0fd8c755ff Memory shares are now specified by tag instead of index.
The AM_SHARE() macro now takes a tag parameter. All existing
shares have been bulk renamed to "share##". However, the name
does not matter, so please use descriptive tags going forward.

Also added tag validation for bank and share tags.

Added flag to tagmap_add functions that optionally will
replace existing objects if a duplicate is found.
2009-12-05 20:19:04 +00:00
Aaron Giles
ee315fe99d Renamed functions:
memory_install_read/write_port_handler -> 
        memory_install_read/write_port

   memory_install_read/write_bank_handler -> 
        memory_install_read/write_bank
2009-12-05 07:59:31 +00:00
Aaron Giles
9eda9e163e More memory system cleanup. Removed SMH_* macros entirely. In
their place are a series of expanded macros and new memory
installation helpers. Some mappings below (not all are new):

   AM_READ(SMH_RAM)                       -> AM_READONLY
   AM_WRITE(SMH_RAM)                      -> AM_WRITEONLY
   AM_READWRITE(SMH_RAM, SMH_RAM)         -> AM_RAM
   AM_READ(rhandler) AM_WRITE(SMH_RAM)    -> AM_RAM_READ(rhandler)
   AM_READ(SMH_RAM) AM_WRITE(whandler)    -> AM_RAM_WRITE(whandler)
   AM_DEVREAD(tag, rhandler) AM_WRITE(SMH_RAM) 
                                  -> AM_RAM_DEVREAD(tag, rhandler)
   AM_READ(SMH_RAM) AM_DEVWRITE(tag, whandler) 
                                  -> AM_RAM_DEVWRITE(tag, whandler)

   AM_READ(SMH_ROM)                       -> AM_ROM
   AM_WRITE(SMH_ROM)                      -> (was a no-op)

   AM_READ(SMH_NOP)                       -> AM_READNOP
   AM_WRITE(SMH_NOP)                      -> AM_WRITENOP
   AM_READWRITE(SMH_NOP, SMH_NOP)         -> AM_NOP

For dynamic memory handler installation of the various types,
use the new functions:

   memory_unmap_read()
   memory_unmap_write()
   memory_unmap_readwrite() -- unmaps a section of address space

   memory_nop_read()
   memory_nop_write()
   memory_nop_readwrite() -- nops a section of address space

Cleaned up the internals of the address_map_entry structure, and
also normalized the way the address map macros work to remove a
lot of redundancy.
2009-12-05 07:54:11 +00:00
Aaron Giles
0069237f20 Memory banks are now referenced by tag rather than index.
Changed all memory_bank_* functions to specify a tag.
Bulk-converted existing banks to be tagged "bank##" in
order to ensure consistency. However, going forward, the
tags don't matter, so please name them something useful.

Added AM_BANK_READ/AM_BANK_WRITE macros to let you specify
bank tags. Also changed AM_ROMBANK and AM_RAMBANK macros to
accept tags as well.

Added new functions memory_install_read_bank_handler and
memory_install_write_bank_handler to install banks by tag
name, similar to input ports.

Changed internals of memory system to dynamically allocate
all banks. The first time a bank with an unknown tag is
installed, a new bank object is created and tracked 
internally. Removed all SMH_BANK(n) references outside of
the main code; these should never, ever be useful anymore.
2009-12-03 08:16:38 +00:00
Jonathan Gevaryahu
5dffcb6c6c mostly resolved mix of intel and motorola notation in tms32025 disassembler 2009-12-02 15:32:57 +00:00
Fabio Priuli
0180f1b0a8 > Subject: Fix for cp1610 cpu
>
> The cp1610 CPU is only used by the Intellivision (in MESS). However the
> disassembler produces garbage. Also I noticed a tiny error in the CPU
> itself.
>
> Here are the fixes:
>
> Firstly, the CPU, a one-line change. In cp1610.c, at line 3515, you may
> notice that 2 flags are sharing the same bit. Please change the V flag
> to
> use 0x20 (instead of 0x10). That's all there.
>
> Next, the disassembler. It assumes oprom to be 16 bits when in fact it
> is 8.
> I could not see a way of specifying the size of oprom, so assuming it
> is
> always 8 bits. If that's the case, please replace 1610dasm.c with the
> enclosed one.
>
> Thanks and have a great day :)
>
> - Robbbert
2009-12-01 10:56:41 +00:00
R. Belmont
5dc02c1d32 Fix assert on valid 68k variant. (no credit necessary) 2009-12-01 01:41:41 +00:00
Aaron Giles
b5c3081f3e Cleanups and version bump. 2009-11-30 01:46:32 +00:00
Phil Bennett
a6dc556396 Fixed i386 REP prefix to use segment:SI when address size is 16-bit (ie: when using OUTSB or OUTSW). [Barry Rodewald]
---------- Forwarded message ----------
From: Barry Rodewald <bsr@xnet.co.nz>
Date: Sat, Nov 28, 2009 at 6:55 AM
Subject: Another i386 fix
To: submit@mamedev.org


Hi,

Small fix this time.  This fixes an issue with the FM Towns version of
MS-DOS where it was feeding nonsense parameters to the CD-ROM
controller.  MS-DOS uses REP OUTSB to send the parameters, and I
noticed that the expected data was not what was sent to the I/O port.
Looking at the i386 code, I saw that it always used segment:ESI,
regardless of address size.  This fix makes it use segment:SI when
address size is 16-bit (ie: when using OUTSB or OUTSW).

Patch is based on 0.135u1.

Thanks,
Barry Rodewald
mailto:bsr@xnet.co.nz
2009-11-28 18:26:43 +00:00
Miodrag Milanovic
149c6aa7ca CF clear after binary operations on Intel 8008 CPU core 2009-11-26 09:37:12 +00:00
R. Belmont
c80aaff52c Fixed GCC compile error in SC/MP.
I assumed the as-edited line was the intent of the code, if not Micko will need to fix it :)
2009-11-23 17:44:36 +00:00
Miodrag Milanovic
7b1aa92c4d INS 8060 SC/MP II support (using clock divider 2), main model renamed to INS 8050 SC/MP 2009-11-23 11:19:15 +00:00
Miodrag Milanovic
d98fa09e1f Added Intel 8008 and National Semiconductor SC/MP CPU cores 2009-11-23 08:19:29 +00:00
Wilbert Pol
bcd6cff1fe tms7000: Fixed disassembly of PCREL addressing mode. 2009-11-20 18:53:06 +00:00
Aaron Giles
f0cdba5b11 Cleanups and version bump. 2009-11-20 06:50:40 +00:00
Aaron Giles
ad062c9e43 Fix TLBMOD exceptions so they also properly set BadVAddr. 2009-11-18 15:46:52 +00:00
Aaron Giles
693024974e Fix assertion in DRC. 2009-11-18 06:12:50 +00:00
Aaron Giles
aeca44b1ca Fix PowerPC 603 translation so it doesn't get stuck in an infinite
loop after the first fixup.
2009-11-17 15:43:06 +00:00
Aaron Giles
39957739fd Fix broken DRC logging. 2009-11-17 15:40:48 +00:00
Aaron Giles
ccefa6749d MIPS3 TLB fixes:
- fixed bug in vtlb code that caused us to lose track of previously
    registered fixed page ranges
 - fixed MIPS3 behavior that would not clear out invalid page ranges
    from the VTLB under certain circumstances
 - added support for TLB sizes less than 48 entries
2009-11-17 06:09:38 +00:00