summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/osdmini (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Final round of struct/union/enum normalization. Aaron Giles2012-09-161-1/+1
|
* added missing \n to some fatalerror() calls (no whatsnew) Oliver Stöneberg2012-08-181-1/+1
|
* (Finally found the time to finish this....) Aaron Giles2011-05-302-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | Low-level input upgrade. Classes now exist for input_codes, input_items, input_devices, and input_seqs. Also created an input_manager class to hold machine-global state and made it accessible via machine.input(). Expanded the device index range (0-255, up from 0-16), and the OSD can now specify the device index explicitly if they can better keep the indexes from varying run-to-run. [Aaron Giles] Note that I've built and run SDL on Windows, but not all the code paths were exercised. If you use mice/joysticks extensively double-check them to be sure it all still works as expected. This is mainly an OSD and core change. The only thing impacting drivers is if they query for specific keys for debugging. The following S&Rs took care of most of that: S: input_code_pressed( *)\(( *)([^, ]+) *, * R: \3\.input\(\)\.code_pressed\1\(\2 S: input_code_pressed_once( *)\(( *)([^, ]+) *, * R: \3\.input\(\)\.code_pressed_once\1\(\2
* Oops. Ryan Holtz2011-05-231-1/+1
|
* HLSL Updates: [Ryan Holtz, Bat Country Entertainment] Ryan Holtz2011-05-221-0/+10
| | | | - Created a new OSD function, osd_get_slider_list, which allows OS-specific slider controls. - Plumbed new OSD-specific slider controls for HLSL parameters on Direct3D 9 targets. And there was much rejoicing.
* (Big tangle of changes that all happened as I was looking into the ROM Aaron Giles2011-04-132-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | loader rewrite, which is still in progress....) Replaced mamedriv.c with a new driver list mechanism that is generated by the build tools. The emulator core now expects the presence of a file called src/$(TARGET)/$(SUBTARGET).lst which is just a raw list of driver names, one per line. C and C++ comments are still permitted. This file is parsed by a new build tool makelist which extracts the driver names, sorts them, and generates a file called drivlist.c, which is consumed by the core. [Aaron Giles] Added new osdcore function osd_malloc_array() which is identical to osd_malloc() but obviously hints that the underlying allocation is for an array. Updated all callers to use the appropriate form. Modified the Windows allocator to only use guard pages for array-style allocations, allowing us to enable them once again in debug builds. [Aaron Giles] Created new static class driver_list to wrap accesses to the list of available drivers. Improved speed of driver lookups by relying on the presorting done by makelist. [Aaron Giles] Created helper class driver_enumerator as a helper for iterating through the list of drivers. This class supports basic filtering and iteration, and also serves as a temporary cache of machine_configs. [Aaron Giles] Created cli_frontend object to wrap all the CLI handling code in clifront.c. Updated/simplified all the code to take advantage of the driver_enumerator. [Aaron Giles] Created media_auditor object to wrap all the auditing functions in audit.c. Updated all users to the new interface. Note that the new auditing mechanism is slightly out of sync with the romload code in terms of finding ROMs owned by devices, so it may mis-report some issues until the new ROM loading code is in. [Aaron Giles] Added concept of a per-device searchpath. For most devices, their searchpath is just the short name of the device. For driver_devices, the searchpath is driver[;parent[;bios]]. This searchpath will eventually be used by the rom loader to find ROMs. For now it is used by the media auditor only. [Aaron Giles] Created info_xml_creator object to wrap all the info generation functions in info.c. Converted the file to C++ and cleaned up the input processing code. [Aaron Giles] (not for whatsnew ... Known issues: auditing of CHDs appears busted, and debug builds report unfreed memory if you use the built-in game picker)
* Fix build break from last checkin. Aaron Giles2011-02-061-1/+1
| | | | | | | | | | | | | | | | | Also replace timer_get_time() with machine->time() 1. Main conversion timer_get_time( *)\( *([^)]+) *\) \2->time\1() 2. Cleanup #1 &machine->time machine.time 3. Cleanup #2 &m_machine->time m_machine.time
* Converted attotime to a class, with proper operators. Removed old Aaron Giles2011-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | global functions which are now superceded by the operators and methods on the class. [Aaron Giles] Required mappings are: attotime_make(a,b) => attotime(a,b) attotime_to_double(t) => t.as_double() double_to_attotime(d) => attotime::from_double(d) attotime_to_attoseconds(t) => t.as_attoseconds() attotime_to_ticks(t,f) => t.as_ticks(f) ticks_to_attotime(t,f) => attotime::from_ticks(t,f) attotime_add(a,b) => a + b attotime_add_attoseconds(a,b) => a + attotime(0, b) attotime_sub(a,b) => a - b attotime_sub_attoseconds(a,b) => a - attotime(0, b) attotime_compare(a,b) == 0 => a == b attotime_compare(a,b) != 0 => a != b attotime_compare(a,b) < 0 => a < b attotime_compare(a,b) <= 0 => a <= b attotime_compare(a,b) > 0 => a > b attotime_compare(a,b) >= 0 => a >= b attotime_mul(a,f) => a * f attotime_div(a,f) => a / f attotime_min(a,b) => min(a,b) attotime_max(a,b) => max(a,b) attotime_is_never(t) => t.is_never() attotime_string(t,p) => t.as_string(p) In addition, some existing #defines still exist but will go away: attotime_zero => attotime::zero attotime_never => attotime::never ATTOTIME_IN_SEC(s) => attotime::from_seconds(s) ATTOTIME_IN_MSEC(m) => attotime::from_msec(m) ATTOTIME_IN_USEC(u) => attotime::from_usec(u) ATTOTIME_IN_NSEC(n) => attotime::from_nsec(n) ATTOTIME_IN_HZ(h) => attotime::from_hz(h)
* Cleanup & version bump.mame0140u1 Aaron Giles2010-11-082-6/+6
|
* Make osdmini build again. Aaron Giles2010-10-215-9/+194
|
* Create new class osd_interface to house OSD callbacks. Added new Aaron Giles2010-10-211-37/+20
| | | | | | | | | module osdepend.c with default empty implementations. Changed mame_execute() and cli_execute() to accept a reference to an osd_interface which is provided by the caller. Updated SDL and Windows OSD to create an osd_interface-derived class and moved their OSD callbacks to be members.
* Converted render.c objects into C++ objects. Updated all callers. Aaron Giles2010-10-131-6/+4
|
* **FOR REVIEW** Andrew Gardner2010-09-201-0/+9
| | | | | | | | | | | | | | | | | Log: Added preliminary support for saving debugger window locations. [Andrew Gardner] (Notes) * I only save the values for the SDL debugger for now. * There is no loading of these values yet, but if this patch is confirmed good, loading should be relatively straightforward to add. * There is a slight chance this might not compile on OSes other than linux. I will be available via e-mail for the next 10 hours and will assist with any compilation problems if they occur. * The patch seems like the "right way" to do things, but if I am doing anything suspect, please feel free to make suggestions and corrections.
* Split mame.c into mame.c and machine.c, the latter containing the Aaron Giles2010-06-301-1/+1
| | | | | | | | | | | | | | | | | | | running_machine definition and implementation. Moved global machine-level operations and accessors into methods on the running_machine class. For the most part, this doesn't affect drivers except for a few occasional bits: mame_get_phase() == machine->phase() add_reset_callback() == machine->add_notifier(MACHINE_NOTIFY_RESET, ...) add_exit_callback() == machine->add_notifier(MACHINE_NOTIFY_EXIT, ...) mame_get_base_datetime() == machine->base_datetime() mame_get_current_datetime() == machine->current_datetime() Cleaned up the region_info class, removing most global region accessors except for memory_region() and memory_region_length(). Again, this doesn't generally affect drivers.
* Correct a long-standing design flaw: device configuration state Aaron Giles2010-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Bulk driver.h -> emu.h switch. Aaron Giles2010-01-101-1/+1
|
* NOTE: This change requires two new osd functions: osd_malloc() and Aaron Giles2010-01-081-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Cleanups and version bump.mame0134u3 Aaron Giles2009-10-128-180/+180
|
* Eliminated osd_cpu.h. Aaron Giles2009-10-121-91/+0
| | | | | | | | | Types are pretty much unified now. Multiply operations are handled by eminline.h. Divide operations were just silly in macros. 64/32-bit combination/extraction macros moved to osdcomm.h and renamed. Also fixed compile errors in recent 68k changes.
* Moved all the OSD/windows code over to straight BSD license. Aaron Giles2009-10-129-58/+577
| | | | | | Updated osdmini to work again and compile as an actual target (doing nothing at the moment). Converted all of its code over to straight BSD as well.
* Rename osd_profiling_ticks() to get_profile_ticks(). Moved implemention into Aaron Giles2009-09-061-2/+2
| | | | inline functions in eminline.h and the ei* functions. [couriersud, Aaron Giles]
* osd_is_bad_read_ptr is no more. Aaron Giles2009-08-291-11/+0
|
* Copyright cleanup: Aaron Giles2008-01-068-8/+8
| | | | | | - removed years from copyright notices - removed redundant (c) from copyright notices - updated "the MAME Team" to be "Nicola Salmoria and the MAME Team"
* Initial checkin of MAME 0.121.mame0121 Aaron Giles2007-12-178-0/+553