| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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!)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
| |
Note kludge of defining osd_break_into_debugger() since it is referenced from emu_fatalerror.
|
| |
|
| |
|
|
|
|
| |
tabs. [Atari Ace]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
---------- Forwarded message ----------
From: Atari Ace <atari_ace@verizon.net>
Date: Wed, Dec 2, 2009 at 2:14 AM
Subject: [patch] Fix srcclean to handle strings
To: submit@mamedev.org
Cc: atariace@hotmail.com
Hi mamedev,
I noticed an odd case in src2html.c where tabs were converted to
spaces unnecessarily. Turns out srcclean does not track quoted
strings, so an embedded comment in a string will be treated the same
as a comment. Attached is a patch to fix this.
~aa
P.S. The *.lay files could use a run through srcclean.
|
| |
|
| |
|
|
|
|
| |
first and address/data bytes afterwards in comment form.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> From: Atari Ace [mailto:atari_ace@verizon.net]
> Sent: Saturday, October 17, 2009 12:14 PM
> To: submit@mamedev.org
> Cc: atariace@hotmail.com
> Subject: [patch] Remove dead prototypes
>
> Hi mamedev,
>
> This patch mostly removes dead prototypes, especially in source files
> as opposed to header files which I've previously audited. It also
> migrates a few prototypes to existing header files, and adds missing
> prototypes to segamsys.h.
>
> ~aa
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> To: submit@mamedev.org
> CC: atariace@hotmail.com
> Subject: [patch] Eliminate more .data
> Date: Wed, 7 Oct 2009 08:51:56 -0700
>
> Hi mamedev,
>
> Most variables in .data are likely to lead to multisession bugs, so it
> is best to eliminate them and add explicit init/reset code for them
> instead. This patch does that for almost all the cases, with a few
> changes deserving some comments:
>
> z180: cc was global when it should be per-cpu.
> nesapu: the noise table would be different run to run in multisession
> which probably wasn't intended.
> astring: i constified the dummy string to make it impossible to
> modify.
> mediagx: hits was separated from the constant data
> tecmosys: i reduced the number of exports and renamed them to use
> tecmosys_ as a prefix.
> atari: i moved the renderer function into ANTIC.
> naomibd: the array provided to x76f100 was too small and might have
> caused memory corruption.
> n64: i constified the one and zero colors, requiring many more const
> qualifiers to be added.
> ldverify: i encapsulated the audio and video variables to reduce the
> amount of global state.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
full release so we don't have a giant spacing diff.
--
> -----Original Message-----
> From: Atari Ace [mailto:atari_ace@verizon.net]
> Sent: Thursday, October 01, 2009 8:13 AM
> To: submit@mamedev.org
> Cc: atariace@hotmail.com
> Subject: [patch] srcclean perf, stye improvements
>
> Hi mamedev,
>
> srcclean.exe has a minor performance bug with it tab removing
> algorithm, in that the cost of removing n tabs is O(n^2). The first
> patch fixes this by always tracking the current column. The second
> patch then implements a new clean idiom, that spaces before tabs that
> are "invisible" should be removed. This change finds ~14k invisible
> spaces in MAME, so I suspect there may be some hesitation to adopt it.
>
> ~aa
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> Sent: Monday, September 07, 2009 8:08 PM
> To: submit@mamedev.org
> Cc: atariace@hotmail.com
> Subject: [patch] const/static/include fixes
>
> Hi mamedev,
>
> A result of some code auditing, this patch adds missing static and
> const qualifiers, and fixes up some header files.
>
> ~aa
|
|
|
|
|
| |
debugger always passes 0 for this. unidasm has been updated to accept a
mode parameter, which is passed for the options.
|
| |
|
|
|
|
|
| |
Juergen
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- added unidasm to the tools build
- split the disassemblers out of libcpu and into new libdasm
- ensured the disassembly entry points for all disassemblers are
in the source file for the disassembler (sometimes new generic
versions were created)
Still needs command line options and file loading, but the
fundamentals are present, and it links.
|
| |
|
| |
|
|
|
|
| |
uncompressed CHDs. [Michael Zapf]
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sent: Wednesday, July 15, 2009 3:36 PM
To: Aaron Giles; Angelo Salese; Klaus Sommer, B.Sc
Subject: new clones - witch card , scherrym
This adds the recent team europe dumps. I haven't looked at them much
'Poker' is another Witch Card set
'Super Cherry Master' runs on cb2001 hardware, but the graphic rom is
missing.
new clones
-----------
Witch Card (german?) [Team Europe / Dumping Union]
new not working
-----------------
Super Cherry Master [Team Europe / Dumping Union] (incomplete set)
|
|
|
|
| |
[Juergen Buchmueller]
|
| |
|
|
|
|
|
| |
can now be optionally compiled with the C++ compiler (mingw g++
only for the moment; MSVC still has issues).
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Updated src2html, regrep, and chdman tools to use this function where
appropriate.
In chdman, changed -addmeta to -addmetatext or -addmetabin to explicitly
specify the type of data (previous auto-detect was too dangerous).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
update old tags.
Modified cdrom.c to expose metadata read/write functions, and changed
chdman to use them. Also changed chdman to parse old-style metadata and
convert it to new-style metadata since we're going to need to re-do this
anyway and the two won't hash to the same value.
Added completely untested support for the ident metadata to the hard
disk creation path. If a filename is provided immediately after the
source filename, it is taken as an ident file and processed for CHS
data and added. Other metadata types can be added afterwards via
-addmeta.
|
|
|
|
|
|
|
| |
piece of metadata along with the hash for the raw data is then
hashed to produce the final SHA1.
Updated romload to skip the obsolete MD5 field.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updated CHD format to version 4. Checksums are now computed and
stored separately for raw data and metadata, and metadata is now
checksummed by default.
We will need to go through all existing CHDs, run a chdman -update
on them, and update the SHA1s stored in the drivers to accommodate
this (MD5s should be removed).
Updated chdman to support a generic metadata addition system:
chdman -addmeta <chdfile> <tag> [<index>] <sourcefile>
The <sourcefile> is examined and if it appears to be strictly text,
any EOFs and trailing EOLs are stripped, and the result is NULL-
terminated to match the behavior of existing metadata.
Updated chdman to report and fix errors in the raw and metadata
SHA1s.
Changed the CHD verify interfaces to pass back a structure containing
all the necessary data for verification and fixing.
|
|
|
|
|
| |
it is a no-op, but eventually will be used to indicate which bits of
metadata are included in the overall checksum.
|
|
|
|
|
|
| |
cases of ldverify. The initial memory leak was rsound and exposed by
cppcheck [Oliver Stoeneberg]
|
| |
|
| |
|