summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/romload.h
Commit message (Collapse)AuthorAgeFilesLines
* final touch on romload modernization (nw) Miodrag Milanovic2016-01-111-3/+2
|
* vector instead of simple_list (nw) Miodrag Milanovic2016-01-111-7/+2
|
* modernize rom_load_manager (nw) Miodrag Milanovic2016-01-111-26/+94
|
* New games marked as GAME_NOT_WORKING ------------------------------------ ↵ Ville Linde2015-08-181-0/+1
| | | | ROLLing eX.tre.me [Ville Linde, Guru]
* License self-service. Aaron Giles2015-05-251-1/+1
| | | | | | License self-service. Mostly adding attribution where I made significant contributions. In a few cases files I previously missed were default-attributed to Nicola.
* Added some for Nathan and some more for Nicola (nw) Miodrag Milanovic2015-05-111-6/+2
|
* Added dummy license headers for EMU section (nw) Miodrag Milanovic2015-05-071-0/+2
|
* small cleanup (nw) Miodrag Milanovic2015-04-221-2/+2
|
* moved all to std::string (nw) Miodrag Milanovic2015-04-221-1/+1
|
* some astring to std::string conversion (nw) Miodrag Milanovic2015-04-181-3/+3
|
* core: Add per-game parameters [O. Galibert] Olivier Galibert2015-01-251-2/+18
| | | | | | | | | | | | | | | | Per-game parameters are (tag, value) pairs that follow the same tag structure than everything else. They're added within a ROM section with ROM_PARAMETER(tag, value). You look them up through the device method parameter(tag) which returns the string, or "" if not present. A *lot* of drivers can benefit from that stuff. It should kill most game-name keyed tables, and the alternative approach of bazillon-of-driver-inits. Possible evolutions, if someone wants to do it: - output them in -listxml - push the softlist parameters present in the xml through that - maybe allow to change/set them through the command line
* Moved core template container classes up from emutempl.h to coretmpl.h: Aaron Giles2014-03-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Aaron Giles] * these classes now no longer take a resource_pool; everything is managed globally -- this means that objects added to lists must be allocated with global_alloc * added new auto_pointer<> template which wraps a pointer and auto-frees it upon destruction; it also defaults to NULL so it doesn't need to be explicitly initialized * moved tagged_list template to tagmap.h Redo of the low-level memory tracking system: [Aaron Giles] * moved low-level tracking out of emu\emualloc into lib\util\corealloc so it can be shared among all components and used by core libraries * global_alloc and friends no longer use a resource pool to track allocations; turns out this was a wholly redundant system that wasted a lot of memory * removed global_resource_pool entirely * added global_free_array to delete arrays allocated with global_alloc_array * added tracking of object versus array allocation; we will now error if you use global_free on an array, or global_free_array on an object Added new utility helper const_string_pool which can be used to efficiently accumulate strings that are not intended to be modified. Used by updated makelist and software list code. [Aaron Giles] Updated png2bdc and makelist tools to not leak memory and use more modern techniques (no more MAX_DRIVERS in makelist, for example). [Aaron Giles] Deprecated auto_strdup and removed all uses by way of caller-managed astrings and the software list rewrite. [Aaron Giles] Rewrote software list management: [Aaron Giles] * removed the notion of a software_list that is separate from a software_list_device; they are one and the same now * moved several functions into device_image_interface since they really didn't belong in the core software list class * lots of simplification as a result of the above changes Additional notes (no whatsnew): Moved definition of FPTR to osdcomm.h. Some changes happened in the OSD code to fix issues, especially regarding freeing arrays. SDL folks may need to fix up some of these. The following devices still are using tokens and should be modernized (I found them because they kept their token as void * and tried to delete it, which you can't): namco_52xx_device (mame/audio/namco52.c) namco_54xx_device (mame/audio/namco54.c) namco_06xx_device (mame/machine/namco06.c) namco_50xx_device (mame/machine/namco50.c) namco_51xx_device (mame/machine/namco51.c) namco_53xx_device (mame/machine/namco53.c) voodoo_device (emu/video/voodoo.c) mos6581_device (emu/sound/mos6581.c) aica_device (emu/sound/aica.c) scsp_device (emu/sound/scsp.c) dmadac_sound_device (emu/sound/dmadac.c) s3c2440_device (emu/machine/s3c2440.c) wd1770_device (emu/machine/wd17xx.c) latch8_device (emu/machine/latch8.c) duart68681_device (emu/machine/68681.c) s3c2400_device (emu/machine/s3c2400.c) s3c2410_device (emu/machine/s3c2410.c) strataflash_device (mess/machine/strata.c) hd63450_device (mess/machine/hd63450.c) tap_990_device (mess/machine/ti99/990_tap.c) omti8621_device (mess/machine/omti8621.c) vdt911_device (mess/video/911_vdt.c) apollo_graphics_15i (mess/video/apollo.c) asr733_device (mess/video/733_asr.c)
* removed DISK_ISOPTIONAL macro in favor of identical ROM_ISOPTIONAL (nw) Oliver Stöneberg2013-09-241-1/+0
|
* Cleanups and version bumpmame0148 Miodrag Milanovic2013-01-111-144/+144
|
* Display correct software load messages depending of supported attribute ↵ Miodrag Milanovic2012-08-121-0/+1
| | | | value (no whatsnew)
* Made UI for BIOS selection where applicable, and moved info about current Miodrag Milanovic2012-04-301-6/+0
| | | system and default bios to device_t class (no whatsnew)
* Removed rom_source abstraction, which was just mapping to devices Aaron Giles2012-02-201-13/+2
| | | | | anyways. Updated everyone involved to just iterate over devices directly.
* Major CHD/chdman update. The CHD version number has been increased Aaron Giles2012-02-161-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from 4 to 5. This means any diff CHDs will no longer work. If you absolutely need to keep the data for any existing ones you have, find both the diff CHD and the original CHD for the game in question and upgrade using these commands: rename diff\game.dif diff\game-old.dif chdman copy -i diff\game-old.dif -ip roms\game.chd -o diff\game.dif -op roms\game.chd -c none Specifics regarding this change: Defined a new CHD version 5. New features/behaviors of this version: - support for up to 4 codecs; each block can use 1 of the 4 - new LZMA codec, which tends to do better than zlib overall - new FLAC codec, primarily used for CDs (but can be applied anywhere) - upgraded AVHuff codec now uses FLAC for encoding audio - new Huffman codec, used to catch more nearly-uncompressable blocks - compressed CHDs now use a compressed map for significant savings - CHDs now are aware of a "unit" size; each hunk holds 1 or more units (in general units map to sectors for hard disks/CDs) - diff'ing against a parent now diffs at the unit level, greatly improving compression Rewrote and modernized chd.c. CHD versions prior to 3 are unsupported, and version 3/4 CHDs are only supported for reading. Creating a new CHD now leaves the file open. Added methods to read and write at the unit and byte level, removing the need to handle this manually. Added metadata access methods that pass astrings and dynamic_buffers to simplify the interfaces. A companion class chd_compressor now implements full multithreaded compression, analyzing and compressing multiple hunks independently in parallel. Split the codec implementations out into a separate file chdcodec.* Updated harddisk.c and cdrom.c to rely on the caching/byte-level read/ write capabilities of the chd_file class. cdrom.c (and chdman) now also pad CDs to 4-frame boundaries instead of hunk boundaries, ensuring that the same SHA1 hashes are produced regardless of the hunk size. Rewrote chdman.exe entirely, switching from positional parameters to proper options. Use "chdman help" to get a list of commands, and "chdman help <command>" to get help for any particular command. Many redundant commands were removed now that additional flexibility is available. Some basic mappings: Old: chdman -createblankhd <out.chd> <cyls> <heads> <secs> New: chdman createhd -o <out.chd> -chs <cyls>,<heads>,<secs> Old: chdman -createuncomphd <in.raw> <out.chd> .... New: chdman createhd -i <in.raw> -o <out.chd> -c none .... Old: chdman -verifyfix <in.chd> New: chdman verify -i <in.chd> -f Old: chdman -merge <parent.chd> <diff.chd> <out.chd> New: chdman copy -i <diff.chd> -ip <parent.chd> -o <out.chd> Old: chdman -diff <parent.chd> <compare.chd> <diff.chd> New: chdman copy -i <compare.chd> -o <diff.chd> -op <parent.chd> Old: chdman -update <in.chd> <out.chd> New: chdman copy -i <in.chd> -o <out.chd> Added new core file coretmpl.h to hold core template classes. For now just one class, dynamic_array<> is defined, which acts like an array of a given object but which can be appended to and/or resized. Also defines dynamic_buffer as dynamic_array<UINT8> for holding an arbitrary buffer of bytes. Expect to see these used a lot. Added new core helper hashing.c/.h which defines classes for each of the common hashing methods and creator classes to wrap the computation of these hashes. A future work item is to reimplement the core emulator hashing code using these. Split bit buffer helpers out into C++ classes and into their own public header in bitstream.h. Updated huffman.c/.h to C++, and changed the interface to make it more flexible to use in nonstandard ways. Also added huffman compression of the static tree for slightly better compression rates. Created flac.c/.h as simplified C++ wrappers around the FLAC interface. A future work item is to convert the samples sound device to a modern device and leverage this for reading FLAC files. Renamed avcomp.* to avhuff.*, updated to C++, and added support for FLAC as the audio encoding mechanism. The old huffman audio is still supported for decode only. Added a variant of core_fload that loads to a dynamic_buffer. Tweaked winwork.c a bit to not limit the maximum number of processors unless the work queue was created with the WORK_QUEUE_FLAG_HIGH_FREQ option. Further adjustments here are likely going to be necessary. Fixed bug in aviio.c which caused errors when reading some AVI files.
* - Updated romload so devices are loaded from separate files [Miodrag Milanovic] Miodrag Milanovic2011-08-021-5/+0
| | | | | | | | - Removed LOADBYNAME, since it is deprecated by using per device rom load_software_part_region - Created makedev tool to generate array of devices, and created lst file according to current devices usage. - Changed listxml command to output device roms too
* nvram - in case of multiple bioses, system nvram will be saved in [Miodrag ↵ Miodrag Milanovic2011-07-061-0/+5
| | | | | | Milanovic] form systemname_biosnum.nv in cases when non-default bios is used. For default bios selection all stay the same.
* Collapsed device_config and device_t into one class. Updated all Aaron Giles2011-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | existing modern devices and the legacy wrappers to work in this environment. This in general greatly simplifies writing a modern device. [Aaron Giles] General notes: * some more cleanup probably needs to happen behind this change, but I needed to get it in before the next device modernization or import from MESS :) * new template function device_creator which automatically defines the static function that creates the device; use this instead of creating a static_alloc_device_config function * added device_stop() method which is called at around the time the previous device_t's destructor was called; if you auto_free anything, do it here because the machine is gone when the destructor is called * changed the static_set_* calls to pass a device_t & instead of a device_config * * for many devices, the static config structure member names over- lapped the device's names for devcb_* functions; in these cases the members in the interface were renamed to have a _cb suffix * changed the driver_enumerator to only cache 100 machine_configs because caching them all took a ton of memory; fortunately this implementation detail is completely hidden behind the driver_enumerator interface * got rid of the macros for creating derived classes; doing it manually is now clean enough that it isn't worth hiding the details in a macro
* BIG update. Aaron Giles2011-03-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove redundant machine items from address_space and device_t. Neither machine nor m_machine are directly accessible anymore. Instead a new getter machine() is available which returns a machine reference. So: space->machine->xxx ==> space->machine().xxx device->machine->yyy ==> device->machine().yyy Globally changed all running_machine pointers to running_machine references. Any function/method that takes a running_machine takes it as a required parameter (1 or 2 exceptions). Being consistent here gets rid of a lot of odd &machine or *machine, but it does mean a very large bulk change across the project. Structs which have a running_machine * now have that variable renamed to m_machine, and now have a shiny new machine() method that works like the space and device methods above. Since most of these are things that should eventually be devices anyway, consider this a step in that direction. 98% of the update was done with regex searches. The changes are architected such that the compiler will catch the remaining errors: // find things that use an embedded machine directly and replace // with a machine() getter call S: ->machine-> R: ->machine\(\)\. // do the same if via a reference S: \.machine-> R: \.machine\(\)\. // convert function parameters to running_machine & S: running_machine \*machine([^;]) R: running_machine \&machine\1 // replace machine-> with machine. S: machine-> R: machine\. // replace &machine() with machine() S: \&([()->a-z0-9_]+machine\(\)) R: \1 // sanity check: look for this used as a cast (running_machine &) // and change to this: *(running_machine *)
* Converted core_options to a class. Removed a bunch of marginal Aaron Giles2011-03-031-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | functionality in favor of alternate mechanisms. Errors are now reported via an astring rather than via callbacks. Every option must now specify a type (command, integer, float, string, boolean, etc). Command behavior has changed so that only one command is permitted. [Aaron Giles] Changed fileio system to accept just a raw searchpath instead of an options/option name combination. [Aaron Giles] Created emu_options class dervied from core_options which wraps core emulator options. Added mechanisms to cleanly change the system name and add/remove system-specific options, versus the old way using callbacks. Also added read accessors for all the options, to ensure consistency in how parameters are handled. Changed most core systems to access emu_options instead of core_options. Also changed machine->options() to return emu_options. [Aaron Giles] Created cli_options class derived from emu_options which adds the command-line specific options. Updated clifront code to leverage the new class and the new core behaviors. cli_execute() now accepts a cli_options object when called. [Aaron Giles] Updated both SDL and Windows to have their own options classes, derived from cli_options, which add the OSD-specific options on top of everything else. Added accessors for all the options so that queries are strongly typed and simplified. [Aaron Giles] Out of whatsnew: I've surely screwed up some stuff, though I have smoke tested a bunch of things. Let me know if you hit anything odd. Also I know this change will impact the WINUI stuff, please let me know if there are issues. All the functionality necessary should still be present. If it's not obvious, please talk to me before adding stuff to the core_options class.
* Hash generation and general cleanup. New class hash_collection holds Aaron Giles2011-02-141-9/+0
| | | | | | | | | | | and manages a collection of hashes, and can be built from an internal format string which is stored with each ROM. All core instances are cleaned up to use the new interfaces, but it's likely that hashfile code in MESS will need an update. Also compacted the form of the hash strings used for ROMs, and fixed verification/hashing of non-ZIPped files.
* mame_file is now emu_file and is a class. It is required Aaron Giles2011-02-121-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | to pass a core_options object to the constructor, along with a search path. This required pushing either a running_machine or a core_options through some code that wasn't previously ready to handle it. emu_files can be reused over multiple open/close sessions, and a lot of core code cleaned up nicely as things were converted to them. Also created a file_enumerator class for iterating over files in a searchpath. This replaces the old mame_openpath functions. Changed machine->options() to return a reference. Removed public nvram_open() and fixed jchan/kaneko16 to stop directly saving NVRAM. Removed most of the mame_options() calls; this will soon go away entirely, so don't add any more. Added core_options to device_validity_check() so they can be used to validate things.
* Added information screen output for any game known to have bad or missing ↵ Scott Stone2011-02-101-1/+4
| | | | data in order to better inform the user as to the reason their emulation may not work as expected. [Alex Jackson]
* Moved the state saving system to C++. For now the registration macros Aaron Giles2011-02-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | are still intact. The new state_manager class has templatized methods for saving the various types, and through template specialization can save more complex system types cleanly (like bitmaps and attotimes). Added new mechanism to detect proper state save types. This is much more strict and there will likely be some games/devices that fatalerror at startup until they are remedied. Spot checking has caught the more common situations. The new state_manager is embedded directly in the running_machine, allowing objects to register state saving in their constructors now. Added NAME() macro which is a generalization of FUNC() and can be used to wrap variables that are registered when directly using the new methods as opposed to the previous macros. For example: machine->state().save_item(NAME(global_item)) Added methods in the device_t class that implicitly register state against the current device, making for a cleaner interface. Just a couple of required regexes for now: state_save_register_postload( *)\(( *)([^,;]+), * \3->state().register_postload\1\(\2 state_save_register_presave( *)\(( *)([^,;]+), * \3->state().register_presave\1\(\2
* softlists: added WARNING if loading a software with supported="partial" or ↵ Fabio Priuli2011-01-141-1/+1
| | | | "no" [Fabio Priuli]
* romload.c: added support for split set to softlist (for cart, cd and hd) ↵ Fabio Priuli2011-01-131-0/+5
| | | | | | | | | | | | | [Fabio Priuli] out of whatsnew: to avoid too much duplicate code, I implemented this as follow: for parent, we pass a location tag "list/parentname" to search for the roms (no changes in this case); for clones, we pass a composed location tag "list/clonename%list/parentname" (notice the '%' separator) and then it is open_rom_file to split it, if it finds a %, before searching for the rom. out of whatsnew, 2: I also added the same support for cassettes and floppies (in devimage.c), but it is still commented out because I had only a few files for testing. as soon as I'm sure nothing gets broken, I'll enable it.
* Added CHD support in softlists [Miodrag Milanovic] Miodrag Milanovic2011-01-101-2/+2
|
* running_device -> device_t Aaron Giles2010-12-311-1/+1
| | | | | They both already existed. No sense in having two names for the same object type.
* Changed driver_device to expose the game_driver's ROMs through the Aaron Giles2010-09-031-4/+4
| | | | | | | | | | | | | | | | | device interface. This means all ROMs are now exposed via devices, and thus the process of enumerating ROMs gets simpler. Changed all instances of temporarily allocating machine_config objects to just put them on the stack for simplicity, letting the destructor handle the cleanup work automatically. Changed machine_config constructor to take a game_driver, from which the machine_config constructor is obtained. This also means the resulting machine_config holds a reference to the game_driver. Changed running_machine constructor to no longer take a game_driver, since the game_driver is now obtainable via the machine_config.
* - Moved softlist implementation from MESS [Miodrag Milanovic] Miodrag Milanovic2010-06-201-3/+0
| | | | | - Moved image related UI from MESS to emu core - Reimplemented filename related image device calls
* Added back software list support in emu core, and update 6510 and SM8500 cpu ↵ Miodrag Milanovic2010-06-131-0/+4
| | | | cores with calls needed by MESS (no whatsnew)
* First round of an attempted cleanup of header files in the system. Aaron Giles2010-01-101-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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!)
* Extended the astring class wrapper into something useful, and Aaron Giles2010-01-081-1/+1
| | | | | | | | | | | | | | | | | | 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.
* NOTE: This change requires two new osd functions: osd_malloc() and Aaron Giles2010-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Results of running the latest srcclean. Aaron Giles2009-12-281-1/+1
|
* > -----Original Message----- Aaron Giles2009-08-131-2/+2
| | | | | | | | | | | | | | | | | | | | > From: Atari Ace [mailto:atari_ace@verizon.net] > Sent: Monday, August 03, 2009 10:52 PM > To: submit@mamedev.org > Cc: atariace@hotmail.com > Subject: [patch] De-globalize romload.c/validity.c > > Hi mamedev, > > Static and global variables in the core of MAME have slowly been > replaced with opaque structures latched onto the running machine. This > patch extends this idiom to two more files, romload.c and validity.c. > validity.c in fact didn't need any global state (it was used only to > pass data between function calls), and romload.c already had a struct > that largely served that purpose. > > ~aa
* Removed PREDECODE_GFX compile flag, as the on-the-fly decoding seems Aaron Giles2009-07-091-5/+0
| | | | | | | | to be working reliably. Deprecated the ROMREGION_DISPOSE flag, as 98% of the use of it no longer is applicable with on-the-fly decoding, and the remaining cases are difficult to identify among the others.
* Bulk change alert. Aaron Giles2009-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This update changes the way we handle memory allocation. Rather than allocating in terms of bytes, allocations are now done in terms of objects. This is done via new set of macros that replace the malloc_or_die() macro: alloc_or_die(t) - allocate memory for an object of type 't' alloc_array_or_die(t,c) - allocate memory for an array of 'c' objects of type 't' alloc_clear_or_die(t) - same as alloc_or_die but memset's the memory to 0 alloc_array_clear_or_die(t,c) - same as alloc_array_or_die but memset's the memory to 0 All original callers of malloc_or_die have been updated to call these new macros. If you just need an array of bytes, you can use alloc_array_or_die(UINT8, numbytes). Made a similar change to the auto_* allocation macros. In addition, added 'machine' as a required parameter to the auto-allocation macros, as the resource pools will eventually be owned by the machine object. The new macros are: auto_alloc(m,t) - allocate memory for an object of type 't' auto_alloc_array(m,t,c) - allocate memory for an array of 'c' objects of type 't' auto_alloc_clear(m,t) - allocate and memset auto_alloc_array_clear(m,t,c) - allocate and memset All original calls or auto_malloc have been updated to use the new macros. In addition, auto_realloc(), auto_strdup(), auto_astring_alloc(), and auto_bitmap_alloc() have been updated to take a machine parameter. Changed validity check allocations to not rely on auto_alloc* anymore because they are not done in the context of a machine. One final change that is included is the removal of SMH_BANKn macros. Just use SMH_BANK(n) instead, which is what the previous macros mapped to anyhow.
* Defined ROM_LOAD64_WORD/ROM_LOAD64_WORD_SWAP in emu/romload.h Phil Bennett2009-01-211-0/+3
|
* romload cleanups: Aaron Giles2009-01-021-8/+44
| | | | | | | | | | | - added running_machine to internal structure, removed as explicit parameter - added new function rom_file_size() to compute the size of a ROM - removed rom_first_chunk() and rom_next_chunk() which are no longer needed - changed progress display to be based on size of ROMs loaded, not number - changed temporary load buffer to be dynamically allocated - fixed reload logic to handle skipped BIOSes Also changed rand_memory() to use a fixed seed for consistent behavior.
* Removed a couple of unnecessary typedefs from mamecore.h. Aaron Giles2009-01-021-19/+0
| | | | | Updated romload to use an astring for accumulating errors (I always feared busting that buffer with some huge romlist).
* Added the ability for a ROMset to specify a default BIOS. Use Aaron Giles2008-12-311-0/+3
| | | | | ROM_DEFAULT_BIOS("biosname") in the ROM definition. This can be used to ensure a correct default BIOS for ROM versions that care.
* Added macros to access ROM and MACHINE_DRIVER by name. Curt Coder2008-11-261-1/+2
|
* cleaned up STV rom loading a bit davidhay2008-10-181-1/+3
|
* CPUs, sound chips, devices, and ROM-regions which are specified by devices Aaron Giles2008-09-081-2/+4
| | | | | | | | | | | | | | | | | now have their tags auto-prefixed with the device's tag. This allows for multiple instances to be present. For example, the PR-8210 laserdisc player has a CPU with a tag of "pr8210". When it is included as a device by a driver, the driver may tag the device "laserdisc". The resulting final CPU tag name will be "laserdisc:pr8210". Also updated the debugger expression engine to support names with embedded colons. Added warnings to ensure that tags used for CPUs, sound chips, regions, and devices follow some basic rules: they should be less than 12 characters long, be all lower-case, and only contain letters, numbers, underscores, or dots (no spaces). This is to ensure that they can be used properly in debugger expressions and don't get too long or unwieldy to type (even 12 chars is a bit long).
* Added concept of rom sources to the rom loader. Updated auditing, Aaron Giles2008-09-061-2/+7
| | | | | CLI utilities, validity checks, and ROM loading to use these new functions so that device-specific ROMs are handled properly.
* Added new device interface selector: DEVINFO_PTR_ROM_REGION. This allows a Aaron Giles2008-09-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | device to provide a set of ROM regions to be loaded along with the game ROMs. It is expected that most regions defined for devices will use the ROMREGION_LOADBYNAME flag to enable the ROMs to live in a central location. Added new device interface selector: DEVINFO_PTR_MACHINE_CONFIG. This allows a device to specify a partial machine driver which is appended to the end of the machine driver for any game using that device. The intention for this is to allow devices which have their own BIOS logic to specify CPUs and other characteristics common to all systems using the device. Added new ROMREGION flag: ROMREGION_LOADBYNAME, which means that if the ROMs in that region are not found in the usual driver files, then the name of the region will be used as a driver filename for loading. Extended the ldcore interface structure to allow each player type to provide its own ROM region and partial machine driver. Moved preliminary PR-8210 emulation code from ldplayer.c to ldpr8210.c. It is currently disabled behind the EMULATE_PR8210_ROM compile time flag.