Commit Graph

51 Commits

Author SHA1 Message Date
Miodrag Milanovic
ddb290d5f6 NOTICE (TYPE NAME CONSOLIDATION)
Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8
also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
2016-10-22 13:13:17 +02:00
Miodrag Milanovic
23ad94073f use standard types uintptr_t, char16_t and char32_t instead of FPTR, utf16_char, unicode_char (nw) 2016-10-22 11:31:49 +02:00
Vas Crabb
87429e74d9 ui refactoring [Vas Crabb]
* move menu classes into ::ui namesapce
* reduce scope of many symbols

(first step in making UI code less rage-inducing so I can fix text input)
2016-05-27 03:00:20 +10:00
therealmogminer@gmail.com
b06be31dfe Move slider_state and ui_menu_item into src/frontend/mame, nw 2016-05-16 19:59:15 +02:00
Miodrag Milanovic
1c726824f2 Split UI and frontend part from core [Miodrag Milanovic] 2016-04-23 11:26:47 +02:00
Miodrag Milanovic
8318d85597 Isolate CLI part (nw) 2016-04-20 09:50:13 +02:00
therealmogminer@gmail.com
250a5cc805 Add AVI writing to bgfx, nw 2016-04-17 19:16:14 +02:00
therealmogminer@gmail.com
dd9c9a0fb3 Make OSDs return ui_menu_item lists, not slider_state lists 2016-04-10 19:22:31 +02:00
therealmogminer@gmail.com
8719535cbc Make sliders use an std::vector instead of a linked list, nw 2016-04-10 02:38:08 +02:00
Vas Crabb
a3b35f8bc6 Move font enumeration to OSD, separate font name from display name as needed for OSX 2016-03-17 00:04:52 +11:00
therealmogminer@gmail.com
eca47070a5 More work on targets, nw 2016-02-21 03:03:28 +01:00
therealmogminer@gmail.com
9a47a870df First take on render API reorg, nw 2016-02-21 03:03:23 +01:00
Vas Crabb
0a1b6b66b0 Fix warning with some clang configurations, don't automatically disable bgfx for 10.5 Leopard 2015-04-03 08:14:30 +11:00
couriersud
8c3b8d43c7 Converted midi into a module. (nw) 2015-01-31 02:39:40 +01:00
Miodrag Milanovic
26e7a17b63 Cleanups and version bump 2015-01-28 09:20:10 +01:00
couriersud
4a4ae1d5ed Added a generic module abstraction layer and migrated font modules to
use this layer. (nw)
2015-01-23 19:53:42 +01:00
couriersud
a80f04072d Moved font code into osd/modules/font. Extended osd_font to a proper
interface. (nw)
2015-01-19 21:47:09 +01:00
couriersud
18d5da6b0b Changed osd_font to struct osd_font and removed unnecessary osdepend.h
includes.
2015-01-17 15:59:43 +01:00
couriersud
11af4265a0 OSD Updates:
- OSD can now use OPTION_COMMAND; added execute_command handler to
osd_interface.
- moved list_network_devices and list_midi_devices to OSD
2015-01-14 01:05:38 +01:00
couriersud
e216457fcd Untangled options inheritance. Previously code locked in osd_options
locking any potential future OSD to these.
Options inheritance now is

core_options
emu_options
cli_options
osd_options
[sdl|win]_osd_options

