---
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.
- all ui functions now expect a render_container
- removed all macros referencing render_container_get_ui
- ui_menu_alloc now is passed a container to which to render the menu.
This is a first round of changes to allow using ui_* functions in a more generic way.
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.
- 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
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.
--------------------------------------------
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]
along with a tagmap. Changed memory regions, input ports, and devices
to use this class. For devices, converted typenext and classnext
fields into methods which dynamically search for the next item.
Changed a number of macros to use the features of the class, removing
the need for a bunch of helper functions.
extension).
Improved stack walking on crash in Windows. Now using StackWalk64 to
do the stack walk, resulting in cleaner logs. Also will try to use
system function to look up symbol and source/line information if
present. End results:
- 32-bit gcc: parses symbol info from map file as before (this would
work better if we could coax gcc into outputting static functions in
the map)
- 64-bit gcc: has runtime issue that causes the exception handler to
not be invoked. Will work with mingw folks on it.
- 32/64-bit MSVC: nice stack dumps with symbol and source/line info,
if the PDB file is present. If not, falls back to the MAP file.
a region to a generic type pointer and have it automatically convert.
Also added a bytes() method which is safe if the region is NULL
(useful for saying machine->region("foo")->bytes() and not crashing
if foo doesn't exist).
Changed the region field in the device_config to be a region_info *,
and removed the regionbytes field. Updated all users of these fields
to use the new casting operators and bytes() methods instead.
Added subdevice and subregion methods to the device_config class, so
you can easily query for devices and regions that are device-specific.
The device prefix ("devicename:") is automatically prepended.
- 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
it was originally allocated.
Changed machine->region() to return a pointer to the now-public
region_info class.
Added new member function space() to the device_config, along with
shorter constants to be used (AS_PROGRAM, AS_DATA, AS_IO). With no
parameters, space() returns the first address space, which is
commonly the only space present. Updated a few devices that referenced
the old space[] array to call the new function instead.
Added #define to emualloc to ensure delete can't be freely used.
---------- Forwarded message ----------
From: Oliver Stöneberg <oliverst@online.de>
Date: Thu, Dec 31, 2009 at 2:45 PM
Subject: mameconfig version in -listxml
To: submit@mamedev.org
This patch adds the mameconfig version to the -listxml output
---------- Forwarded message ----------
From: Barry Rodewald <bsr@xnet.co.nz>
Date: Sat, Jan 2, 2010 at 10:13 AM
Subject: RF5C68 addition
To: submit@mamedev.org
Hi,
Here is a small update for the RF5C68 PCM core. For the FM Towns MESS
driver, there needs to be some way to tell when a PCM sample has ended
or looped, as the system can generate an interrupt at this point,
usually to end the sample playback on the specified channel. From the
RF5C68(A) datasheet, there appears to be no obvious way for an IRQ
signal to be sent, so I figure the PCM IRQ setup must be external to
the PCM chip itself.
Thus, I've added a simple callback, which should be called when the
end of a sample is reached, and with a parameter for the device
itself, and the channel on which the sample has ended.
Example of the result, with callback implemented:
http://mahlemiut.marpirc.net/mess_raiden.mp3 (sound effects are done
by the RF5C68, music is CD-DA).
Thanks,
Barry Rodewald
mailto:bsr@xnet.co.nz
- 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!)
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.
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.
---------- Forwarded message ----------
From: Atari Ace <atari_ace@verizon.net>
Date: Sat, Dec 26, 2009 at 5:01 PM
Subject: [patch] Header/static cleanups
To: submit@mamedev.org
Cc: atariace@hotmail.com
- Hide quoted text -
Hi mamedev,
This patch add some missing header declarations and static qualifiers,
and adjusts a few names. In the core, it adds validity.h for
consistency as well as an explicit foo.h in each foo.c.
~aa
Verified and corrected clocks in halleys and exctsccr [Corrado Tomaselli]
New clones added
----------------
Exciting Soccer (Japan set 2) [Corrado Tomaselli]
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.
---------- Forwarded message ----------
From: Oliver Stöneberg <oliverst@online.de>
Date: Thu, Dec 31, 2009 at 1:06 AM
Subject: enhanced dipswitch/configuration information in -listxml
To: submit@mamedev.org
This patch adds some additional information to the dipswitches and
configurations in the -listxml output, so I can test
dipswitches/configurations in mame_regtest by creating .cfg files.
By using this I already found two issues in MESS and the 1943
"Service Mode" issue in MAME would have been detected.
I am also wondering, if there are any dipswitches, that rely on more
than one port. If that's the case I might have to look at them and
change the output.
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.
side-effects:
- EEPROM memory is now visible in the debugger
- EEPROM memory can be accessed like any CPU/device memory
(i.e., use eeprom.b@<addr> instead of eeprom.eb@<addr>)
Removed support in the expression engine for EEPROM-specific
accesses.
Updated all systems that muck directly with EEPROM memory to
use memory accessors instead on the EEPROM address space.
Extended the devtempl.h file to support device address spaces.
Cleaned up romload a bit to make it clear that region flags are
enforced for any device with an address space, not just CPUs.
EEPROM data.
Updated EEPROM device to initialize EEPROM at NVRAM load time rather
than init time, giving DEVICE_INIT handlers a chance to muck with the
data first.
- Made compatible_with attribute available for MAME too (with NULL value set in GAMEL macro)
This patch require full recompile due to change of GAMEL macro
Comment: Added a MACHINE_START for LAGIRL, which doesn't want to work properly (assumes I have service mode ON?) The working method is still in place (using cachat's startup). The clock changes were per the source notes above the ROM_START. If anyone wants to get it working with the proper speeds, be my guest.
sub.c - Put in board ETAL and came up with some seeming better clock speed approximations until board readings can be done.
tron.c - Sets tron3 and tron4 don't appear to have a valid working cocktail mode video or controls (upright player2 works fine). Flagged as GAME_NO_COCKTAIL.
subs.c - Added DIP LOCATIONS.
Comment: I failed to look at the video timing when Guru's readme, this should correct the behavior. I also added the cpu/video bd numbers listed on Stefan Lindberg's reference board for Outrun.
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
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
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
default values from. Fixed bug in ROM loader that would change the
memory region flags to match devices with no address bus. Updated
groundfx to use the new default loading scheme.
---------- Forwarded message ----------
From: Atari Ace <atari_ace@verizon.net>
Date: Mon, Dec 14, 2009 at 5:43 AM
Subject: [patch] Eliminate generic.colorram
To: submit@mamedev.org
Cc: atariace@hotmail.com
Hi mamedev,
generic.colorram and generic.videoram are unused by the MAME core, and
are simply slots convenient for driver use. As such, the drivers are
better off using their own driver_data slots for these. To discourage
further use of colorram, this patch eliminates all current uses of it,
and the uses of videoram as well in the affected drivers. This is
partially a retrograde step, since ideally we'd like to introduce the
driver_data structs as well for these drivers, but eliminating
colorram and disentangling the various uses of generic makes it on the
balance an improvement IMHO.
~aa
---------- Forwarded message ----------
From: Christophe Jaillet <christophe.jaillet@wanadoo.fr>
Date: Mon, Dec 14, 2009 at 9:56 PM
Subject: Removal of a deprecated function
To: submit@mamedev.org
Hi,
a function in "drawgfx.c" is declared in "deprecat.h"
This function ("decodegfx(...)") is not used any more in the code, so it
could be removed.
Hope this help.
Best regards,
CJ
- 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
- 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
- added warning messages for auto_malloc, timer, and save state
allocations done after init time. These should be fixed when
detected, as I would eventually like to disallow them entirely.
- changed state registration functions to pass through the caller's
file and line number to facilitate fixing the above warnings
- converted Taito F3 sound to a separate machine driver which is
imported into games that use it
- converted the balsente driver to driver_data structure
- converted harddriv timers into devices
- fixed crash in cps2 games due to not configuring the qsound bank
- cleaned up initialization in taito_l to allocate at init time
instead of reset time
* moved k056800 sound device to emu/sound and removed the old code (mame/machine/konamiic.c )
* updated gticlub.c, hornet.c, nwk-tr.c, ultrsprt.c and zr107.c to use this implementation
* fixed various small (and not so small) problems in konicdev.c
* as a result Konami 007342, 007420, 052109, 052160 and 051316 devices are now working and 88games.c, battlnts.c, bladestl.c and rockrage.c have been updated to use them
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.
Out of whatsnew: Unfortunately, I was unable to make both malzak and p2000t (in MESS) to work without a small kludge, clearly documented in the source. I plan to further investigating the problem once I manage to merge the other 505x variants (later)
* added saves to 6522via.c. this fixes problems of gameplan.c and trvquest.c games with -autosave
* added driver data struct and save states to toratora.c and sf.c
* enable GAME_SUPPORTS_SAVE flag to dday.c because some of the core changes have fixed the sound problem at loading
* added a couple of comments about header inclusions
Also, added driver data struct and save states to laserbas.c, laserbat.c, lastfght.c, lazercmd.c and lemmings.c
Finally, added driver data struct to lasso.c
* 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
part. Some shared systems still exist with globals, but this
tackles the atarigen module and the variables local to each
driver.
Also added validity check that AM_BASE_MEMBER and AM_SIZE_MEMBER
items point within the bounds of the driver_data structure.
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
(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
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.
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.
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.
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.
Anyone who's ever been confused by the meaning of a given GCC or MSVC error diagnostic will enjoy this (it's color-coded in real life for added "wow"):
src/emu/memory.c:2148:5: error: comparison of distinct pointer types ('genf *' and 'void *')
check_entry_handler(write);
^~~~~~~~~~~~~~~~~~~~~~~~~~
src/emu/memory.c:2052:63: note: instantiated from:
if (entry->handler.generic != NULL && entry->handler.generic != SMH_RAM) \
~~~~~~~~~~~~~~~~~~~~~~ ^
>
> 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
---------- Forwarded message ----------
From: Atari Ace <atari_ace@verizon.net>
Date: Sun, Nov 29, 2009 at 3:28 AM
Subject: [patch] Convert cabal/mappy/toypop/zaxxon to use driver_data
To: submit@mamedev.org
Cc: atariace@hotmail.com
Hi mamedev,
This patch is a resubmit of my earlier patch to have mappy and zaxxon
store their state in driver_data. It extends the patch to toypop
(which uses some mappy code), and also converts cabal which I also did
some time ago. cabal.h and toypop.h are new header files.
~aa
Date: Sat, Nov 28, 2009 at 5:49 PM
Subject: [patch] Eliminate spriteram3
To: submit@mamedev.org
Cc: atariace@hotmail.com
Aaron's patch to move the generic pointers into machine conflicts with
a patch I'd worked on some time ago to start eliminating those globals
altogether, so I've become motivated to finally submit it ;-). This
patch eliminates spriteram3, which unlike the other spriteram
variables, is only a convenience for some drivers.
~aa
---------- 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
Added equivalent pointers to machine->generic. Updated all
references.
Now that accessing these is more awkward, it is probably best
to put these pointers in the driver data structures instead
of using the generic pointers. The main reason to continue
using generic pointers is to allow use of paletteram shortcuts
and buffered spriteram handling.
designed to hold generic pointers that are commonly used. For
now, only generic_nvram has moved there. Added AM_BASE_GENERIC
and AM_SIZE_GENERIC macros for initializing generic pointers
in memory maps. Also added AM_BASE_SIZE_GENERIC to set both
base and size in one step.
Moved global variables out of machine/generic and into a private
data structure hanging off of the running_machine. Added newly-
needed machine parameters to coin_counter_w, coin_lockout_w, and
coin_lockout_global_w. Also added machine parameter to
set_led_state.
Added interface functions to get the number of dispensed tickets
and to increment the count, to remove the need for direct access
to these global variables. Also added functions to get the
current count on a particular coin counter and to determine the
lockout state.
Future checkins will move the remaining generic pointers (for
paletteram, videoram, spriteram, colorram, etc.) into the new
generic_pointers structure.
Output ports are now affected by IP_ACTIVE_HIGH/IP_ACTIVE_LOW (eepromdev.c has active low cs).
The previous value for callbacks in inptport.c is now tracked per field. This saves recalculating it for PORT_CHANGED & conditional fields wouldn't always get updated correctly.
Tidied up eepromdev.c interface.
Updated device and input port lists to use the tagmap for
tag searches. Also removed the whole "quark" thing from the
validity checker in favor of using the tagmaps.
added output lines (IPT_OUTPUT), which can be written using new input_port_write* functions or directly from a memory map using AM_WRITE_PORT
converted adc083x to use io lines.
adc08x chips are all hooked up using input/output ports
reversed racing force steering wheel input and gas pedal, which is enough to get the game to boot.
reversed steering wheel input on winding heat, the usa cabinets are however hooked up the other way.
renamed adc0831_interface to adc083x_interface.
fixed adc083x gnd input
removed stray call logerror from adc083x.c
fixed default adc083x sars value
adc083x reset only affects outputs
Not 100% sure this is the better way to implement this (we pass the eeprom tag as parameter of the PORT_CUSTOM), but I haven't been able to find a better solution.
No driver uses this yet, so I'm open to any suggestion before to use it extensively ;)
I don't like too much this solution, but now the code is self contained: hence, better fixes (e.g. no MDRV_DEVICE_CONFIG_DATAPTR(eeprom_config, default_data, &_data) at all for the NODEFAULT eeprom?) could be added without further modifying the behavior across the drivers.
- 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
Switched the SMS and Game gear PSGs to use an XOR instead of XNOR feedback, but this needs further verification. Updated comments to show which chips are currently verified. Cleaned up comments.
- now properly generating TLB fill exceptions under correct circumstances
- TLB exceptions no longer trash low 4 bits of Context
- exceptions with the EXL bit set always go to vector 0x180