mirror of
https://github.com/holub/mame
synced 2025-07-05 09:57:47 +03:00
Clean up various loose ends:
frontend: Exposed debug symbol tables and parsed expressions to Lua (these can be used when the debugger is not active). Also made it simpler to walk input types. imagedev/bitbngr.cpp: Added software list loader support (used by sitcom). sitcom.cpp: Replaced bankdev with a memory view. Also added a bar graph for the timer DAC output, and made the DL1414 displays squarer in the layout like they are in real life. They still don't look right because the internal segment drawing code doen't draw the segments the right width. docs: Fixed broken links and added missing links in command line options index. Also removed documentation for an option that no longer exists and fixed some inconsistent terminology. Separated includes by module in various drivers.
This commit is contained in:
parent
79db67a77a
commit
cb16512392
@ -919,8 +919,8 @@ Example:
|
||||
supporting both XInput and DirectInput controllers.
|
||||
|
||||
|
||||
OSD CLI Options
|
||||
---------------
|
||||
OSD CLI Verbs
|
||||
-------------
|
||||
|
||||
.. _mame-commandline-listmidi:
|
||||
|
||||
@ -1862,7 +1862,7 @@ Core Performance Options
|
||||
|
||||
.. _mame-commandline-lowlatency:
|
||||
|
||||
**-lowlatency**
|
||||
**-[no]lowlatency**
|
||||
|
||||
This tells MAME to draw a new frame before throttling to reduce input
|
||||
latency. This is particularly effective with VRR (Variable Refresh Rate)
|
||||
@ -2698,11 +2698,11 @@ Core Video OpenGL GLSL Options
|
||||
|
||||
.. _mame-commandline-glglsl:
|
||||
|
||||
**-gl_glsl**
|
||||
**-[no]gl_glsl**
|
||||
|
||||
Enable OpenGL GLSL, if available.
|
||||
|
||||
The default is OFF.
|
||||
The default is OFF (**-nogl_glsl**).
|
||||
|
||||
Example:
|
||||
.. code-block:: bash
|
||||
@ -2765,20 +2765,6 @@ Core Video OpenGL GLSL Options
|
||||
mame suprmrio -gl_glsl -glsl_shader_screen0 gaussx -glsl_shader_screen1 gaussy -glsl_shader_screen2 CRT-geom-halation
|
||||
|
||||
|
||||
.. _mame-commandline-glglslvidattr:
|
||||
|
||||
**-gl_glsl_vid_attr**
|
||||
|
||||
Enable OpenGL GLSL handling of brightness and contrast.
|
||||
Better RGB system performance.
|
||||
|
||||
Default is ``on``.
|
||||
|
||||
Example:
|
||||
.. code-block:: bash
|
||||
|
||||
mame pacman -gl_glsl -gl_glsl_vid_attr off
|
||||
|
||||
Core Sound Options
|
||||
------------------
|
||||
|
||||
@ -2904,7 +2890,7 @@ Core Sound Options
|
||||
|
||||
The default is ``1``.
|
||||
|
||||
| For PortAudio, see the section on :ref:`-pa_latency <mame-commandline-pa-latency>`.
|
||||
| For PortAudio, see the section on :ref:`-pa_latency <mame-commandline-palatency>`.
|
||||
| XAudio2 calculates audio_latency as 10ms steps.
|
||||
| DSound calculates audio_latency as 10ms steps.
|
||||
| CoreAudio calculates audio_latency as 25ms steps.
|
||||
@ -3256,7 +3242,7 @@ Core Input Options
|
||||
|
||||
.. _mame-commandline-natural:
|
||||
|
||||
**\-natural**
|
||||
**\-[no]natural**
|
||||
|
||||
Allows user to specify whether or not to use a natural keyboard or not.
|
||||
This allows you to start your system in a 'native' mode, depending on your
|
||||
@ -3290,7 +3276,7 @@ Core Input Options
|
||||
|
||||
.. _mame-commandline-joystickcontradictory:
|
||||
|
||||
**-joystick_contradictory**
|
||||
**-[no]joystick_contradictory**
|
||||
|
||||
Enable contradictory direction digital joystick input at the same time such
|
||||
as **Left and Right** or **Up and Down** at the same time.
|
||||
@ -3663,7 +3649,7 @@ Core Misc Options
|
||||
|
||||
.. _mame-commandline-drcusec:
|
||||
|
||||
**\-drc_use_c**
|
||||
**\-[no]drc_use_c**
|
||||
|
||||
Force DRC to use the C code backend.
|
||||
|
||||
@ -3676,7 +3662,7 @@ Core Misc Options
|
||||
|
||||
.. _mame-commandline-drcloguml:
|
||||
|
||||
**\-drc_log_uml**
|
||||
**\-[no]drc_log_uml**
|
||||
|
||||
Write DRC UML disassembly log.
|
||||
|
||||
@ -3689,7 +3675,7 @@ Core Misc Options
|
||||
|
||||
.. _mame-commandline-drclognative:
|
||||
|
||||
**\-drc_log_native**
|
||||
**\-[no]drc_log_native**
|
||||
|
||||
Write DRC native disassembly log.
|
||||
|
||||
@ -3788,7 +3774,7 @@ Core Misc Options
|
||||
|
||||
.. _mame-commandline-confirmquit:
|
||||
|
||||
**\-confirm_quit**
|
||||
**\-[no]confirm_quit**
|
||||
|
||||
Display a Confirm Quit dialog to screen on exit, requiring one extra step
|
||||
to exit MAME.
|
||||
@ -3802,7 +3788,7 @@ Core Misc Options
|
||||
|
||||
.. _mame-commandline-uimouse:
|
||||
|
||||
**\-ui_mouse**
|
||||
**\-[no]ui_mouse**
|
||||
|
||||
Displays a mouse cursor when using the built-in UI for MAME.
|
||||
|
||||
@ -3975,7 +3961,7 @@ HTTP Server Options
|
||||
PortAudio Options
|
||||
-----------------
|
||||
|
||||
.. _mame-commandline-pa-api:
|
||||
.. _mame-commandline-paapi:
|
||||
|
||||
**-pa_api** *API*
|
||||
|
||||
@ -4031,7 +4017,7 @@ PortAudio Options
|
||||
|
||||
mame suprmrio -sound portaudio -pa_api "Windows WASAPI"
|
||||
|
||||
.. _mame-commandline-pa-device:
|
||||
.. _mame-commandline-padevice:
|
||||
|
||||
**-pa_device** *device*
|
||||
|
||||
@ -4045,7 +4031,7 @@ PortAudio Options
|
||||
|
||||
mame suprmrio -sound portaudio -pa_api "Windows WASAPI" -pa_device "NX-EDG27 (NVIDIA High Definition Audio)"
|
||||
|
||||
.. _mame-commandline-pa-latency:
|
||||
.. _mame-commandline-palatency:
|
||||
|
||||
**-pa_latency** *latency*
|
||||
|
||||
|
@ -11,23 +11,23 @@ Universal Commandline Options
|
||||
This section contains configuration options that are applicable to *all* MAME sub-builds (both SDL and Windows native).
|
||||
|
||||
|
||||
Core Commands
|
||||
~~~~~~~~~~~~~
|
||||
Core Verbs
|
||||
~~~~~~~~~~
|
||||
|
||||
| :ref:`help <mame-commandline-help>`
|
||||
| :ref:`validate <mame-commandline-validate>`
|
||||
|
||||
|
||||
Configuration Commands
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
Configuration Verbs
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
| :ref:`createconfig <mame-commandline-createconfig>`
|
||||
| :ref:`showconfig <mame-commandline-showconfig>`
|
||||
| :ref:`showusage <mame-commandline-showusage>`
|
||||
|
||||
|
||||
Frontend Commands
|
||||
~~~~~~~~~~~~~~~~~
|
||||
Frontend Verbs
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
| :ref:`listxml <mame-commandline-listxml>`
|
||||
| :ref:`listfull <mame-commandline-listfull>`
|
||||
@ -60,8 +60,8 @@ OSD-related Options
|
||||
| :ref:`joystickprovider <mame-commandline-joystickprovider>`
|
||||
|
||||
|
||||
OSD CLI Options
|
||||
~~~~~~~~~~~~~~~
|
||||
OSD CLI Verbs
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
| :ref:`listmidi <mame-commandline-listmidi>`
|
||||
| :ref:`listnetwork <mame-commandline-listnetwork>`
|
||||
@ -117,9 +117,8 @@ Core State/Playback Options
|
||||
| :ref:`state <mame-commandline-state>`
|
||||
| :ref:`[no]autosave <mame-commandline-noautosave>`
|
||||
| :ref:`playback <mame-commandline-playback>`
|
||||
| :ref:`exit_after_playback <mame-commandline-exitafterplayback>`
|
||||
| :ref:`[no]exit_after_playback <mame-commandline-exitafterplayback>`
|
||||
| :ref:`record <mame-commandline-record>`
|
||||
| :ref:`record_timecode <mame-commandline-recordtimecode>`
|
||||
| :ref:`mngwrite <mame-commandline-mngwrite>`
|
||||
| :ref:`aviwrite <mame-commandline-aviwrite>`
|
||||
| :ref:`wavwrite <mame-commandline-wavwrite>`
|
||||
@ -143,7 +142,7 @@ Core Performance Options
|
||||
| :ref:`[no]refreshspeed <mame-commandline-norefreshspeed>`
|
||||
| :ref:`numprocessors <mame-commandline-numprocessors>`
|
||||
| :ref:`bench <mame-commandline-bench>`
|
||||
| :ref:`lowlatency <mame-commandline-lowlatency>`
|
||||
| :ref:`[no]lowlatency <mame-commandline-lowlatency>`
|
||||
|
||||
|
||||
Core Rotation Options
|
||||
@ -212,6 +211,7 @@ Core Vector Options
|
||||
| :ref:`beam_width_min <mame-commandline-beamwidthmin>`
|
||||
| :ref:`beam_width_max <mame-commandline-beamwidthmax>`
|
||||
| :ref:`beam_intensity_weight <mame-commandline-beamintensityweight>`
|
||||
| :ref:`beam_dot_size <mame-commandline-beamdotsize>`
|
||||
| :ref:`flicker <mame-commandline-flicker>`
|
||||
|
||||
|
||||
@ -227,11 +227,10 @@ Core Video OpenGL Debugging Options
|
||||
Core Video OpenGL GLSL Options
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
| :ref:`gl_glsl <mame-commandline-glglsl>`
|
||||
| :ref:`[no]gl_glsl <mame-commandline-glglsl>`
|
||||
| :ref:`gl_glsl_filter <mame-commandline-glglslfilter>`
|
||||
| :ref:`glsl_shader_mame[0-9] <mame-commandline-glslshadermame>`
|
||||
| :ref:`glsl_shader_screen[0-9] <mame-commandline-glslshaderscreen>`
|
||||
| :ref:`gl_glsl_vid_attr <mame-commandline-glglslvidattr>`
|
||||
|
||||
|
||||
Core Sound Options
|
||||
@ -261,8 +260,8 @@ Core Input Options
|
||||
| :ref:`joystick_map <mame-commandline-joystickmap>`
|
||||
| :ref:`joystick_deadzone <mame-commandline-joystickdeadzone>`
|
||||
| :ref:`joystick_saturation <mame-commandline-joysticksaturation>`
|
||||
| :ref:`natural <mame-commandline-natural>`
|
||||
| :ref:`joystick_contradictory <mame-commandline-joystickcontradictory>`
|
||||
| :ref:`[no]natural <mame-commandline-natural>`
|
||||
| :ref:`[no]joystick_contradictory <mame-commandline-joystickcontradictory>`
|
||||
| :ref:`coin_impulse <mame-commandline-coinimpulse>`
|
||||
|
||||
|
||||
@ -286,9 +285,11 @@ Core Debugging Options
|
||||
| :ref:`[no]oslog <mame-commandline-oslog>`
|
||||
| :ref:`[no]log <mame-commandline-log>`
|
||||
| :ref:`[no]debug <mame-commandline-debug>`
|
||||
| :ref:`debugger <mame-commandline-debugger>`
|
||||
| :ref:`debugscript <mame-commandline-debugscript>`
|
||||
| :ref:`[no]update_in_pause <mame-commandline-updateinpause>`
|
||||
| :ref:`watchdog <mame-commandline-watchdog>`
|
||||
| :ref:`debugger_port <mame-commandline-debuggerport>`
|
||||
| :ref:`debugger_font <mame-commandline-debuggerfont>`
|
||||
| :ref:`debugger_font_size <mame-commandline-debuggerfontsize>`
|
||||
|
||||
@ -307,23 +308,23 @@ Core Misc Options
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
| :ref:`[no]drc <mame-commandline-drc>`
|
||||
| :ref:`drc_use_c <mame-commandline-drcusec>`
|
||||
| :ref:`drc_log_uml <mame-commandline-drcloguml>`
|
||||
| :ref:`drc_log_native <mame-commandline-drclognative>`
|
||||
| :ref:`[no]drc_use_c <mame-commandline-drcusec>`
|
||||
| :ref:`[no]drc_log_uml <mame-commandline-drcloguml>`
|
||||
| :ref:`[no]drc_log_native <mame-commandline-drclognative>`
|
||||
| :ref:`bios <mame-commandline-bios>`
|
||||
| :ref:`[no]cheat <mame-commandline-cheat>`
|
||||
| :ref:`[no]skip_gameinfo <mame-commandline-skipgameinfo>`
|
||||
| :ref:`uifont <mame-commandline-uifont>`
|
||||
| :ref:`ui <mame-commandline-ui>`
|
||||
| :ref:`ramsize <mame-commandline-ramsize>`
|
||||
| :ref:`confirm_quit <mame-commandline-confirmquit>`
|
||||
| :ref:`ui_mouse <mame-commandline-uimouse>`
|
||||
| :ref:`[no]confirm_quit <mame-commandline-confirmquit>`
|
||||
| :ref:`[no]ui_mouse <mame-commandline-uimouse>`
|
||||
| :ref:`language <mame-commandline-language>`
|
||||
| :ref:`[no]nvram_save <mame-commandline-nvramsave>`
|
||||
|
||||
|
||||
Scripting Options
|
||||
-----------------
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
| :ref:`autoboot_command <mame-commandline-autobootcommand>`
|
||||
| :ref:`autoboot_delay <mame-commandline-autobootdelay>`
|
||||
@ -335,13 +336,21 @@ Scripting Options
|
||||
|
||||
|
||||
HTTP Server Options
|
||||
-------------------
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
| :ref:`http <mame-commandline-http>`
|
||||
| :ref:`http_port <mame-commandline-httpport>`
|
||||
| :ref:`http_root <mame-commandline-httproot>`
|
||||
|
||||
|
||||
PortAudio Options
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
| :ref:`pa_api <mame-commandline-paapi>`
|
||||
| :ref:`pa_device <mame-commandline-padevice>`
|
||||
| :ref:`pa_latency <mame-commandline-palatency>`
|
||||
|
||||
|
||||
Windows-Specific Commandline Options
|
||||
------------------------------------
|
||||
|
||||
@ -377,7 +386,7 @@ This section contains configuration options that are specific to any build suppo
|
||||
SDL Performance Options
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
| :ref:`sdlvideofps <mame-scommandline-sdlvideofps>`
|
||||
| :ref:`[no]sdlvideofps <mame-scommandline-sdlvideofps>`
|
||||
|
||||
|
||||
SDL Video Options
|
||||
|
@ -11,7 +11,7 @@ Performance Options
|
||||
|
||||
.. _mame-scommandline-sdlvideofps:
|
||||
|
||||
**-sdlvideofps**
|
||||
**-[no]sdlvideofps**
|
||||
|
||||
Enable output of benchmark data on the SDL video subsystem, including your system's video driver, X server (if applicable), and OpenGL stack in **-video opengl** mode.
|
||||
|
||||
|
@ -78,8 +78,8 @@ do
|
||||
|
||||
The **do** command simply evaluates the supplied expression. This is
|
||||
often used to set or modify device state variable (e.g. CPU registers),
|
||||
or to write to memory. See :ref:`debugger-expressions` for details
|
||||
about expression syntax.
|
||||
or to write to memory. See :ref:`debugger-express` for details about
|
||||
expression syntax.
|
||||
|
||||
Examples:
|
||||
|
||||
|
@ -163,7 +163,7 @@ debugger should take the most likely meaning for a device or address
|
||||
space specification.
|
||||
|
||||
|
||||
.. _debugger-expressions:
|
||||
.. _debugger-express:
|
||||
|
||||
Debugger expression syntax
|
||||
--------------------------
|
||||
@ -218,6 +218,8 @@ Major differences from C expression semantics:
|
||||
always evaluated.
|
||||
|
||||
|
||||
.. _debugger-express-num:
|
||||
|
||||
Numbers
|
||||
~~~~~~~
|
||||
|
||||
@ -240,6 +242,8 @@ Examples:
|
||||
* ``0b123`` is invalid
|
||||
|
||||
|
||||
.. _debugger-express-bool:
|
||||
|
||||
Boolean values
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
@ -253,6 +257,8 @@ debugger commands to use the default value, even when subsequent
|
||||
parameters are specified.
|
||||
|
||||
|
||||
.. _debugger-express-mem:
|
||||
|
||||
Memory accesses
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
@ -390,6 +396,8 @@ Memory accesses can be used as both lvalues and rvalues, so you can write
|
||||
``b@100 = ff`` to store a byte in memory.
|
||||
|
||||
|
||||
.. _debugger-express-func:
|
||||
|
||||
Functions
|
||||
~~~~~~~~~
|
||||
|
||||
|
@ -1648,9 +1648,12 @@ ioport:count_players()
|
||||
Returns the number of player controllers in the system.
|
||||
ioport:type_pressed(type, [player])
|
||||
Returns a Boolean indicating whether the specified input is currently
|
||||
pressed. The input port type is an enumerated value. The player number is
|
||||
a zero-based index. If the player number is not supplied, it is assumed to
|
||||
be zero.
|
||||
pressed. The input type may be an enumerated value or an
|
||||
:ref:`input type <luareference-input-inputtype>` entry. If the input type
|
||||
is an enumerated value, the player number may be supplied as a zero-based
|
||||
index; if the player number is not supplied, it is assumed to be zero. If
|
||||
the input type is an input type entry, the player number may not be supplied
|
||||
separately.
|
||||
ioport:type_name(type, [player])
|
||||
Returns the display name for the specified input type and player number.
|
||||
The input type is an enumerated value. The player number is a zero-based
|
||||
@ -1665,22 +1668,31 @@ ioport:type_group(type, player)
|
||||
canonical grouping in an input configuration UI.
|
||||
ioport:type_seq(type, [player], [seqtype])
|
||||
Get the configured :ref:`input sequence <luareference-input-iptseq>` for the
|
||||
specified input type, player number and sequence type. The input type is an
|
||||
enumerated value. The player number is a zero-based index. If the player
|
||||
number is not supplied, it is assumed to be zero. If the sequence type is
|
||||
supplied, it must be ``"standard"``, ``"increment"`` or ``"decrement"``; if
|
||||
it is not supplied, it is assumed to be ``"standard"``.
|
||||
specified input type, player number and sequence type. The input type may
|
||||
be an enumerated value or an
|
||||
:ref:`input type <luareference-input-inputtype>` entry. If the input type
|
||||
is an enumerated value, the player number may be supplied as a zero-based
|
||||
index; if the player number is not supplied, it is assumed to be zero. If
|
||||
the input type is an input type entry, the player number may not be supplied
|
||||
separately. If the sequence type is supplied, it must be ``"standard"``,
|
||||
``"increment"`` or ``"decrement"``; if it is not supplied, it is assumed to
|
||||
be ``"standard"``.
|
||||
|
||||
This provides access to general input configuration.
|
||||
ioport:set_type_seq(type, player, seqtype, seq)
|
||||
ioport:set_type_seq(type, [player], seqtype, seq)
|
||||
Set the configured :ref:`input sequence <luareference-input-iptseq>` for the
|
||||
specified input type, player number and sequence type. The input type is an
|
||||
enumerated value. The player number is a zero-based index. The sequence
|
||||
type must be ``"standard"``, ``"increment"`` or ``"decrement"``.
|
||||
specified input type, player number and sequence type. The input type may
|
||||
be an enumerated value or an
|
||||
:ref:`input type <luareference-input-inputtype>` entry. If the input type
|
||||
is an enumerated value, the player number must be supplied as a zero-based
|
||||
index. If the input type is an input type entry, the player number may not
|
||||
be supplied separately. The sequence type must be ``"standard"``,
|
||||
``"increment"`` or ``"decrement"``.
|
||||
|
||||
This allows general input configuration to be set.
|
||||
ioport:token_to_input_type(string)
|
||||
Returns the input type and player number for the specified input type token.
|
||||
Returns the input type and player number for the specified input type token
|
||||
string.
|
||||
ioport:input_type_to_token(type, [player])
|
||||
Returns the token string for the specified input type and player number. If
|
||||
the player number is not supplied, it assumed to be zero.
|
||||
@ -1688,6 +1700,9 @@ ioport:input_type_to_token(type, [player])
|
||||
Properties
|
||||
^^^^^^^^^^
|
||||
|
||||
ioport.types[] (read-only)
|
||||
Gets the supported :ref:`input types <luareference-input-inputtype>`. Keys
|
||||
are arbitrary indices. All supported operations have O(1) complexity.
|
||||
ioport.ports[]
|
||||
Gets the emulated :ref:`I/O ports <luareference-input-ioport>` in the
|
||||
system. Keys are absolute tags. The ``at`` and ``index_of`` methods have
|
||||
@ -1985,6 +2000,41 @@ Properties
|
||||
live.name
|
||||
Display name for the field.
|
||||
|
||||
.. _luareference-input-inputtype:
|
||||
|
||||
Input type
|
||||
~~~~~~~~~~
|
||||
|
||||
Wraps MAME’s ``input_type_entry`` class, representing an emulated input type or
|
||||
emulator UI input type. Input types are uniquely identified by the combination
|
||||
of their enumerated type value and player index.
|
||||
|
||||
Instantiation
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
manager.machine.ioport.types[index]
|
||||
Gets a supported input type.
|
||||
|
||||
Properties
|
||||
^^^^^^^^^^
|
||||
|
||||
type.type (read-only)
|
||||
An enumerated value representing the type of input.
|
||||
type.group (read-only)
|
||||
An integer giving the grouping for the input type. Should be used to
|
||||
provide canonical grouping in an input configuration UI.
|
||||
type.player (read-only)
|
||||
The zero-based player number, or zero for non-player controls.
|
||||
type.token (read-only)
|
||||
The token string for the input type, used in configuration files.
|
||||
type.name (read-only)
|
||||
The display name for the input type.
|
||||
type.is_analog (read-only)
|
||||
A Boolean indicating whether the input type is analog or digital. Inputs
|
||||
that only have on and off states are considered digital, while all other
|
||||
inputs are considered analog, even if they can only represent discrete
|
||||
values or positions.
|
||||
|
||||
.. _luareference-input-inputman:
|
||||
|
||||
Input manager
|
||||
@ -2745,10 +2795,12 @@ screens in the emulated system.
|
||||
Instantiation
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
Layout scripts generally
|
||||
|
||||
manager.machine.render.targets[index].current_view
|
||||
Gets the currently selected view for a given render target.
|
||||
file.views[name]
|
||||
Gets the view with the specified name from a
|
||||
:ref:`layout file <luareference-render-layfile>`. This is how layout
|
||||
scripts generally obtain views.
|
||||
|
||||
Methods
|
||||
^^^^^^^
|
||||
@ -2982,9 +3034,193 @@ Debugger
|
||||
--------
|
||||
|
||||
Some of MAME’s core debugging features can be controlled from Lua script. The
|
||||
debugger must be enabled to use the debugging features (usually by passing
|
||||
debugger must be enabled to use the debugger features (usually by passing
|
||||
``-debug`` on the command line).
|
||||
|
||||
.. _luareference-debug-symtable:
|
||||
|
||||
Symbol table
|
||||
~~~~~~~~~~~~
|
||||
|
||||
Wrap’s MAME’s ``symbol_table`` class, providing named symbols that can be used
|
||||
in expressions. Note that symbol tables can be created and used even when the
|
||||
debugger is not enabled.
|
||||
|
||||
Instantiation
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
emu.symbol_table(machine, [parent], [device])
|
||||
Creates a new symbol table in the context of the specified machine,
|
||||
optionally supplying a parent symbol table. If a parent symbol table is
|
||||
supplied, it must not be destroyed before the new symbol table. If a device
|
||||
is specified and it implements ``device_memory_interface``, it is used as
|
||||
the base for looking up address spaces and memory regions. Note that if a
|
||||
device that does not implement ``device_memory_interface`` is supplied, it
|
||||
will not be used (address spaces and memory regions will be looked up
|
||||
relative to the root device).
|
||||
|
||||
Methods
|
||||
^^^^^^^
|
||||
|
||||
symbols:set_memory_modified_func(cb)
|
||||
Set a function to call when memory is modified via the symbol table. No
|
||||
arguments are passed to the function and any return values are ignored.
|
||||
Call with ``nil`` to remove the callback.
|
||||
symbols:add(name, [value])
|
||||
Adds a named integer symbol. The name must be a string. If a value is
|
||||
supplied, it must be an integer. If a value is supplied, a read-only symbol
|
||||
is added with the supplied value. If no value is supplied, a read/write
|
||||
symbol is created with and initial value of zero. If a symbol entry with
|
||||
the specified name already exists in the symbol table, it will be replaced.
|
||||
symbols:add(name, getter, [setter], [format])
|
||||
Adds a named integer symbol using getter and optional setter callbacks. The
|
||||
name must be a string. The getter must be a function returning an integer
|
||||
for the symbol value. If supplied, the setter must be a function that
|
||||
accepts a single integer argument for the new value of the symbol. A format
|
||||
string for displaying the symbol value may optionally be supplied. If a
|
||||
symbol entry with the specified name already exists in the symbol table, it
|
||||
will be replaced.
|
||||
symbols:add(name, minparams, maxparams, execute)
|
||||
Adds a named function symbol. The name must be a string. The minimum and
|
||||
maximum numbers of parameters must be integers. If a symbol entry with the
|
||||
specified name already exists in the symbol table, it will be replaced.
|
||||
symbols:find(name)
|
||||
Returns the :ref:`symbol entry <luareference-debug-symentry>` with the
|
||||
specified name, or ``nil`` if there is no symbol with the specified name in
|
||||
the symbol table.
|
||||
symbols:find_deep(name)
|
||||
Returns the :ref:`symbol entry <luareference-debug-symentry>` with the
|
||||
specified name, or ``nil`` if there is no symbol with the specified name in
|
||||
the symbol table or any of its parent symbol tables.
|
||||
symbols:value(name)
|
||||
Returns the integer value of the symbol with the specified name, or zero if
|
||||
there is no symbol with the specified name in the symbol table or any of its
|
||||
parent symbol tables. Raises an error if the symbol with specified name is
|
||||
a function symbol.
|
||||
symbols:set_value(name, value)
|
||||
Sets the value of the symbol with the specified name. Raises an error if
|
||||
the symbol with the specified name is a read-only integer symbol or if it is
|
||||
a function symbol. Has no effect if there is no symbol with the specified
|
||||
name in the symbol table or any of its parent symbol tables.
|
||||
symbols:memory_value(name, space, offset, size, disable_se)
|
||||
Read a value from memory. Supply the name or tag of the address space or
|
||||
memory region to read from, or ``nil`` to use the address space or memory
|
||||
region implied by the ``space`` argument. See
|
||||
:ref:`memory accesses in debugger expressions <debugger-express-mem>` for
|
||||
access type specifications that can be used for the ``space`` argument.
|
||||
The access size is specified in bytes, and must be 1, 2, 4 or 8. The
|
||||
``disable_se`` argument specifies whether memory access side effects should
|
||||
be disabled.
|
||||
symbols:set_memory_value(name, space, offset, value, size, disable_se)
|
||||
Write a value to memory. Supply the name or tag of the address space or
|
||||
memory region to write to, or ``nil`` to use the address space or memory
|
||||
region implied by the ``space`` argument. See
|
||||
:ref:`memory accesses in debugger expressions <debugger-express-mem>` for
|
||||
access type specifications that can be used for the ``space`` argument.
|
||||
The access size is specified in bytes, and must be 1, 2, 4 or 8. The
|
||||
``disable_se`` argument specifies whether memory access side effects should
|
||||
be disabled.
|
||||
|
||||
Properties
|
||||
^^^^^^^^^^
|
||||
|
||||
symbols.entries[]
|
||||
The :ref:`symbol entries <luareference-debug-symentry>` in the symbol table,
|
||||
indexed by name. The ``at`` and ``index_of`` methods have O(n) complexity;
|
||||
all other supported operations have O(1) complexity.
|
||||
symbols.parent (read-only)
|
||||
The parent symbol table, or ``nil`` if the symbol table has no parent.
|
||||
|
||||
.. _luareference-debug-expression:
|
||||
|
||||
Parsed expression
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
Wraps MAME’s ``parsed_expression`` class, which represents a tokenised debugger
|
||||
expression. Note that parsed expressions can be created and used even when the
|
||||
debugger is not enabled.
|
||||
|
||||
Intantiation
|
||||
^^^^^^^^^^^^
|
||||
|
||||
emu.parsed_expression(symbols)
|
||||
Creates an empty expression that will use the supplied
|
||||
:ref:`symbol table <luareference-debug-symtable>` to look up symbols.
|
||||
emu.parsed_expression(symbols, string, [default_base])
|
||||
Creates an expression by parsing the supplied string, looking up symbols in
|
||||
the supplied :ref:`symbol table <luareference-debug-symtable>`. If the
|
||||
default base for interpreting integer literals is not supplied, 16 is used
|
||||
(hexadecimal). Raises an error if the string contains syntax errors or uses
|
||||
undefined symbols.
|
||||
emu.parsed_expression(expression)
|
||||
Creates a copy of an existing parsed expression.
|
||||
|
||||
Methods
|
||||
^^^^^^^
|
||||
|
||||
expression:set_default_base(base)
|
||||
Set the default base for interpreting numeric literals. The base must be a
|
||||
positive integer.
|
||||
expression:parse(string)
|
||||
Parse a debugger expression string. Replaces the current contents of the
|
||||
expression if it is not empty. Raises an error if the string contains
|
||||
syntax errors or uses undefined symbols. The previous content of the
|
||||
expression is not preserved when attempting to parse an invalid expression
|
||||
string.
|
||||
expression:execute()
|
||||
Evaluates the expression, returning an unsigned integer result. Raises an
|
||||
error if the expression cannot be evaluated (e.g. calling a function with an
|
||||
invalid number of arguments).
|
||||
|
||||
Properties
|
||||
^^^^^^^^^^
|
||||
|
||||
expression.is_empty (read-only)
|
||||
A Boolean indicating whether the expression contains no tokens.
|
||||
expression.original_string (read-only)
|
||||
The original string that was parsed to create the expression.
|
||||
expression.symbols (read/write)
|
||||
The :ref:`symbol table <luareference-debug-symtable>` used for to look up
|
||||
symbols in the expression.
|
||||
|
||||
.. _luareference-debug-symentry:
|
||||
|
||||
Symbol entry
|
||||
~~~~~~~~~~~~
|
||||
|
||||
Wraps MAME’s ``symbol_entry`` class, which represents an entry in a
|
||||
:ref:`symbol table <luareference-debug-symtable>`.
|
||||
|
||||
Instantiation
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
symbols:find(name)
|
||||
Obtains the symbol entry with the specified name from a
|
||||
:ref:`symbol table <luareference-debug-symtable>`, but does not search
|
||||
parent symbol tables.
|
||||
symbols:deep_find(name)
|
||||
Obtains the symbol entry with the specified name from a
|
||||
:ref:`symbol table <luareference-debug-symtable>`, recursively searching
|
||||
parent symbol tables.
|
||||
|
||||
Properties
|
||||
^^^^^^^^^^
|
||||
|
||||
entry.name (read-only)
|
||||
The name of the symbol entry.
|
||||
entry.format (read-only)
|
||||
The format string used to convert the symbol entry to text for display.
|
||||
entry.is_function (read-only)
|
||||
A Boolean indicating whether the symbol entry is a callable function.
|
||||
entry.is_lval (read-only)
|
||||
A Boolean indicating whether the symbol entry is an integer symbol that can
|
||||
be set (i.e. whether it can be used on the left-hand side of assignment
|
||||
expressions).
|
||||
entry.value (read/write)
|
||||
The integer value of the symbol entry. Attempting to set the value raises
|
||||
an error if the symbol entry is read-only. Attempting to get or set the
|
||||
value of a function symbol raises an error.
|
||||
|
||||
.. _luareference-debug-manager:
|
||||
|
||||
Debugger manager
|
||||
|
@ -11,7 +11,7 @@ license:CC0
|
||||
<year>2002</year>
|
||||
<publisher>San Bergmans</publisher>
|
||||
<part name="san" interface="rs232">
|
||||
<dataarea name="bitb" size="122">
|
||||
<dataarea name="input" size="122">
|
||||
<rom name="san.hex" size="122" crc="fecdae5e" sha1="bca50b488330f08146f6978b2d098c048e6dae69" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
@ -22,7 +22,7 @@ license:CC0
|
||||
<year>2002</year>
|
||||
<publisher>Izabella Malcolm</publisher>
|
||||
<part name="flash1" interface="rs232">
|
||||
<dataarea name="bitb" size="99">
|
||||
<dataarea name="input" size="99">
|
||||
<rom name="flash1.hex" size="99" crc="23fe0130" sha1="6f77c78d651de1c9d8d50239c50efa991970511c" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
@ -33,7 +33,7 @@ license:CC0
|
||||
<year>2002</year>
|
||||
<publisher>Izabella Malcolm</publisher>
|
||||
<part name="s" interface="rs232">
|
||||
<dataarea name="bitb" size="1081">
|
||||
<dataarea name="input" size="1081">
|
||||
<rom name="s.hex" size="1081" crc="93fa910c" sha1="cee797462888fdcfa01086b6bbadb16ec3b815fd" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
@ -44,17 +44,17 @@ license:CC0
|
||||
<year>2002</year>
|
||||
<publisher>Izabella Malcolm</publisher>
|
||||
<part name="lesson1a" interface="rs232">
|
||||
<dataarea name="bitb" size="52">
|
||||
<dataarea name="input" size="52">
|
||||
<rom name="lesson1a.hex" size="52" crc="e9a64757" sha1="469f8ea0587e0dceb2d78b5cfce3905ba3911362" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
<part name="lesson1b" interface="rs232">
|
||||
<dataarea name="bitb" size="54">
|
||||
<dataarea name="input" size="54">
|
||||
<rom name="lesson1b.hex" size="54" crc="60a901b9" sha1="e2dd75aa136e55752f70b03c5a3f80e323a6bd01" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
<part name="lesson1c" interface="rs232">
|
||||
<dataarea name="bitb" size="99">
|
||||
<dataarea name="input" size="99">
|
||||
<rom name="lesson1c.hex" size="99" crc="23fe0130" sha1="6f77c78d651de1c9d8d50239c50efa991970511c" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
@ -65,22 +65,22 @@ license:CC0
|
||||
<year>2002</year>
|
||||
<publisher>Izabella Malcolm</publisher>
|
||||
<part name="lesson2a" interface="rs232">
|
||||
<dataarea name="bitb" size="99">
|
||||
<dataarea name="input" size="99">
|
||||
<rom name="lesson2a.hex" size="99" crc="84700789" sha1="9accbeb4d689849db65b2074507dc15a647f8327" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
<part name="lesson2b" interface="rs232">
|
||||
<dataarea name="bitb" size="138">
|
||||
<dataarea name="input" size="138">
|
||||
<rom name="lesson2b.hex" size="138" crc="f91d4a99" sha1="642b50e0d9f1ee6fcff0255196bf667dc1caa34f" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
<part name="lesson2c" interface="rs232">
|
||||
<dataarea name="bitb" size="232">
|
||||
<dataarea name="input" size="232">
|
||||
<rom name="lesson2c.hex" size="232" crc="3ef03d54" sha1="aa2c369696cd99ed2c690fd6af556bffb63cf018" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
<part name="lesson2d" interface="rs232">
|
||||
<dataarea name="bitb" size="300">
|
||||
<dataarea name="input" size="300">
|
||||
<rom name="lesson2d.hex" size="300" crc="15bd9eb6" sha1="80e0f30daad6bd3f1e3f229cd469ee387257fb4f" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
@ -91,22 +91,22 @@ license:CC0
|
||||
<year>2002</year>
|
||||
<publisher>Izabella Malcolm</publisher>
|
||||
<part name="lesson3a" interface="rs232">
|
||||
<dataarea name="bitb" size="275">
|
||||
<dataarea name="input" size="275">
|
||||
<rom name="lesson3a.hex" size="275" crc="8aeb4a94" sha1="cf80d8cffc984bbfffda32417329b5ffd55ceb99" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
<part name="lesson3b" interface="rs232">
|
||||
<dataarea name="bitb" size="271">
|
||||
<dataarea name="input" size="271">
|
||||
<rom name="lesson3b.hex" size="271" crc="ed94066c" sha1="30a26946ab76c44af4bb83a18df1dd9b68a84465" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
<part name="lesson3c" interface="rs232">
|
||||
<dataarea name="bitb" size="318">
|
||||
<dataarea name="input" size="318">
|
||||
<rom name="lesson3c.hex" size="318" crc="f94a5811" sha1="af6e3d38d431c3b8d5220b0245c7d2b9784a1c62" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
<part name="lesson3d" interface="rs232">
|
||||
<dataarea name="bitb" size="179">
|
||||
<dataarea name="input" size="179">
|
||||
<rom name="lesson3d.hex" size="179" crc="24601f67" sha1="ac211ecde9d9cf2b44612171701e31bcbe0a8298" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
@ -117,22 +117,22 @@ license:CC0
|
||||
<year>2002</year>
|
||||
<publisher>Izabella Malcolm</publisher>
|
||||
<part name="lesson4a" interface="rs232">
|
||||
<dataarea name="bitb" size="193">
|
||||
<dataarea name="input" size="193">
|
||||
<rom name="lesson4a.hex" size="193" crc="a86ad64b" sha1="97bef5c08cbba08b24ea695616ec87393493541f" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
<part name="lesson4b" interface="rs232">
|
||||
<dataarea name="bitb" size="175">
|
||||
<dataarea name="input" size="175">
|
||||
<rom name="lesson4b.hex" size="175" crc="366ee1bf" sha1="0e8bbe341fa92ee0a711f414600b27d730a57d69" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
<part name="lesson4c" interface="rs232">
|
||||
<dataarea name="bitb" size="216">
|
||||
<dataarea name="input" size="216">
|
||||
<rom name="lesson4c.hex" size="216" crc="19ed2324" sha1="27422a61cbb923a18c69216afed4df6e0879e0be" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
<part name="lesson4d" interface="rs232">
|
||||
<dataarea name="bitb" size="224">
|
||||
<dataarea name="input" size="224">
|
||||
<rom name="lesson4d.hex" size="224" crc="1f2a1ecd" sha1="8316d6cfcedb5b0aadbc27cb94c38a583bb1aaf0" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
@ -143,27 +143,27 @@ license:CC0
|
||||
<year>2002</year>
|
||||
<publisher>Izabella Malcolm</publisher>
|
||||
<part name="lesson5a" interface="rs232">
|
||||
<dataarea name="bitb" size="148">
|
||||
<dataarea name="input" size="148">
|
||||
<rom name="lesson5a.hex" size="148" crc="4a9c316a" sha1="46ad8f02c244eaf934c484c791be5c30600c2fe0" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
<part name="lesson5b" interface="rs232">
|
||||
<dataarea name="bitb" size="191">
|
||||
<dataarea name="input" size="191">
|
||||
<rom name="lesson5b.hex" size="191" crc="eec56088" sha1="103a7ee4242e14a626431c16ca050152338d6ad5" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
<part name="lesson5c" interface="rs232">
|
||||
<dataarea name="bitb" size="228">
|
||||
<dataarea name="input" size="228">
|
||||
<rom name="lesson5c.hex" size="228" crc="61b09163" sha1="3924c385878b521cfbe031e623cfe2bc667f9022" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
<part name="lesson5d" interface="rs232">
|
||||
<dataarea name="bitb" size="255">
|
||||
<dataarea name="input" size="255">
|
||||
<rom name="lesson5d.hex" size="255" crc="f8f47539" sha1="ba5de7bafcf242f7661d86418e4c4058d835088c" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
<part name="lesson5e" interface="rs232">
|
||||
<dataarea name="bitb" size="302">
|
||||
<dataarea name="input" size="302">
|
||||
<rom name="lesson5e.hex" size="302" crc="fedb753c" sha1="dcafdbf3413050dabf7394cfe85d3585b1af4bd0" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
|
@ -9,6 +9,10 @@
|
||||
#include "emu.h"
|
||||
#include "bitbngr.h"
|
||||
|
||||
#include "softlist_dev.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
@ -24,6 +28,8 @@ DEFINE_DEVICE_TYPE(BITBANGER, bitbanger_device, "bitbanger", "Bitbanger")
|
||||
bitbanger_device::bitbanger_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
device_t(mconfig, BITBANGER, tag, owner, clock),
|
||||
device_image_interface(mconfig, *this),
|
||||
m_next(nullptr),
|
||||
m_end(nullptr),
|
||||
m_interface(nullptr),
|
||||
m_is_readonly(false)
|
||||
{
|
||||
@ -37,10 +43,8 @@ bitbanger_device::bitbanger_device(const machine_config &mconfig, const char *ta
|
||||
|
||||
void bitbanger_device::output(uint8_t data)
|
||||
{
|
||||
if (exists())
|
||||
{
|
||||
if (!loaded_through_softlist() && exists())
|
||||
fwrite(&data, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -50,11 +54,21 @@ void bitbanger_device::output(uint8_t data)
|
||||
|
||||
uint32_t bitbanger_device::input(void *buffer, uint32_t length)
|
||||
{
|
||||
if (exists())
|
||||
if (loaded_through_softlist())
|
||||
{
|
||||
size_t const result = std::min<size_t>(length, m_end - m_next);
|
||||
memcpy(buffer, m_next, result);
|
||||
m_next += result;
|
||||
return uint32_t(result);
|
||||
}
|
||||
else if (exists())
|
||||
{
|
||||
return fread(buffer, length);
|
||||
}
|
||||
return 0;
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -63,25 +77,45 @@ uint32_t bitbanger_device::input(void *buffer, uint32_t length)
|
||||
device_start
|
||||
-------------------------------------------------*/
|
||||
|
||||
void bitbanger_device::device_start(void)
|
||||
void bitbanger_device::device_start()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
get_software_list_loader
|
||||
-------------------------------------------------*/
|
||||
|
||||
const software_list_loader &bitbanger_device::get_software_list_loader() const
|
||||
{
|
||||
return rom_software_list_loader::instance();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
call_load
|
||||
-------------------------------------------------*/
|
||||
|
||||
image_init_result bitbanger_device::call_load(void)
|
||||
image_init_result bitbanger_device::call_load()
|
||||
{
|
||||
/* we don't need to do anything special */
|
||||
if (loaded_through_softlist())
|
||||
{
|
||||
auto const length = get_software_region_length("input");
|
||||
m_next = get_software_region("input");
|
||||
m_end = m_next + length;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_next = m_end = nullptr;
|
||||
}
|
||||
return image_init_result::PASS;
|
||||
}
|
||||
|
||||
image_init_result bitbanger_device::call_create(int format_type, util::option_resolution *format_options)
|
||||
{
|
||||
/* we don't need to do anything special */
|
||||
// we don't need to do anything special
|
||||
return image_init_result::PASS;
|
||||
}
|
||||
|
||||
@ -89,6 +123,7 @@ image_init_result bitbanger_device::call_create(int format_type, util::option_re
|
||||
call_unload
|
||||
-------------------------------------------------*/
|
||||
|
||||
void bitbanger_device::call_unload(void)
|
||||
void bitbanger_device::call_unload()
|
||||
{
|
||||
m_next = m_end = nullptr;
|
||||
}
|
||||
|
@ -39,10 +39,15 @@ public:
|
||||
uint32_t input(void *buffer, uint32_t length);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
// device_t implementation
|
||||
virtual void device_start() override;
|
||||
|
||||
// device_image_interface implementation
|
||||
virtual software_list_loader const &get_software_list_loader() const override;
|
||||
|
||||
private:
|
||||
uint8_t const *m_next;
|
||||
uint8_t const *m_end;
|
||||
char const *m_interface;
|
||||
bool m_is_readonly;
|
||||
};
|
||||
|
@ -1400,7 +1400,7 @@ void cheat_manager::load_cheats(std::string const &filename)
|
||||
emu_file cheatfile(std::move(searchstr), OPEN_FLAG_READ);
|
||||
try
|
||||
{
|
||||
// loop over all instrances of the files found in our search paths
|
||||
// loop over all instances of the files found in our search paths
|
||||
for (std::error_condition filerr = cheatfile.open(filename + ".xml"); !filerr; filerr = cheatfile.open_next())
|
||||
{
|
||||
osd_printf_verbose("Loading cheats file from %s\n", cheatfile.fullpath());
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "debug/debugcon.h"
|
||||
#include "debug/debugcpu.h"
|
||||
#include "debug/debugvw.h"
|
||||
#include "debug/express.h"
|
||||
#include "debug/points.h"
|
||||
#include "debug/textbuf.h"
|
||||
#include "debugger.h"
|
||||
@ -94,6 +95,140 @@ void lua_engine::initialize_debug(sol::table &emu)
|
||||
{ "wr", read_or_write::READWRITE }
|
||||
};
|
||||
|
||||
static const enum_parser<expression_space, 15> s_expression_space_parser =
|
||||
{
|
||||
{ "p", EXPSPACE_PROGRAM_LOGICAL }, { "lp", EXPSPACE_PROGRAM_LOGICAL }, { "pp", EXPSPACE_PROGRAM_PHYSICAL },
|
||||
{ "d", EXPSPACE_DATA_LOGICAL }, { "ld", EXPSPACE_DATA_LOGICAL }, { "pd", EXPSPACE_DATA_PHYSICAL },
|
||||
{ "i", EXPSPACE_IO_LOGICAL }, { "li", EXPSPACE_IO_LOGICAL }, { "pi", EXPSPACE_IO_PHYSICAL },
|
||||
{ "3", EXPSPACE_OPCODE_LOGICAL }, { "l3", EXPSPACE_OPCODE_LOGICAL }, { "p3", EXPSPACE_OPCODE_PHYSICAL },
|
||||
{ "r", EXPSPACE_PRGDIRECT },
|
||||
{ "o", EXPSPACE_OPDIRECT },
|
||||
{ "m", EXPSPACE_REGION }
|
||||
};
|
||||
|
||||
auto const do_add_symbol = [this] (symbol_table &st, char const *name, sol::protected_function getter, std::optional<sol::protected_function> setter, std::optional<char const *> format)
|
||||
{
|
||||
symbol_table::setter_func setfun;
|
||||
if (setter)
|
||||
setfun = [this, cbfunc = std::move(*setter)] (u64 value) { invoke(cbfunc, value); };
|
||||
st.add(
|
||||
name,
|
||||
[this, cbfunc = std::move(getter)] () -> u64
|
||||
{
|
||||
auto result = invoke(cbfunc).get<sol::optional<u64> >();
|
||||
if (result)
|
||||
{
|
||||
return *result;
|
||||
}
|
||||
else
|
||||
{
|
||||
osd_printf_error("[LUA EROR] invalid return from symbol value getter callback\n");
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
std::move(setfun),
|
||||
(format && *format) ? *format : "");
|
||||
};
|
||||
|
||||
auto symbol_table_type = emu.new_usertype<symbol_table>(
|
||||
"symbol_table",
|
||||
sol::call_constructor, sol::factories(
|
||||
[] (running_machine &machine, symbol_table *parent, device_t *device) { return std::make_unique<symbol_table>(machine, parent, device); },
|
||||
[] (running_machine &machine, symbol_table *parent) { return std::make_unique<symbol_table>(machine, parent); },
|
||||
[] (running_machine &machine, device_t &device) { return std::make_unique<symbol_table>(machine, nullptr, &device); },
|
||||
[] (running_machine &machine) { return std::make_unique<symbol_table>(machine); }));
|
||||
symbol_table_type["set_memory_modified_func"] =
|
||||
[this] (symbol_table &st, sol::object cb)
|
||||
{
|
||||
if (cb == sol::lua_nil)
|
||||
st.set_memory_modified_func(nullptr);
|
||||
else if (cb.is<sol::protected_function>())
|
||||
st.set_memory_modified_func([this, cbfunc = cb.as<sol::protected_function>()] () { invoke(cbfunc); });
|
||||
else
|
||||
osd_printf_error("[LUA ERROR] must call set_memory_modified_func with function or nil\n");
|
||||
};
|
||||
symbol_table_type["add"] = sol::overload(
|
||||
[] (symbol_table &st, char const *name) { st.add(name, symbol_table::READ_WRITE); },
|
||||
static_cast<void (symbol_table::*)(char const *, u64)>(&symbol_table::add),
|
||||
do_add_symbol,
|
||||
[do_add_symbol] (symbol_table &st, char const *name, sol::protected_function getter, sol::lua_nil_t, char const *format)
|
||||
{
|
||||
do_add_symbol(st, name, getter, std::nullopt, format);
|
||||
},
|
||||
[do_add_symbol] (symbol_table &st, char const *name, sol::protected_function getter, std::optional<sol::protected_function> setter)
|
||||
{
|
||||
do_add_symbol(st, name, getter, setter, nullptr);
|
||||
},
|
||||
[do_add_symbol] (symbol_table &st, char const *name, sol::protected_function getter, char const *format)
|
||||
{
|
||||
do_add_symbol(st, name, getter, std::nullopt, format);
|
||||
},
|
||||
[do_add_symbol] (symbol_table &st, char const *name, sol::protected_function getter)
|
||||
{
|
||||
do_add_symbol(st, name, getter, std::nullopt, nullptr);
|
||||
},
|
||||
[this] (symbol_table &st, char const *name, int minparams, int maxparams, sol::protected_function execute)
|
||||
{
|
||||
st.add(
|
||||
name,
|
||||
minparams,
|
||||
maxparams,
|
||||
[this, cbref = sol::reference(execute)] (int numparams, u64 const *paramlist) -> u64
|
||||
{
|
||||
sol::stack_reference traceback(m_lua_state, -sol::stack::push(m_lua_state, sol::default_traceback_error_handler));
|
||||
cbref.push();
|
||||
sol::stack_aligned_stack_handler_function func(m_lua_state, -1, traceback);
|
||||
for (int i = 0; numparams > i; ++i)
|
||||
lua_pushinteger(m_lua_state, paramlist[i]);
|
||||
auto result = func(sol::stack_count(numparams)).get<sol::optional<u64> >();
|
||||
traceback.pop();
|
||||
return result ? *result : 0;
|
||||
});
|
||||
});
|
||||
symbol_table_type["find"] = &symbol_table::find;
|
||||
symbol_table_type["find_deep"] = &symbol_table::find_deep;
|
||||
symbol_table_type["value"] = &symbol_table::value;
|
||||
symbol_table_type["set_value"] = &symbol_table::set_value;
|
||||
symbol_table_type["memory_value"] =
|
||||
[] (symbol_table &st, char const *name, char const *space, u32 offset, int size, bool disable_se)
|
||||
{
|
||||
expression_space const es = s_expression_space_parser(space);
|
||||
return st.memory_value(name, es, offset, size, disable_se);
|
||||
};
|
||||
symbol_table_type["set_memory_value"] =
|
||||
[] (symbol_table &st, char const *name, char const *space, u32 offset, int size, u64 value, bool disable_se)
|
||||
{
|
||||
expression_space const es = s_expression_space_parser(space);
|
||||
st.set_memory_value(name, es, offset, size, value, disable_se);
|
||||
};
|
||||
//symbol_table_type["read_memory"] = &symbol_table::read_memory; crashes if you try to use it, need to work out why
|
||||
//symbol_table_type["write_memory"] = &symbol_table::write_memory; crashes if you try to use it, need to work out why
|
||||
symbol_table_type["entries"] = sol::property([] (symbol_table const &st) { return standard_tag_object_ptr_map<symbol_entry>(st.entries()); });
|
||||
symbol_table_type["parent"] = sol::property(&symbol_table::parent);
|
||||
|
||||
|
||||
auto parsed_expression_type = emu.new_usertype<parsed_expression>(
|
||||
"parsed_expression",
|
||||
sol::call_constructor, sol::factories(
|
||||
[] (symbol_table &symtable) { return std::make_unique<parsed_expression>(symtable); },
|
||||
[] (symbol_table &symtable, char const *expression, int default_base) { return std::make_unique<parsed_expression>(symtable, expression, default_base); },
|
||||
[] (symbol_table &symtable, char const *expression) { return std::make_unique<parsed_expression>(symtable, expression); },
|
||||
[] (parsed_expression const &src) { return std::make_unique<parsed_expression>(src); }));
|
||||
parsed_expression_type["set_default_base"] = &parsed_expression::set_default_base;
|
||||
parsed_expression_type["parse"] = [] (parsed_expression &e, char const *string) { e.parse(string); };
|
||||
parsed_expression_type["execute"] = &parsed_expression::execute;
|
||||
parsed_expression_type["is_empty"] = sol::property(&parsed_expression::is_empty);
|
||||
parsed_expression_type["original_string"] = sol::property(&parsed_expression::original_string);
|
||||
parsed_expression_type["symbols"] = sol::property(&parsed_expression::symbols, &parsed_expression::set_symbols);
|
||||
|
||||
|
||||
auto symbol_entry_type = sol().registry().new_usertype<symbol_entry>("symbol_entry", sol::no_constructor);
|
||||
symbol_entry_type["name"] = sol::property(&symbol_entry::name);
|
||||
symbol_entry_type["format"] = sol::property(&symbol_entry::format);
|
||||
symbol_entry_type["is_function"] = sol::property(&symbol_entry::is_function);
|
||||
symbol_entry_type["is_lval"] = sol::property(&symbol_entry::is_lval);
|
||||
symbol_entry_type["value"] = sol::property(&symbol_entry::value, &symbol_entry::set_value);
|
||||
|
||||
|
||||
auto debugger_type = sol().registry().new_usertype<debugger_manager>("debugger", sol::no_constructor);
|
||||
debugger_type["command"] = [] (debugger_manager &debug, std::string const &cmd) { debug.console().execute_command(cmd, false); };
|
||||
@ -177,7 +312,7 @@ void lua_engine::initialize_debug(sol::table &emu)
|
||||
device_debug_type["wpset"] =
|
||||
[] (device_debug &dev, addr_space &sp, std::string const &type, offs_t addr, offs_t len, char const *cond, char const *act)
|
||||
{
|
||||
read_or_write wptype = s_read_or_write_parser(type);
|
||||
read_or_write const wptype = s_read_or_write_parser(type);
|
||||
int result(dev.watchpoint_set(sp.space, wptype, addr, len, cond, act));
|
||||
dev.device().machine().debug_view().update_all(DVT_WATCH_POINTS);
|
||||
return result;
|
||||
|
@ -144,29 +144,40 @@ void lua_engine::initialize_input(sol::table &emu)
|
||||
ioport_manager_type["count_players"] = &ioport_manager::count_players;
|
||||
ioport_manager_type["type_pressed"] = sol::overload(
|
||||
&ioport_manager::type_pressed,
|
||||
[] (ioport_manager &im, ioport_type type) { return im.type_pressed(type, 0); });
|
||||
[] (ioport_manager &im, ioport_type type) { return im.type_pressed(type, 0); },
|
||||
[] (ioport_manager &im, input_type_entry const &type) { return im.type_pressed(type.type(), type.player()); });
|
||||
ioport_manager_type["type_name"] = sol::overload(
|
||||
&ioport_manager::type_name,
|
||||
[] (ioport_manager &im, ioport_type type) { return im.type_name(type, 0); });
|
||||
ioport_manager_type["type_group"] = sol::overload(
|
||||
&ioport_manager::type_group,
|
||||
[] (ioport_manager &im, ioport_type type) { return im.type_group(type, 0); });
|
||||
ioport_manager_type["type_seq"] =
|
||||
ioport_manager_type["type_seq"] = sol::overload(
|
||||
[] (ioport_manager &im, ioport_type type, std::optional<int> player, std::optional<char const *> seq_type_string)
|
||||
{
|
||||
if (!player)
|
||||
player = 0;
|
||||
input_seq_type seq_type = seq_type_string ? s_seq_type_parser(*seq_type_string) : SEQ_TYPE_STANDARD;
|
||||
return im.type_seq(type, *player, seq_type);
|
||||
};
|
||||
ioport_manager_type["set_type_seq"] =
|
||||
},
|
||||
[] (ioport_manager &im, input_type_entry const &type, std::optional<char const *> seq_type_string)
|
||||
{
|
||||
input_seq_type seq_type = seq_type_string ? s_seq_type_parser(*seq_type_string) : SEQ_TYPE_STANDARD;
|
||||
return im.type_seq(type.type(), type.player(), seq_type);
|
||||
});
|
||||
ioport_manager_type["set_type_seq"] = sol::overload(
|
||||
[] (ioport_manager &im, ioport_type type, std::optional<int> player, std::optional<char const *> seq_type_string, input_seq const &seq)
|
||||
{
|
||||
if (!player)
|
||||
player = 0;
|
||||
input_seq_type seq_type = seq_type_string ? s_seq_type_parser(*seq_type_string) : SEQ_TYPE_STANDARD;
|
||||
im.set_type_seq(type, *player, seq_type, seq);
|
||||
};
|
||||
},
|
||||
[] (ioport_manager &im, input_type_entry const &type, std::optional<char const *> seq_type_string, input_seq const &seq)
|
||||
{
|
||||
input_seq_type seq_type = seq_type_string ? s_seq_type_parser(*seq_type_string) : SEQ_TYPE_STANDARD;
|
||||
im.set_type_seq(type.type(), type.player(), seq_type, seq);
|
||||
});
|
||||
ioport_manager_type["token_to_input_type"] =
|
||||
[] (ioport_manager &im, std::string const &string)
|
||||
{
|
||||
@ -177,6 +188,7 @@ void lua_engine::initialize_input(sol::table &emu)
|
||||
ioport_manager_type["input_type_to_token"] = sol::overload(
|
||||
&ioport_manager::input_type_to_token,
|
||||
[] (ioport_manager &im, ioport_type type) { return im.input_type_to_token(type, 0); });
|
||||
ioport_manager_type["types"] = sol::property(&ioport_manager::types);
|
||||
ioport_manager_type["ports"] = sol::property([] (ioport_manager &im) { return tag_object_ptr_map<ioport_list>(im.ports()); });
|
||||
|
||||
|
||||
@ -359,6 +371,15 @@ void lua_engine::initialize_input(sol::table &emu)
|
||||
ioport_field_live_type["name"] = &ioport_field_live::name;
|
||||
|
||||
|
||||
auto input_type_entry_type = sol().registry().new_usertype<input_type_entry>("input_type_entry", sol::no_constructor);
|
||||
input_type_entry_type["type"] = sol::property(&input_type_entry::type);
|
||||
input_type_entry_type["group"] = sol::property(&input_type_entry::group);
|
||||
input_type_entry_type["player"] = sol::property(&input_type_entry::player);
|
||||
input_type_entry_type["token"] = sol::property(&input_type_entry::token);
|
||||
input_type_entry_type["name"] = sol::property(&input_type_entry::name);
|
||||
input_type_entry_type["is_analog"] = sol::property([] (input_type_entry const &type) { return ioport_manager::type_is_analog(type.type()); });
|
||||
|
||||
|
||||
auto input_type = sol().registry().new_usertype<input_manager>("input", sol::no_constructor);
|
||||
input_type["code_value"] = &input_manager::code_value;
|
||||
input_type["code_pressed"] = &input_manager::code_pressed;
|
||||
|
@ -69,6 +69,9 @@
|
||||
************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "machine/agatkeyb.h"
|
||||
#include "video/agat7.h"
|
||||
#include "video/agat9.h"
|
||||
|
||||
#include "bus/a2bus/a2diskii.h"
|
||||
#include "bus/a2bus/agat7langcard.h"
|
||||
@ -80,12 +83,9 @@
|
||||
#include "cpu/m6502/m6502.h"
|
||||
#include "cpu/m6502/r65c02.h"
|
||||
#include "imagedev/cassette.h"
|
||||
#include "machine/agatkeyb.h"
|
||||
#include "machine/bankdev.h"
|
||||
#include "machine/timer.h"
|
||||
#include "sound/spkrdev.h"
|
||||
#include "video/agat7.h"
|
||||
#include "video/agat9.h"
|
||||
|
||||
#include "screen.h"
|
||||
#include "softlist.h"
|
||||
|
@ -2,16 +2,17 @@
|
||||
// copyright-holders:Sergey Svishchev
|
||||
|
||||
#include "emu.h"
|
||||
#include "machine/genpc.h"
|
||||
|
||||
#include "bus/pc_joy/pc_joy.h"
|
||||
#include "bus/pc_kbd/keyboards.h"
|
||||
#include "bus/pc_kbd/pc_kbdc.h"
|
||||
#include "cpu/i86/i86.h"
|
||||
#include "formats/asst128_dsk.h"
|
||||
#include "imagedev/floppy.h"
|
||||
#include "machine/genpc.h"
|
||||
#include "machine/pc_fdc.h"
|
||||
|
||||
#include "formats/asst128_dsk.h"
|
||||
|
||||
|
||||
DECLARE_DEVICE_TYPE(ASST128_MOTHERBOARD, asst128_mb_device)
|
||||
|
||||
|
@ -14,13 +14,14 @@
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "machine/genpc.h"
|
||||
|
||||
#include "bus/isa/xsu_cards.h"
|
||||
#include "bus/pc_kbd/keyboards.h"
|
||||
#include "bus/pc_kbd/pc_kbdc.h"
|
||||
#include "cpu/i86/i86.h"
|
||||
#include "machine/genpc.h"
|
||||
#include "machine/ram.h"
|
||||
|
||||
#include "softlist_dev.h"
|
||||
|
||||
|
||||
|
@ -356,17 +356,16 @@ Software to look for
|
||||
******************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "machine/hp_ipc_optrom.h"
|
||||
|
||||
#include "bus/hp_hil/hil_devices.h"
|
||||
#include "bus/hp_hil/hp_hil.h"
|
||||
#include "bus/hp_ipc_io/hp_ipc_io.h"
|
||||
#include "bus/ieee488/ieee488.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "formats/hp_ipc_dsk.h"
|
||||
#include "imagedev/floppy.h"
|
||||
#include "machine/bankdev.h"
|
||||
#include "machine/cop452.h"
|
||||
#include "machine/hp_ipc_optrom.h"
|
||||
#include "machine/input_merger.h"
|
||||
#include "machine/mm58167.h"
|
||||
#include "machine/ram.h"
|
||||
@ -374,11 +373,13 @@ Software to look for
|
||||
#include "machine/wd_fdc.h"
|
||||
#include "softlist_dev.h"
|
||||
#include "sound/dac.h"
|
||||
#include "speaker.h"
|
||||
#include "video/hp1ll3.h"
|
||||
|
||||
#include "formats/hp_ipc_dsk.h"
|
||||
|
||||
#include "emupal.h"
|
||||
#include "screen.h"
|
||||
#include "speaker.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
@ -16,18 +16,20 @@
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "machine/genpc.h"
|
||||
|
||||
#include "bus/isa/xsu_cards.h"
|
||||
#include "bus/pc_kbd/keyboards.h"
|
||||
#include "bus/pc_kbd/pc_kbdc.h"
|
||||
#include "cpu/i86/i86.h"
|
||||
#include "machine/genpc.h"
|
||||
#include "machine/pc_lpt.h"
|
||||
#include "machine/ram.h"
|
||||
|
||||
#include "softlist.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
class iskr103x_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -123,6 +125,9 @@ ROM_START( iskr1031 )
|
||||
ROMX_LOAD( "150-07.bin", 0xc001, 0x2000, CRC(0dc4b65a) SHA1(c96f066251a7343eac8113ea9dcb2cb12d0334d5), ROM_SKIP(1) | ROM_BIOS(1))
|
||||
ROM_END
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Game driver(s)
|
||||
|
@ -15,11 +15,21 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "machine/kb_7007_3.h"
|
||||
|
||||
#include "bus/centronics/ctronics.h"
|
||||
#include "bus/isa/isa.h"
|
||||
#include "bus/isa/mc1502_fdc.h"
|
||||
#include "bus/isa/xsu_cards.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "cpu/i86/i86.h"
|
||||
#include "includes/mc1502.h"
|
||||
#include "machine/kb_7007_3.h"
|
||||
#include "imagedev/cassette.h"
|
||||
#include "machine/i8251.h"
|
||||
#include "machine/i8255.h"
|
||||
#include "machine/pic8259.h"
|
||||
#include "machine/pit8253.h"
|
||||
#include "machine/ram.h"
|
||||
#include "sound/spkrdev.h"
|
||||
|
||||
#include "softlist_dev.h"
|
||||
#include "speaker.h"
|
||||
@ -38,6 +48,82 @@
|
||||
#define LOGPPI(...) LOGMASKED(LOG_PPI, __VA_ARGS__)
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
class mc1502_state : public driver_device
|
||||
{
|
||||
public:
|
||||
mc1502_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_upd8251(*this, "upd8251")
|
||||
, m_pic8259(*this, "pic8259")
|
||||
, m_pit8253(*this, "pit8253")
|
||||
, m_ppi8255n1(*this, "ppi8255n1")
|
||||
, m_ppi8255n2(*this, "ppi8255n2")
|
||||
, m_isabus(*this, "isa")
|
||||
, m_speaker(*this, "speaker")
|
||||
, m_cassette(*this, "cassette")
|
||||
, m_centronics(*this, "centronics")
|
||||
, m_ram(*this, RAM_TAG)
|
||||
, m_kbdio(*this, "Y%u", 1)
|
||||
{ }
|
||||
|
||||
void mc1502(machine_config &config);
|
||||
|
||||
void init_mc1502();
|
||||
|
||||
void fdc_config(device_t *device);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
private:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<i8251_device> m_upd8251;
|
||||
required_device<pic8259_device> m_pic8259;
|
||||
required_device<pit8253_device> m_pit8253;
|
||||
required_device<i8255_device> m_ppi8255n1;
|
||||
required_device<i8255_device> m_ppi8255n2;
|
||||
required_device<isa8_device> m_isabus;
|
||||
required_device<speaker_sound_device> m_speaker;
|
||||
required_device<cassette_image_device> m_cassette;
|
||||
required_device<centronics_device> m_centronics;
|
||||
required_device<ram_device> m_ram;
|
||||
required_ioport_array<12> m_kbdio;
|
||||
|
||||
TIMER_CALLBACK_MEMBER(keyb_signal_callback);
|
||||
|
||||
struct {
|
||||
uint8_t pulsing;
|
||||
uint16_t mask; /* input lines */
|
||||
emu_timer *keyb_signal_timer;
|
||||
} m_kbd;
|
||||
|
||||
uint8_t m_ppi_portb;
|
||||
uint8_t m_ppi_portc;
|
||||
uint8_t m_spkrdata;
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(mc1502_pit8253_out1_changed);
|
||||
DECLARE_WRITE_LINE_MEMBER(mc1502_pit8253_out2_changed);
|
||||
DECLARE_WRITE_LINE_MEMBER(mc1502_speaker_set_spkrdata);
|
||||
DECLARE_WRITE_LINE_MEMBER(mc1502_i8251_syndet);
|
||||
|
||||
void mc1502_ppi_portb_w(uint8_t data);
|
||||
void mc1502_ppi_portc_w(uint8_t data);
|
||||
uint8_t mc1502_ppi_portc_r();
|
||||
uint8_t mc1502_kppi_porta_r();
|
||||
void mc1502_kppi_portb_w(uint8_t data);
|
||||
void mc1502_kppi_portc_w(uint8_t data);
|
||||
|
||||
void mc1502_io(address_map &map);
|
||||
void mc1502_map(address_map &map);
|
||||
|
||||
int m_pit_out2;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* onboard devices:
|
||||
*/
|
||||
@ -387,6 +473,9 @@ ROM_START( pk88 )
|
||||
ROM_LOAD( "pk88-1.064", 0xe000, 0x2000, CRC(6fa7e7ef) SHA1(d68bc273baa46ba733ac6ad4df7569dd70cf60dd))
|
||||
ROM_END
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Game driver(s)
|
||||
|
@ -29,7 +29,6 @@
|
||||
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "cpu/t11/t11.h"
|
||||
#include "formats/ms0515_dsk.h"
|
||||
#include "imagedev/floppy.h"
|
||||
#include "machine/clock.h"
|
||||
#include "machine/i8251.h"
|
||||
@ -40,6 +39,8 @@
|
||||
#include "machine/wd_fdc.h"
|
||||
#include "sound/spkrdev.h"
|
||||
|
||||
#include "formats/ms0515_dsk.h"
|
||||
|
||||
#include "emupal.h"
|
||||
#include "screen.h"
|
||||
#include "speaker.h"
|
||||
@ -59,6 +60,8 @@
|
||||
#define LOGSYSREG(format, ...) LOGMASKED(LOG_SYSREG, "%11.6f at %s: " format, machine().time().as_double(), machine().describe_context(), __VA_ARGS__)
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
class ms0515_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -617,6 +620,9 @@ ROM_START( ms0515 )
|
||||
ROMX_LOAD( "0515h.rf4", 0xc001, 0x2000, CRC(e3ff6da9) SHA1(3febccf40abc2e3ca7db3f6f3884be117722dd8b), ROM_SKIP(1) | ROM_BIOS(1))
|
||||
ROM_END
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
/* Driver */
|
||||
|
||||
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
|
||||
|
@ -33,13 +33,10 @@
|
||||
#include "emu.h"
|
||||
|
||||
#include "bus/rs232/rs232.h"
|
||||
|
||||
#include "cpu/i8085/i8085.h"
|
||||
|
||||
#include "imagedev/bitbngr.h"
|
||||
#include "machine/clock.h"
|
||||
#include "machine/bankdev.h"
|
||||
#include "machine/i8255.h"
|
||||
|
||||
#include "video/dl1416.h"
|
||||
|
||||
#include "softlist_dev.h"
|
||||
@ -59,9 +56,9 @@ public:
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_buttons(*this, "BUTTONS")
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_bank(*this, "bank")
|
||||
, m_digits(*this, "digit%u", 0U)
|
||||
, m_leds(*this, "p%c%u", unsigned('a'), 0U)
|
||||
, m_bootstrap(*this, "bootstrap")
|
||||
, m_rxd(true)
|
||||
{
|
||||
}
|
||||
@ -71,6 +68,9 @@ public:
|
||||
DECLARE_INPUT_CHANGED_MEMBER(update_buttons);
|
||||
|
||||
protected:
|
||||
void sitcom_mem(address_map &map);
|
||||
void sitcom_io(address_map &map);
|
||||
|
||||
template <unsigned D> void update_ds(offs_t offset, uint16_t data) { m_digits[(D << 2) | offset] = data; }
|
||||
DECLARE_WRITE_LINE_MEMBER(update_rxd) { m_rxd = bool(state); }
|
||||
DECLARE_READ_LINE_MEMBER(sid_line) { return m_rxd ? 1 : 0; }
|
||||
@ -78,18 +78,19 @@ protected:
|
||||
virtual void update_ppi_pa(uint8_t data);
|
||||
virtual void update_ppi_pb(uint8_t data);
|
||||
|
||||
void sitcom_bank(address_map &map);
|
||||
void sitcom_io(address_map &map);
|
||||
void sitcom_mem(address_map &map);
|
||||
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
static void sitcom_null_modem(device_t *device)
|
||||
{
|
||||
device->subdevice<bitbanger_device>("stream")->set_interface("rs232");
|
||||
}
|
||||
|
||||
required_ioport m_buttons;
|
||||
required_device<i8085a_cpu_device> m_maincpu;
|
||||
required_device<address_map_bank_device> m_bank;
|
||||
output_finder<15> m_digits;
|
||||
output_finder<2, 8> m_leds;
|
||||
memory_view m_bootstrap;
|
||||
|
||||
bool m_rxd;
|
||||
};
|
||||
@ -109,6 +110,7 @@ public:
|
||||
, m_ppi(*this, "ppi")
|
||||
, m_ds2(*this, "ds2")
|
||||
, m_test_led(*this, "test_led")
|
||||
, m_dac(*this, "dac")
|
||||
, m_shutter_timer(nullptr)
|
||||
, m_shutter(false)
|
||||
, m_dac_cs(true)
|
||||
@ -137,6 +139,7 @@ protected:
|
||||
required_device<i8255_device> m_ppi;
|
||||
required_device<dl1414_device> m_ds2;
|
||||
output_finder<> m_test_led;
|
||||
output_finder<> m_dac;
|
||||
emu_timer *m_shutter_timer;
|
||||
|
||||
bool m_shutter;
|
||||
@ -144,18 +147,12 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
void sitcom_state::sitcom_bank(address_map &map)
|
||||
{
|
||||
map.unmap_value_high();
|
||||
map(0x0000, 0x07ff).rom().region("bootstrap", 0);
|
||||
map(0x8000, 0xffff).ram().share("ram");
|
||||
}
|
||||
|
||||
void sitcom_state::sitcom_mem(address_map &map)
|
||||
{
|
||||
map.unmap_value_high();
|
||||
map(0x0000, 0x7fff).m(m_bank, FUNC(address_map_bank_device::amap8));
|
||||
map(0x8000, 0xffff).ram().share("ram");
|
||||
map(0x0000, 0x7fff).mirror(0x8000).ram();
|
||||
map(0x0000, 0x7fff).view(m_bootstrap);
|
||||
m_bootstrap[0](0x0000, 0x7fff).unmapw().rom().region("bootstrap", 0);
|
||||
}
|
||||
|
||||
void sitcom_state::sitcom_io(address_map &map)
|
||||
@ -222,7 +219,7 @@ void sitcom_state::machine_start()
|
||||
|
||||
void sitcom_state::machine_reset()
|
||||
{
|
||||
m_bank->set_bank(0);
|
||||
m_bootstrap.select(0);
|
||||
}
|
||||
|
||||
void sitcom_state::update_ppi_pa(uint8_t data)
|
||||
@ -245,9 +242,9 @@ INPUT_CHANGED_MEMBER( sitcom_state::update_buttons )
|
||||
m_maincpu->set_input_line(INPUT_LINE_RESET, (boot || reset) ? ASSERT_LINE : CLEAR_LINE);
|
||||
|
||||
if (boot)
|
||||
m_bank->set_bank(0);
|
||||
m_bootstrap.select(0);
|
||||
else if (reset)
|
||||
m_bank->set_bank(1);
|
||||
m_bootstrap.disable();
|
||||
}
|
||||
|
||||
|
||||
@ -319,6 +316,7 @@ void sitcom_timer_state::machine_start()
|
||||
sitcom_state::machine_start();
|
||||
|
||||
m_test_led.resolve();
|
||||
m_dac.resolve();
|
||||
|
||||
m_shutter_timer = timer_alloc(TIMER_SHUTTER);
|
||||
|
||||
@ -339,6 +337,7 @@ void sitcom_timer_state::machine_reset()
|
||||
void sitcom_timer_state::update_dac(uint8_t value)
|
||||
{
|
||||
// supposed to be a DAC and an analog meter, but that's hard to do with internal layouts
|
||||
m_dac = value;
|
||||
constexpr u8 s_7seg[10] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f };
|
||||
m_digits[12] = s_7seg[value % 10];
|
||||
value /= 10;
|
||||
@ -357,8 +356,6 @@ void sitcom_state::sitcom(machine_config &config)
|
||||
m_maincpu->in_sid_func().set(FUNC(sitcom_state::sid_line));
|
||||
m_maincpu->out_sod_func().set_output("sod_led");
|
||||
|
||||
ADDRESS_MAP_BANK(config, "bank").set_map(&sitcom_state::sitcom_bank).set_options(ENDIANNESS_LITTLE, 8, 16, 0x8000);
|
||||
|
||||
CLOCK(config, "100hz", 100).signal_handler().set_inputline("maincpu", I8085_RST75_LINE);
|
||||
|
||||
i8255_device &ppi(I8255(config, "ppi"));
|
||||
@ -373,6 +370,7 @@ void sitcom_state::sitcom(machine_config &config)
|
||||
// host interface
|
||||
rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "null_modem"));
|
||||
rs232.rxd_handler().set(FUNC(sitcom_state::update_rxd));
|
||||
rs232.set_option_machine_config("null_modem", sitcom_null_modem);
|
||||
|
||||
SOFTWARE_LIST(config, "bitb_list").set_original("sitcom");
|
||||
config.set_default_layout(layout_sitcom);
|
||||
|
@ -38,16 +38,16 @@
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "machine/genpc.h"
|
||||
#include "machine/tosh1000_bram.h"
|
||||
|
||||
#include "bus/isa/isa_cards.h"
|
||||
#include "bus/pc_kbd/keyboards.h"
|
||||
#include "bus/pc_kbd/pc_kbdc.h"
|
||||
#include "cpu/i86/i86.h"
|
||||
#include "machine/bankdev.h"
|
||||
#include "machine/genpc.h"
|
||||
#include "machine/ram.h"
|
||||
#include "machine/rp5c01.h"
|
||||
#include "machine/tosh1000_bram.h"
|
||||
|
||||
#include "softlist.h"
|
||||
|
||||
|
@ -1,101 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Sergey Svishchev
|
||||
/*****************************************************************************
|
||||
*
|
||||
* includes/mc1502.h
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef MAME_INCLUDES_MC1502_H
|
||||
#define MAME_INCLUDES_MC1502_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "imagedev/cassette.h"
|
||||
#include "machine/i8251.h"
|
||||
#include "machine/i8255.h"
|
||||
#include "machine/pic8259.h"
|
||||
#include "machine/pit8253.h"
|
||||
#include "machine/ram.h"
|
||||
#include "sound/spkrdev.h"
|
||||
|
||||
#include "bus/centronics/ctronics.h"
|
||||
#include "bus/isa/isa.h"
|
||||
#include "bus/isa/xsu_cards.h"
|
||||
#include "bus/isa/mc1502_fdc.h"
|
||||
|
||||
|
||||
class mc1502_state : public driver_device
|
||||
{
|
||||
public:
|
||||
mc1502_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_upd8251(*this, "upd8251")
|
||||
, m_pic8259(*this, "pic8259")
|
||||
, m_pit8253(*this, "pit8253")
|
||||
, m_ppi8255n1(*this, "ppi8255n1")
|
||||
, m_ppi8255n2(*this, "ppi8255n2")
|
||||
, m_isabus(*this, "isa")
|
||||
, m_speaker(*this, "speaker")
|
||||
, m_cassette(*this, "cassette")
|
||||
, m_centronics(*this, "centronics")
|
||||
, m_ram(*this, RAM_TAG)
|
||||
, m_kbdio(*this, "Y%u", 1)
|
||||
{ }
|
||||
|
||||
void mc1502(machine_config &config);
|
||||
|
||||
void init_mc1502();
|
||||
|
||||
void fdc_config(device_t *device);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
private:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<i8251_device> m_upd8251;
|
||||
required_device<pic8259_device> m_pic8259;
|
||||
required_device<pit8253_device> m_pit8253;
|
||||
required_device<i8255_device> m_ppi8255n1;
|
||||
required_device<i8255_device> m_ppi8255n2;
|
||||
required_device<isa8_device> m_isabus;
|
||||
required_device<speaker_sound_device> m_speaker;
|
||||
required_device<cassette_image_device> m_cassette;
|
||||
required_device<centronics_device> m_centronics;
|
||||
required_device<ram_device> m_ram;
|
||||
required_ioport_array<12> m_kbdio;
|
||||
|
||||
TIMER_CALLBACK_MEMBER(keyb_signal_callback);
|
||||
|
||||
struct {
|
||||
uint8_t pulsing;
|
||||
uint16_t mask; /* input lines */
|
||||
emu_timer *keyb_signal_timer;
|
||||
} m_kbd;
|
||||
|
||||
uint8_t m_ppi_portb;
|
||||
uint8_t m_ppi_portc;
|
||||
uint8_t m_spkrdata;
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(mc1502_pit8253_out1_changed);
|
||||
DECLARE_WRITE_LINE_MEMBER(mc1502_pit8253_out2_changed);
|
||||
DECLARE_WRITE_LINE_MEMBER(mc1502_speaker_set_spkrdata);
|
||||
DECLARE_WRITE_LINE_MEMBER(mc1502_i8251_syndet);
|
||||
|
||||
void mc1502_ppi_portb_w(uint8_t data);
|
||||
void mc1502_ppi_portc_w(uint8_t data);
|
||||
uint8_t mc1502_ppi_portc_r();
|
||||
uint8_t mc1502_kppi_porta_r();
|
||||
void mc1502_kppi_portb_w(uint8_t data);
|
||||
void mc1502_kppi_portc_w(uint8_t data);
|
||||
|
||||
void mc1502_io(address_map &map);
|
||||
void mc1502_map(address_map &map);
|
||||
|
||||
int m_pit_out2;
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_MC1502_H
|
@ -41,10 +41,10 @@ Basic display of LEDs for the SITCOM85
|
||||
<view name="Default Layout">
|
||||
<!-- Black background -->
|
||||
<element ref="background">
|
||||
<bounds left="34" top="60" right="341" bottom="160" />
|
||||
<bounds left="34" top="60" right="341" bottom="140" />
|
||||
</element>
|
||||
<element name="sod_led" ref="a_led">
|
||||
<bounds left="46" top="90" right="56" bottom="100" />
|
||||
<bounds x="46" y="80" width="10" height="10" />
|
||||
</element>
|
||||
|
||||
<!-- DL1414 left/right -->
|
||||
@ -55,7 +55,7 @@ Basic display of LEDs for the SITCOM85
|
||||
<param name="digitno" start="~moduleno~" increment="-1" />
|
||||
<param name="digitx" start="~modulex~" increment="34" />
|
||||
<element name="digit~digitno~" ref="a_digit">
|
||||
<bounds x="~digitx~" y="70" width="25" height="50" />
|
||||
<bounds x="~digitx~" y="70" width="25" height="30" />
|
||||
</element>
|
||||
</repeat>
|
||||
</repeat>
|
||||
@ -65,10 +65,10 @@ Basic display of LEDs for the SITCOM85
|
||||
<param name="bx" start="65" increment="15" />
|
||||
<param name="ax" start="185" increment="15" />
|
||||
<element name="pb~ledno~" ref="b_led">
|
||||
<bounds x="~bx~" y="140" width="10" height="10" />
|
||||
<bounds x="~bx~" y="120" width="10" height="10" />
|
||||
</element>
|
||||
<element name="pa~ledno~" ref="b_led">
|
||||
<bounds x="~ax~" y="140" width="10" height="10" />
|
||||
<bounds x="~ax~" y="120" width="10" height="10" />
|
||||
</element>
|
||||
</repeat>
|
||||
</view>
|
||||
|
@ -37,78 +37,65 @@ Basic display of LEDs for the SITCOM85
|
||||
</led7seg>
|
||||
</element>
|
||||
|
||||
<element name="background">
|
||||
<rect>
|
||||
<bounds left="0" top="0" right="1" bottom="1" />
|
||||
<color red="0.0" green="0.0" blue="0.0" />
|
||||
</rect>
|
||||
<element name="rect">
|
||||
<rect />
|
||||
</element>
|
||||
|
||||
<view name="Default Layout">
|
||||
<!-- Black background -->
|
||||
<element ref="background">
|
||||
<bounds left="34" top="60" right="341" bottom="200" />
|
||||
<element ref="rect">
|
||||
<bounds left="34" top="60" right="341" bottom="170" />
|
||||
<color red="0.0" green="0.0" blue="0.0" />
|
||||
</element>
|
||||
|
||||
<element name="sod_led" ref="a_led">
|
||||
<bounds left="46" top="90" right="56" bottom="100" />
|
||||
<bounds x="46" y="80" width="10" height="10" />
|
||||
</element>
|
||||
|
||||
<element name="test_led" ref="b_led">
|
||||
<bounds left="46" top="160" right="56" bottom="170" />
|
||||
<bounds x="46" y="130" width="10" height="10" />
|
||||
</element>
|
||||
|
||||
<!-- DL1414 left -->
|
||||
<element name="digit3" ref="a_digit">
|
||||
<bounds left="65" top="70" right="90" bottom="120" />
|
||||
</element>
|
||||
<element name="digit2" ref="a_digit">
|
||||
<bounds left="99" top="70" right="124" bottom="120" />
|
||||
</element>
|
||||
<element name="digit1" ref="a_digit">
|
||||
<bounds left="133" top="70" right="158" bottom="120" />
|
||||
</element>
|
||||
<element name="digit0" ref="a_digit">
|
||||
<bounds left="167" top="70" right="192" bottom="120" />
|
||||
</element>
|
||||
|
||||
<!-- DL1414 right -->
|
||||
<element name="digit7" ref="a_digit">
|
||||
<bounds left="204" top="70" right="229" bottom="120" />
|
||||
</element>
|
||||
<element name="digit6" ref="a_digit">
|
||||
<bounds left="238" top="70" right="263" bottom="120" />
|
||||
</element>
|
||||
<element name="digit5" ref="a_digit">
|
||||
<bounds left="272" top="70" right="297" bottom="120" />
|
||||
</element>
|
||||
<element name="digit4" ref="a_digit">
|
||||
<bounds left="306" top="70" right="331" bottom="120" />
|
||||
</element>
|
||||
<!-- DL1414 left/right -->
|
||||
<repeat count="2">
|
||||
<param name="moduleno" start="3" increment="4" />
|
||||
<param name="modulex" start="65" increment="139" />
|
||||
<repeat count="4">
|
||||
<param name="digitno" start="~moduleno~" increment="-1" />
|
||||
<param name="digitx" start="~modulex~" increment="34" />
|
||||
<element name="digit~digitno~" ref="a_digit">
|
||||
<bounds x="~digitx~" y="70" width="25" height="30" />
|
||||
</element>
|
||||
</repeat>
|
||||
</repeat>
|
||||
|
||||
<!-- DL1414 remote -->
|
||||
<element name="digit11" ref="a_digit">
|
||||
<bounds left="65" top="140" right="90" bottom="190" />
|
||||
</element>
|
||||
<element name="digit10" ref="a_digit">
|
||||
<bounds left="99" top="140" right="124" bottom="190" />
|
||||
</element>
|
||||
<element name="digit9" ref="a_digit">
|
||||
<bounds left="133" top="140" right="158" bottom="190" />
|
||||
</element>
|
||||
<element name="digit8" ref="a_digit">
|
||||
<bounds left="167" top="140" right="192" bottom="190" />
|
||||
</element>
|
||||
<repeat count="4">
|
||||
<param name="digitno" start="11" increment="-1" />
|
||||
<param name="digitx" start="65" increment="34" />
|
||||
<element name="digit~digitno~" ref="a_digit">
|
||||
<bounds x="~digitx~" y="120" width="25" height="30" />
|
||||
</element>
|
||||
</repeat>
|
||||
|
||||
<!-- meter -->
|
||||
<element name="digit14" ref="b_digit">
|
||||
<bounds left="238" top="140" right="263" bottom="190" />
|
||||
<bounds x="248" y="120" width="20" height="30" />
|
||||
</element>
|
||||
<element name="digit13" ref="b_digit">
|
||||
<bounds left="272" top="140" right="297" bottom="190" />
|
||||
<bounds x="277" y="120" width="20" height="30" />
|
||||
</element>
|
||||
<element name="digit12" ref="b_digit">
|
||||
<bounds left="306" top="140" right="331" bottom="190" />
|
||||
<bounds x="306" y="120" width="20" height="30" />
|
||||
</element>
|
||||
<element ref="rect">
|
||||
<bounds x="248" y="156" width="78" height="4" />
|
||||
<color red="0.12549" green="0.0" blue="0.0" />
|
||||
</element>
|
||||
<element name="dac" ref="rect">
|
||||
<bounds state="0" x="248" y="156" width="1" height="4" />
|
||||
<bounds state="255" x="248" y="156" width="78" height="4" />
|
||||
<color red="1.0" green="0.0" blue="0.0" />
|
||||
</element>
|
||||
</view>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user