This required a number of minor changes to other code as well. 
Tested on linux-sdl, windows-sdl, windows-mainline, osx-sdl
2015-01-13 20:23:00 +01:00
couriersud
a532231701 Converted back osd_interface into a pure interface.
The previous version just exhibited any member of osd_interface to the
core. This one limits core access to osd to those functions originally
specified.
There is room for improvement going forward here in the design. Left
FIXMEs where appropriate. (nw)
2015-01-12 02:19:14 +01:00
couriersud
d7b9f653e3 Moved osd midi stuff to osd/modules/midi. Needed to touch a couple of
other files so that mame compiles and links. Tested SDL build
(linux/windows).
2015-01-09 23:21:19 +01:00
Miodrag Milanovic
57b389311f Added window to osd_interface (nw)
win_monitor_info to class 
win_window_info to class, partial
2014-09-01 08:58:33 +00:00
Miodrag Milanovic
79246ab917 More cleanups, there is issue with srcclean that needs to be taken care as well, just doing now what we can 2014-07-22 06:21:54 +00:00
Miodrag Milanovic
69faaf3aeb -Reorganized OSD, handling more sound output systems and debuggers, defaults left same as before [Miodrag Milanovic]
-Created osd_options as base option class for non-system specific options
2014-05-08 07:39:04 +00:00
Miodrag Milanovic
f8f3d68187 -Made osd_interface base class for OSD and moved initialization for each subsystem in it as virtual calls. (nw)
-Moved midi handling in base class
-Cleaned running_machine of information of next machine
-All is cleaned after exiting of running_machine so debugger window is removed as well till next machine is started
-Made osdmini to compile
2014-04-25 07:31:27 +00:00
Miodrag Milanovic
452df5037b reverting to classic ui due to lot of issues, as much as I hate reverting some else code (nw) 2014-04-17 06:27:03 +00:00
Miodrag Milanovic
0c727fc6d3 Small core cleanup (nw) 2014-04-15 11:14:46 +00:00
Nathan Woods
24026e123e Merge of new menubar code 2014-04-12 20:52:03 +00:00
Aaron Giles
5d0ce54f9e Bulk convert files that already had standard BSD license in my name
to new license tagged form.
2013-10-16 08:14:49 +00:00
Miodrag Milanovic
0e19f641d3 Cleanups and version bump 2013-01-11 07:32:46 +00:00
Aaron Giles
e4238fb654 Major bitmap-related changes throughout the system. There are
almost certainly some regressions lurking. Let me know if
something seems busted.

Bitmaps are now strongly typed based on format. bitmap_t still
exists as an abstract base class, but it is almost never used.
Instead, format-specific bitmap classes are provided:

   bitmap_ind8 == 8bpp indexed
   bitmap_ind16 == 16bpp indexed
   bitmap_ind32 == 32bpp indexed
   bitmap_ind64 == 64bpp indexed
   bitmap_rgb32 == 32bpp RGB
   bitmap_argb32 == 32bpp ARGB
   bitmap_yuy16 == 16bpp YUY

For each format, a generic pix() method is provided which
references pixels of the correct type. The old pix8/pix16/pix32/
pix64 methods still exist in the short term, but the only one
available is the one that matches the bitmap's pixel size. Note
also that the old RGB15 format bitmaps are no longer supported
at all.

Converted model1, megadriv, and stv drivers away from the RGB15
format bitmaps.

New auto_bitmap_<type>_alloc() macros are provided for allocating
the appropriate type of bitmap.

Screen update functions now must specify the correct bitmap type
as their input parameters. For static update functions the
SCREEN_UPDATE macro is now replaced with SCREEN_UPDATE_RGB32 and
SCREEN_UPDATE_IND16 macros. All existing drivers have been 
updated to use the correct macros. 

Screen update functions are now required for all screens; there
is no longer any default behavior of copying a "default" bitmap
to the screen (in fact the default bitmap has been deprecated).
Use one of the following to specify your screen_update callback:

   MCFG_SCREEN_UPDATE_STATIC(name) - static functions
   MCFG_SCREEN_UPDATE_DRIVER(class, func) - driver members
   MCFG_SCREEN_UPDATE_DEVICE(tag, class, func) - device members

Because the target bitmap format can now be deduced from the
screen update function itself, the MCFG_SCREEN_FORMAT macro is
no longer necessary, and has been removed. If you specify a
screen update callback that takes a bitmap_ind16, then the screen
will be configured to use a 16bpp indexed bitmap, and if you
specify a callback that takes a bitmap_rgb32, then a 32bpp RGB
bitmap will be provided.

Extended the bitmap classes to support wrapping a subregion of
another bitmap, and cleaner allocation/resetting. The preferred
use of bitmaps now is to define them directly in drivers/devices
and use allocate() or wrap() to set them up, rather than 
allocating them via auto_bitmap_*_alloc().

Several common devices needed overhauls or changes as a result
of the above changes:

 * Reorganized the laserdisc base driver and all the laserdisc 
    drivers as modern C++ devices, cleaning the code up 
    considerably. Merged ldsound device into the laserdsc
    device since modern devices are flexible enough to handle
    it.

 * Reorganized the v9938 device as a modern C++ device. Removed
    v9938mod.c in favor of template functions in v9938.c directly.

 * Added independent ind16 and rgb32 callbacks for TMS340x0 devices.

 * All video devices are now hard-coded to either ind16 or rgb32
    bitmaps. The most notable is the mc6845 which is rgb32, and
    required changes to a number of consumers.

 * Added screen_update methods to most video devices so they can be
    directly called via MCFG_SCREEN_UPDATE_DEVICE instead of creating
    tons of stub functions.
