summaryrefslogtreecommitdiffstatshomepage
path: root/src/tools
Commit message (Collapse)AuthorAgeFilesLines
* Cleanups and version bump. Aaron Giles2010-01-161-3/+3
|
* First round of an attempted cleanup of header files in the system. Aaron Giles2010-01-102-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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!)
* NOTE: This change requires two new osd functions: osd_malloc() and Aaron Giles2010-01-083-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Make unidasm compile and link again. Make exception-aware (hopefully). Paul Priest2010-01-061-89/+105
| | | Note kludge of defining osd_break_into_debugger() since it is referenced from emu_fatalerror.
* Cleaned up braces in the code so that they are properly balanced. [Atari Ace] Aaron Giles2009-12-281-7/+11
|
* Results of running the latest srcclean. Aaron Giles2009-12-284-8/+8
|
* Updated srcclean to remove "invisible spaces" immediately preceding Aaron Giles2009-12-281-0/+8
| | | | tabs. [Atari Ace]
* From: Samuele Zannoli <samuele.zannoli@sparkbio.it> Aaron Giles2009-12-231-0/+2
| | | | | | | | | | | | | | | | | | | 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
* From: Atari Ace <atari_ace@verizon.net> Aaron Giles2009-12-232-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fixed srcclean handling of embedded comments within strings [Atari Ace] Phil Bennett2009-12-071-8/+11
| | | | | | | | | | | | | | | | | | | | (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
* Fixed srcclean handling of embedded comments within strings [Atari Ace] Phil Bennett2009-12-032-12/+33
| | | | | | | | | | | | | | | | | | | | ---------- 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.
* Added Intel 8008 and National Semiconductor SC/MP CPU cores Miodrag Milanovic2009-11-231-0/+4
|
* Cleanups and version bump.mame0135 Aaron Giles2009-10-311-3/+3
|
* Added -flipped option to unidasm to output with disassembly Aaron Giles2009-10-311-34/+66
| | | | first and address/data bytes afterwards in comment form.
* Change tools I wrote to be straight BSD. Aaron Giles2009-10-3110-34/+314
|
* chdman: add option to create uncompressed writeable HD images for MESS R. Belmont2009-10-281-0/+143
|
* > -----Original Message----- Aaron Giles2009-10-211-1/+0
| | | | | | | | | | | | | | | | | | > 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
* > From: atari_ace@verizon.net Aaron Giles2009-10-212-261/+321
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > 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.
* Relaxed romcmp filename length restriction Phil Bennett2009-10-121-1/+1
|
* Only applied the first patch. The second one I'll save for the next Aaron Giles2009-10-031-21/+22
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* > From: Atari Ace [mailto:atari_ace@verizon.net] Aaron Giles2009-09-101-1/+1
| | | | | | | | | | | | | | | > 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
* Added 'options' parameter to the CPU_DISASSEMBLE prototype. For now, the Aaron Giles2009-09-071-6/+25
| | | | | debugger always passes 0 for this. unidasm has been updated to accept a mode parameter, which is passed for the options.
* Fixed stupid unidasm bug that double-counted bytes. Aaron Giles2009-09-061-2/+2
|
* unidasm.c needs some type casts. Aaron Giles2009-09-061-7/+7
| | | | | Juergen
* Added preliminary Zilog Z8 CPU core for MESS. Curt Coder2009-09-041-0/+2
|
* Cleanups and version bump.mame0133u4 Aaron Giles2009-08-291-20/+20
|
* Usage for unidasm now dumps the available achitectures. Aaron Giles2009-08-291-1/+15
|
* Ok, disassembler is implemented with basic functionality. Aaron Giles2009-08-221-34/+234
|
* Added infrastructure to compile universal standalone disassembler: Aaron Giles2009-08-222-0/+333
| | | | | | | | | | | - 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.
* Added some missing casts and other minor tweaks. Aaron Giles2009-08-191-1/+1
|
* Oops forgot part of the CHD changes. Aaron Giles2009-08-021-1/+1
|
* Fix chdman -update to leave the write protect state alone when updating Aaron Giles2009-08-021-4/+4
| | | | uncompressed CHDs. [Michael Zapf]
* Oops, meant to say "core_stricmp" Aaron Giles2009-07-161-3/+4
|
* Cleanups and version bump.mame0132u5 Aaron Giles2009-07-161-42/+42
|
* Forgot to add it to the list of tools. Aaron Giles2009-07-161-0/+1
|
* Never send a monster to do the work of an evil scientist... Aaron Giles2009-07-161-0/+441
|
* From: David Haywood [neohaze@nildram.co.uk] Aaron Giles2009-07-161-0/+13
| | | | | | | | | | | | | | | | | | | | | | | 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)
* Added casts to ensure proper values are passed to the ctype.h functions. Aaron Giles2009-06-255-18/+18
| | | | [Juergen Buchmueller]
* Fixed buffer overflow with longer driver names. Aaron Giles2009-05-131-1/+1
|
* Added missing casts and made other tweaks. The entire project Aaron Giles2009-04-277-51/+51
| | | | | can now be optionally compiled with the C++ compiler (mingw g++ only for the moment; MSVC still has issues).
* Cleanups and version bump. Aaron Giles2009-03-191-13/+13
|
* Fixed bug where chdman -extract would not truncate to the logical size. Aaron Giles2009-03-161-0/+1
|
* Added new function core_fload() to load a file into an allocated buffer. Aaron Giles2009-03-113-84/+27
| | | | | | | | 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).
* Moved chd_clone_metadata code into chdman.c so that it can intelligently Aaron Giles2009-03-101-16/+202
| | | | | | | | | | | | | | | 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.
* Redid metadata hashing. A digest of tags and hashes for each Aaron Giles2009-03-101-25/+0
| | | | | | | 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.
* NOTE: With the change, all existing CHD diff files are invalid. Aaron Giles2009-03-091-37/+278
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Added flags to the metadata entries, encoded in the top bit. Right now Aaron Giles2009-03-053-14/+14
| | | | | it is a no-op, but eventually will be used to indicate which bits of metadata are included in the overall checksum.
* This patch just cleans up some memory and file handles in the error Aaron Giles2009-01-041-0/+7
| | | | | | cases of ldverify. The initial memory leak was rsound and exposed by cppcheck [Oliver Stoeneberg]
* Modified regrep to display the soruce file. Aaron Giles2008-12-131-1/+1
|
* Enhanced runtest to use all available processors. Aaron Giles2008-11-241-20/+54
|