2012-01-12 21:19:49 +00:00
Aaron Giles
665d213ee4 (Finally found the time to finish this....)
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
2011-05-30 19:07:19 +00:00
Ryan Holtz
b63233e7a6 Call off the dogs, the OSD routing for OSD-side sliders has been fixed. nwn 2011-05-23 05:03:16 +00:00
Aaron Giles
92b3dd111f Cleanup & version bump. 2010-11-08 09:08:55 +00:00
Aaron Giles
59559fe282 Added support for OSD-generated fonts. The OSD is queried first to see
if it owns a given font (based on the name), and if it does, it is
responsible for generating bitmaps on the fly as characters are requested.

Added new option -uifont to specify the UI font. It can be set to a filename,
in which case a BDF font will be loaded. It can also be set to a font name
(assuming the OSD support is present), in which case the OSD font by that
name is used. The default value is 'default' which can be used by the OSD
to substitute a default font or by the OSD, which will default to ui.bdf
as before. In all cases, it falls back to the built-in font by default if
none of the previous options works.

On Windows, the OSD will default to Tahoma as the font name. Also on
Windows, font names can be specified with [b] to indicate bold or [i] to
indicate italic.
2010-10-24 00:16:54 +00:00
Aaron Giles
e4beed95a6 Create new class osd_interface to house OSD callbacks. Added new
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.
2010-10-21 15:59:44 +00:00
Andrew Gardner
79aab2108b **FOR REVIEW**
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.
2010-09-20 16:00:42 +00:00
Aaron Giles
733b797a3d Split mame.c into mame.c and machine.c, the latter containing the
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.
2010-06-30 03:46:21 +00:00
Aaron Giles
100564d412 WARNING: There are likely to be regressions in both functionality and
performance as a result of this change. Do not panic; report issues to the
list in the short term and I will look into them. There are probably also
some details I forgot to mention. Please ask questions if anything is not
clear.

NOTE: This is a major internal change to the way devices are handled in
MAME. There is a small impact on drivers, but the bulk of the changes are
to the devices themselves. Full documentation on the new device handling
is in progress at http://mamedev.org/devwiki/index.php/MAME_Device_Basics

Defined two new casting helpers: [Aaron Giles]

  downcast<type>(value) should be used for safe and efficient downcasting
  from a base class to a derived class. It wraps static_cast<> by adding
  an assert that a matching dynamic_cast<> returns the same result in 
  debug builds.
  
  crosscast<type>(value) should be used for safe casting from one type to
  another in multiple inheritance scenarios. It compiles to a 
  dynamic_cast<> plus an assert on the result. Since it does not optimize
  down to static_cast<>, you should prefer downcast<> over crosscast<>
  when you can.
  
Redefined running_device to be a proper C++ class (now called device_t).
Same for device_config (still called device_config). All devices and
device_configs must now be derived from these base classes. This means
each device type now has a pair of its own unique classes that describe
the device. Drivers are encouraged to use the specific device types
instead of the generic running_device or device_t classes. Drivers that
have a state class defined in their header file are encouraged to use
initializers off the constructor to locate devices. [Aaron Giles]

Removed the following fields from the device and device configuration
classes as they never were necessary or provided any use: device class,
device family, source file, version, credits. [Aaron Giles]

Added templatized variant of machine->device() which performs a downcast
as part of the device fetch. Thus machine->device<timer_device>("timer")
will locate a device named "timer", downcast it to a timer_device, and
assert if the downcast fails. [Aaron Giles]

Removed most publically accessible members of running_device/device_t in
favor of inline accessor functions. The only remaining public member is
machine. Thus all references to device->type are now device->type(), etc.
[Aaron Giles]

Created a number of device interface classes which are designed to be mix-
ins for the device classes, providing specific extended functionality and
information. There are standard interface classes for sound, execution,
state, nvram, memory, and disassembly. Devices can opt into 0 or more of
these classes. [Aaron Giles]

Converted the classic CPU device to a standard device that uses the
execution, state, memory, and disassembly interfaces. Used this new class
(cpu_device) to implement the existing CPU device interface. In the future
it will be possible to convert each CPU core to its own device type, but 
for now they are still all CPU devices with a cpu_type() that specifies
exactly which kind of CPU. [Aaron Giles] 

Created a new header devlegcy.h which wraps the old device interface using
some special template classes. To use these with an existing device,
simply remove from the device header the DEVICE_GET_INFO() declaration and
the #define mapping the ALL_CAPS name to the DEVICE_GET_INFO. In their
place #include "devlegcy.h" and use the DECLARE_LEGACY_DEVICE() macro.
In addition, there is a DECLARE_LEGACY_SOUND_DEVICE() macro for wrapping
existing sound devices into new-style devices, and a 
DECLARE_LEGACY_NVRAM_DEVICE() for wrapping NVRAM devices. Also moved the
token and inline_config members to the legacy device class, as these are
not used in modern devices. [Aaron Giles]

Converted the standard base devices (VIDEO_SCREEN, SPEAKER, and TIMER) 
from legacy devices to the new C++ style. Also renamed VIDEO_SCREEN to
simply SCREEN. The various global functions that were previously used to
access information or modify the state of these devices are now replaced
by methods on the device classes. Specifically:

  video_screen_configure()             == screen->configure()
  video_screen_set_visarea()           == screen->set_visible_area()
  video_screen_update_partial()        == screen->update_partial()
  video_screen_update_now()            == screen->update_now()
  video_screen_get_vpos()              == screen->vpos()
  video_screen_get_hpos()              == screen->hpos()
  video_screen_get_vblank()            == screen->vblank()
  video_screen_get_hblank()            == screen->hblank()
  video_screen_get_width()             == screen->width()
  video_screen_get_height()            == screen->height()
  video_screen_get_visible_area()      == screen->visible_area()
  video_screen_get_time_until_pos()    == screen->time_until_pos()
  video_screen_get_time_until_vblank_start() == 
                                 screen->time_until_vblank_start()
  video_screen_get_time_until_vblank_end() == 
                                 screen->time_until_vblank_end()
  video_screen_get_time_until_update() == screen->time_until_update()
  video_screen_get_scan_period()       == screen->scan_period()
  video_screen_get_frame_period()      == screen->frame_period()
  video_screen_get_frame_number()      == screen->frame_number()

  timer_device_adjust_oneshot()        == timer->adjust()
  timer_device_adjust_periodic()       == timer->adjust()
  timer_device_reset()                 == timer->reset()
  timer_device_enable()                == timer->enable()
  timer_device_enabled()               == timer->enabled()
  timer_device_get_param()             == timer->param()
  timer_device_set_param()             == timer->set_param()
  timer_device_get_ptr()               == timer->get_ptr()
  timer_device_set_ptr()               == timer->set_ptr()
  timer_device_timeelapsed()           == timer->time_elapsed()
  timer_device_timeleft()              == timer->time_left()
  timer_device_starttime()             == timer->start_time()
  timer_device_firetime()              == timer->fire_time()

Updated all drivers that use the above functions to fetch the specific
device type (timer_device or screen_device) and call the appropriate
method. [Aaron Giles]

Changed machine->primary_screen and the 'screen' parameter to VIDEO_UPDATE
to specifically pass in a screen_device object. [Aaron Giles]

Defined a new custom interface for the Z80 daisy chain. This interface
behaves like the standard interfaces, and can be added to any device that
implements the Z80 daisy chain behavior. Converted all existing Z80 daisy
chain devices to new-style devices that inherit this interface.
[Aaron Giles]

Changed the way CPU state tables are built up. Previously, these were data
structures defined by a CPU core which described all the registers and how
to output them. This functionality is now part of the state interface and
is implemented via the device_state_entry class. Updated all CPU cores
which were using the old data structure to use the new form. The syntax is
currently awkward, but will be cleaner for CPUs that are native new 
devices. [Aaron Giles]

Converted the okim6295 and eeprom devices to the new model. These were
necessary because they both require multiple interfaces to operate and it
didn't make sense to create legacy device templates for these single cases.
(okim6295 needs the sound interface and the memory interface, while eeprom
requires both the nvram and memory interfaces). [Aaron Giles]

Changed parameters in a few callback functions from pointers to references
in situations where they are guaranteed to never be NULL. [Aaron Giles]

Removed MDRV_CPU_FLAGS() which was only used for disabling a CPU. Changed
it to MDRV_DEVICE_DISABLE() instead. Updated drivers. [Aaron Giles]

Reorganized the token parsing for machine configurations. The core parsing
code knows how to create/replace/remove devices, but all device token
parsing is now handled in the device_config class, which in turn will make
use of any interface classes or device-specific token handling for custom
token processing. [Aaron Giles]

Moved many validity checks out of validity.c and into the device interface
classes. For example, address space validation is now part of the memory
interface class. [Aaron Giles]

Consolidated address space parameters (bus width, endianness, etc.) into
a single address_space_config class. Updated all code that queried for
address space parameters to use the new mechanism. [Aaron Giles]
2010-06-08 06:09:57 +00:00
Aaron Giles
e738b79785 Correct a long-standing design flaw: device configuration state
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.
2010-01-18 09:34:43 +00:00
Aaron Giles
4498faacd9 First round of an attempted cleanup of header files in the system.
- 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!)
2010-01-10 00:29:26 +00:00
Aaron Giles
91a1b8d634 NOTE: This change requires two new osd functions: osd_malloc() and
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.
2010-01-08 06:05:29 +00:00
Aaron Giles
2d22e450f2 Cleanups and version bump. 2009-10-12 08:45:25 +00:00
Aaron Giles
3851b425b7 Moved all the OSD/windows code over to straight BSD license.
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.
2009-10-12 05:56:47 +00:00
Aaron Giles
d924407859 Big debugger cleanup.
Important note for OSD ports: the get/set property functions have 
been retired for debug_views. Instead, there are specific functions
to perform each get/set operation. In addition, the format of the
update callback has changed to pass the osd private data in, and
the update callback/osd private data must be passed in at view
allocation time. And osd_wait_for_debugger() now gets a CPU object
instead of the machine.

Removed extra debugger tracking for address spaces and added some
of the useful data to the address_space structure. Updated all
debugger commands and views to use CPU and address space objects
where appropriate.

Added new memory functions for converting between bytes and
addresses, and for performing translations for a given address
space. Removed debugger macros that did similar things in favor
of calling these functions.

Rewrote most of the memory view handling. Disasm and register views
still need some additional tweaking.
2008-12-03 06:35:34 +00:00
Aaron Giles
517a24c0ef Robustified key behavior when the debugger is visible. Should now
properly ignore the "break into debugger" keypress and not allow
related characters to filter through. Removed some hacks related to
making that work in the past.

Changed osd_wait_for_debugger() to take a machine parameter and a
"firsttime" parameter, which is set to 1 the first time the function
is called after a break. The Windows debugger uses this to ensure
that the debugger has focus when you break into it.
2008-07-17 16:09:52 +00:00
Aaron Giles
096331c856 Restructured input port internals and cleaned up inptport.c:
* Input ports are now maintained hierarchically. At the top
level are input ports, which contain a list of fields. Each
field represents one or more bits of the port. Certain fields
such as DIP switches and configuration switches contain a
list of settings, which can be selected. DIP switch fields
can also contain a list of DIP switch locations.

* Normalized behavior of port overrides (via PORT_INCLUDE or
by defining multiple overlapping bits). All fields within a
port are kept in strict increasing bit order, so altered DIP
switches are now kept in the appropriate order. This addresses
MAMETesters bug 01671.

* Live port state is now fully separate from configured 
state. This is manifested in a similar way to devices, where
a const list of ports can be managed either offline or live.
Each port has a pointer to an opaque set of live state which
is NULL when offline or valid when live. Each port also has
a running_machine * which is also NULL when offline.

* Because of this new arrangement, the conversion from tokens
to a list of ports now requires reasonably complex memory
allocation, so these port lists must be explicitly allocated
and freed (they are not mantained by automatic resource
allocation).

* Custom and changed callbacks now take a pointer to a field
config instead of a running machine. This provides more
information about what field triggered the change notification.
The machine can be found by referenced field->port->machine.

* The inptport.c module has been cleaned up and many 
ambiguities resolved. Most of this is internal, though it did
result in osd_customize_inputport_list() being changed to
osd_customize_input_type_list(). The parameter to this function
is now a linked list instead of an array, and the structures
referenced have been reorganized somewhat.

* Updated config.c to pass machine parameters to its callbacks.

* Updated validity checks, XML output, and UI system to handle
the new structures.

* Moved large table of default input settings to a separate
include file inpttype.h.

* Removed gross hacks in trackfld and hyperspt NVRAM. These
may be broken as a result.
2008-05-15 16:25:03 +00:00
Couriersud
dd0ebc1d8d Remove some deprecat.h includes from osd layer:
* add machine as parameter to osd_update and osd_update_audio_stream
* change Machine to machine and remove include deprecat.h
2008-02-23 17:46:52 +00:00
Aaron Giles
ee9f88963c Copyright cleanup:
- removed years from copyright notices
 - removed redundant (c) from copyright notices
 - updated "the MAME Team" to be "Nicola Salmoria and the MAME Team"
2008-01-06 00:47:40 +00:00