* Changed emu_fatalerror to use util::string_format semantics
* Fixed some incorrectly marked up stuff in build scripts
* Make internal layout compression type a scoped enum (only zlib is supported still, but at least the values aren't magic numbers now)
* Fixed memory leaks in Xbox USB
* There can only be one "perfect quantum" device - enforce that only the root machine can set it, as allowing subdevices to will cause weird issues with slot cards overiding it
* Allow multiple devices to set maximum quantum and use the most restrictive one (it's maximum quantum, it would be minimum interleave)
* Got rid of device_slot_card_interface as it wasn't providing value
* Added a helper template to reduce certain kinds of boilerplate in slots/buses
* Cleaned up some particularly bad slot code (plenty more of that to do), and made some slots more idiomatic
This patch gets it running, and splits it into two front ends, one
being a rs232 bus slot so that is can be used as a terminal option. It
adds the MCM66750 character generator, and implements the MC6845 row
update function. Most of the I/O has been worked out with help from
the CT-82 user manual. The various screen formats and the graphics
modes appear to be working and plausible. Printer support has been
added, and a beeper.
- Removed code no longer used
- Add noexcept where appropriate
- split pparser.[c|h] into ppreprocessor and ptokenizer
- smaller optimizations, e.g. use of std::size_t
- fix lint warnings
fundamental change to show device delegates are configured.
Device delegates are now aware of the current device during
configuration and will resolve string tags relative to it. This means
that device delegates need a device to be supplied on construction so
they can find the machine configuration object. There's a
one-dimensional array helper to make it easier to construct arrays of
device delegates with the same owner. (I didn't make an n-dimensional
one because I didn't hit a use case, but it would be a simple addition.)
There's no more bind_relative_to member - just call resolve() like you
would for a devcb. There's also no need to cast nullptr when creating a
late bind device delegate. The flip side is that for an overloaded or
non-capturing lambda you'll need to cast to the desired type.
There is one less conditional branch in the hot path for calls for
delegates bound to a function pointer of member function pointer. This
comes at the cost of one additional unconditional branch in the hot
path for calls to delegates bound to functoids (lambdas, functions that
don't take an object reference, other callable objects). This applies
to all delegates, not just device delegates.
Address spaces will now print an error message if a late bind error is
encountered while installing a handler. This will give the range and
address range, hopefully making it easier to guess which memory map is
faulty.
For the simple case of allowing a device_delegate member to be
configured, use a member like this:
template <typename... T> void set_foo(T &&...args) { m_foo_cb.set(std::forward<T>(args)...); }
For a case where different delegates need to be used depending on the
function signature, see src/emu/screen.h (the screen update function
setters).
Device delegates now take a target specification and function pointer.
The target may be:
* Target omitted, implying the current device being configured. This
can only be used during configuration. It will work as long as the
current device is not removed/replaced.
* A tag string relative to the current device being configured. This
can only be used during configuration. It will not be callable until
.resolve() is called. It will work as long as the current device is
not removed/replaced.
* A device finder (required_device/optional_device). The delegate will
late bind to the current target of the device finder. It will not
be callable until .resolve() is called. It will work properly if the
target device is replaced, as long as the device finder's base object
isn't removed/replaced.
* A reference to an object. It will be callable immediately. It will
work as long as the target object is not removed/replaced.
The target types and restrictions are pretty similar to what you already
have on object finders and devcb, so it shouldn't cause any surprises.
Note that dereferencing a device finder will changes the effect. To
illustrate this:
...
required_device<some_device> m_dev;
...
m_dev(*this, "dev")
...
// will late bind to "dev" relative to *this
// will work if "dev" hasn't been created yet or is replaced later
// won't work if *this is removed/replaced
// won't be callable until resolve() is called
cb1.set(m_dev, FUNC(some_device::w));
...
// will bind to current target of m_dev
// will not work if m_dev is not resolved
// will not work if "dev" is replaced later
// will be callable immediately
cb2.set(*m_dev, FUNC(some_device::w));
...
The order of the target and name has been reversed for functoids
(lambdas and other callable objects). This allows the NAME macro to
be used on lambdas and functoids. For example:
foo.set_something(NAME([this] (u8 data) { m_something = data; }));
I realise the diagnostic messages get ugly if you use NAME on a large
lambda. You can still give a literal name, you just have to place it
after the lambda rather than before. This is uglier, but it's
intentional. I'm trying to drive developers away from a certain style.
While it's nice that you can put half the driver code in the memory map,
it detracts from readability. It's hard to visualise the memory range
mappings if the memory map functions are punctuated by large lambdas.
There's also slightly higher overhead for calling a delegate bound to a
functoid.
If the code is prettier for trivial lambdas but uglier for non-trivial
lambdas in address maps, it will hopefully steer people away from
putting non-trivial lambdas in memory maps.
There were some devices that were converted from using plain delegates
without adding bind_relative_to calls. I fixed some of them (e.g.
LaserDisc) but I probably missed some. These will likely crash on
unresolved delegate calls.
There are some devices that reset delegates at configuration complete or
start time, preventing them from being set up during configuration (e.g.
src/devices/video/ppu2c0x.cpp and src/devices/machine/68307.cpp). This
goes against the design principles of how device delegates should be
used, but I didn't change them because I don't trust myself to find all
the places they're used.
I've definitely broken some stuff with this (I know about asterix), so
report issues and bear with me until I get it all fixed.
* hp9825: optional ROM cartridges added (9825b only, ATM)
* hp9825: optional ROMs added to 9825t, added support for banked ROMs
@5c00, separated RAM & ROM spaces in 9825t
* hp9885: added missing post-amble when writing sectors on disk
* hp9825: added acknowledgments to comments (nw)
* hp9825: changes requested by V.Crabb (nw)
* Allow specifying NO_OPENGL manually
* Switch bgfx to OpenGL ES renderer if NO_X11 is specified
* Only link against EGL when NO_X11 is specified on linux, netbsd and openbsd
* Only switch bgfx to OpenGL ES on linux, netbsd and openbsd
* Indentation fix
* Add workaround for imgtool and jedutil failing vs2019 debug builds with /ZI
* No longer allow msvc build to fail
* Enable tools build for travis to make it more useful
* Switch travis to Xcode 11 in order to fix nltool linking failure
* Prefer 64-bit compiler with VS 2019 too
* Setting PreferredToolArchitecture to x64 is not needed, genie puts it into the project files for vs2015 or later
* OPTIMIZE=1 build is faster that OPTIMIZE=0 for some reason. So fast in fact, that TOOLS=1 can be enabled without hitting the 60 minute timeout
* Switch MINGW build to VS 2017 image until appveyor figure out why builds on VS 2019 are almost twice as slow
* Run pacman twice to account for core system upgrades
- solver now uses dynamic allocation on systems larger than 512x512
- fixed osx build
- moved nl_lists.h classes to plists.h
- fixed netlist makefile clint section
- readability and typos
- moved netlists out of driver code into audio/ or machine/ as
nl_xxx.cpp files.
- identified and documented extended validation
- updated arcade, mess and nl targets
* Sync with bgfx upstream revision b91d0b6
* Sync with bx upstream revision d60912b
* Sync with bimg upstream revision bd81f60
* Add astc-codec decoder
* Rename VertexDecl to VertexLayout
* Rename UniformType enum Int1 to Sampler.
* Add NVN stub
* Fix unused-const-variable error on macOS
* Drop redundant explicit language parameters
buildoptions_cpp are only applied to c++ files and buildoptions_objcpp are only
applied to objective c++ files. As such, hardcoding -x offers no benefit while
preventing overrides (such as one needed by 3rdparty/bgfx/src/renderer_vk.cpp on
macOS) from working.
* Re-introduce -x c++ in places where C code is compiled as C++ to prevent clang from throwing a warning
* Build bgfx as Objective-C++ on macOS
It is needed due to included headers
* Enable Direct3D12 and Vulkan bgfx rendering backends
* Enable building of spirv shaders
* Properly escape /c in cmd call
* Comment out dx12 bgfx renderer
* Honor VERBOSE setting during shaders build
* Only invert hlsl shader XYZ_TO_sRGB matrix for opengl
* Add spirv shaders
* OpenGL ES needs transposed matrix too
* Metal needs transposed matrix as well
* screen: validate crystal values used for set_raw
* driver: get rid of sound start/reset overrides in machine configuration
* vrender0.cpp, nexus3d.cpp: corrected pixel clock crystal value
* mw8080bw.cpp: turned several audio subsystems into devices
* bus/sat_ctrl: don't start subdevices in device_start - the machine does it for you
* mb14241.cpp: simplify handlers
* fgoal.cpp: updated for simplified handlers
* devfind, screen: repair some doxy comments that had rotted with refactoring
* doxygen: disable warnings for undocumented things - it's most of our codebase
* snowbros.cpp: restore an output level setting lost in MCFG removal
There's an outstanding validation error from the HP98543 DIO video card
not using a valid crystal value. Someone needs to find a picture of the
card and confirm or deny the existence of the 39.504MHz crystal.
The various start/reset overrides are bugs waiting to happen. It's not
immediately obvious that the ones run earlier can end up being called
multiple times if subsequent ones throw missing dependencies exceptions.
They're a relic of when everything from the old C-style drivers was
thrown into classes all jumbled together.
* Re-write makedep.py for better performance and better parsing front-end
* Make srcclean deal with kinds of preprocessor abuse I never want to see in real life
(nw) The new parser front-end is better at recognising C++ syntax and
also substantially faster - bootstrapping a single-driver build should
be noticeably quicker. Having a single parser for C++, .lst and .flt
files also gets us a bit closer to making it simpler to create custom
subtargets.
* subhuntr.cpp: S2636 PVI was seemingly uncommented by mistake in 93308b483e - offsets and sound routing seem to be copy/pasted from somewhere
* phi: prettier config
* scramble.cpp, wallc.cpp: avoid some calls to subdevice<...>(...)
* makedep.py: open source files as UTF-8 (GitHub #5482)
* minimaws: be less trusting
(nw) This has been a long time coming but it's here at last. It should
be easier now that logerror, popmessage and osd_printf_* behave like
string_format and stream_format. Remember the differences from printf:
* Any object with a stream out operator works with %s
* %d, %i, %o, %x, %X, etc. work out the size by magic
* No sign extending promotion to int for short/char
* No widening/narrowing conversions for characters/strings
* Same rules on all platforms, insulated from C runtime library
* No format warnings from compiler
* Assert in debug builds if number of arguments doesn't match format
(nw) Also removed a pile of redundant c_str and string_format, and some
workarounds for not being able to portably format 64-bit integers or
long long.
Motorola MC6802 evaluation kit. This emulator implements the Keypad and the
LED display, and the MEK68R2 CRT and parallel keyboard interface with support
from the D3BUG2 ROM, and the RS232 terminal support using the MEK68IO and with
support for this also included in the D3BUG2 ROM. Much of the monitor commands
appear to operate properly.
* MEK6809D4: new machine
Motorola MC6809 evaluation board. This emulation implements the keypad and LED
7 segment display, the RS-232 terminal interface, and the MEK68R2 MC6845 CRT
and parallel keyboard interface. The RAM and ROM banking is not yet
implemented but most of the D4BUG monitor commands are supported.
* MEK6802D5: new machine
Motorola MC6802 trainer board. This emulation implements the keypad
and LED 7 segment display, and the RS-232 terminal interface even
though there is no monitor support for it. All the D5BUG monitor
commands appear to be working.
This will compile, link, and run a driver all the way to the first info screen, provided you use -video bgfx.
However, although there's a valid NSWindow created, it never actually appears on screen for unknown (but likely silly) reasons.
Inputs are not implemented and fullscreen exists but is untried.
* hp9825: fixed a bug in 9825t
* hp9845: TACO driver re-written from scratch, DC100 tape separated into
a new device, various adaptations
* hp9845: "new TACO" renamed to just "TACO"
* Made some experimental work with menghong based HW, allowing crzyddz2 to boot and improving menghong colors;
* Internalize video and audio components inside the SoC;
* Wrote a preliminary UART subdevice;
* Made external video clock to be settable by the host driver;
* spectrum bus : rename beta.cpp to beta128.cpp as the original beta is somewhat different (nw)
* (nw)
* start making a device for the actual original beta disk interfaces (nw)
* flesh out beta stuff a bit (nw)
It appears that it is sufficient to include `-s USE_SDL_TTF=2`, and
emcc links in the SDL2_tff library, and it does not like attempts to
link this twice.
The current Emscripten release is not happy with the use of
"-s ERROR_ON_MISSING_LIBRARIES=0" as a link option, it gives an error
stating that all libraries must now be present, so remove that use.
This leaves a missing 'util' library. This did not appear to be
needed on the few builds I have tried, and this patch avoids adding
this library for asmjs.
* Improved encapsulation between video and machine SoC periperals;
* Split up HWs in individual files where they don't belong to Crystal System HW, makes future development easier;
* Untangled reads/writes to draw/display bankswitches from screen_update, now they can be unthrottled safely;
* Added CRTC screen raw parameters;
* Add DMA hold feature and clear irq on mask writes, specific for P's Attack;
* Improved Cross Puzzle flash loading, currently failing at POST for a SPU error;
nexus3d.cpp: add some preliminary work, currently does some VRender3d pipeline fill with a debug trick [Angelo Salese]
(out of whatsnew)
Some stuff definitely needs fine graining, like removing the few lines that are still necessary to configure the VRender0 from driver files, which I'm gonna do in my next feature branch.
Split out the floppy disk controller from the swtpc09 machine, adding it to
the ss50 interface. The DC5 is compatible with both the SWTPC 6800 and 6809
systems, supporting the 4 and 16 byte I/O interfaces respectively, via a
jumper setting, so can be used on the MAME swtpc and swtpc09 machines. The
DC5, like the DC4, supports double sided and density disks, and claimed
backward compatibility with the DC1, DC2 and DC3.
Split out the PIA IDE hard disk interface from the swtpc09 machine. This
support appears to have been incomplete or to have bit rotten, and has been
updated and tested lightly with FLEX9.
Credits: ClawGrip, Roberto Fresca, Recreativas.org,
Dumping Union, System11, Dirk Best
This is based on an MCS-51 core, like the MK3 bootleg. They are
clearly based on the same code, so the MK3 bootleg was moved to
this driver.
* Enable precompiled header usage in the Visual Studio compiler
But only for libraries emu frontend precompile dasm optional
Also add emu.h include to hpcdasm.cpp
* Include emu.h in some disassembler sources to use precompiled headers
* Remove debug message
The UniFLEX disk format is not compatible with the Flex format. Significantly it
does not use a mix of single density for booting on some double density disks
which makes it simpler - hardware required a new boot ROM to run UniFLEX.
Further, the UniFLEX sector size is 512 bytes versus 256 for Flex, and the
UniFLEX 'SIR' info sector record is completely different to the info on Flex
disk, and the file system format is also not at all compatible.
Thus the UniFlex format can rely largely on the WD17xx format, with an
overload to handle the sector numbering on the second side continuing from the
first side (one feature in common with the Flex format). This gives a quick
'save' capability and shares code.
Support for 8" disks is included as this was the initial distribution format
and the only one found so far.
* gdbstub: added new GDB stub debugger
This debugger can be used to connect to an external debugger that
communicates using the GDB Remote Serial Protocol, such as GDB itself
or many other GDB frontends.
Currently i386 (ct486), arm7 (gba), and ppc (pmac6100) are supported.
* gdbstub: enable GDB stub debugger in mac and windows builds
--------------
Mephisto [hap, Berger]
Mephisto II [hap, Berger]
Mephisto III [hap, Berger]
New working clone added
---------------
Mephisto Amsterdam (older) [Berger]
Mephisto London 16 Bit [Berger]
- Clean up notes, add TODO
- Use pulse_input_line for NMI
- Document coin lockout
- Document attribute RAM layout
- Background layer color is actually 3 bits
--------------------
Hektor III [Nigel Barnes, jltursan]
New machines marked as NOT_WORKING
----------------------------------
Hektor II [Nigel Barnes]
- Replace additional driver RAM with S-100 bus
- Convert Video Terminal Interface into a S-100 bus device
- Add skeleton S-100 bus device for SSSD disk controller
* There is no longer a concept of "layers" - there are only screens and elements.
* Elements are now instantiated with <element ref="...">
* Screens and elements can have explicit blending mode specified with blend="..."
* Default blending mode for screens is "add" and default for other elements is "alpha"
* Other supported modes are "none" and "multiply"
* This removes the options to enable/disable layers individually - use views instead
* Legacy layouts can still be loaded, and support won't be removed for at least a year
The current artwork model is over-stretched. It's based on a Space
Invaders cabinet model, and isn't applicable to a lot of the systems
MAME emulates now. The fact that MAME has to switch to an "alternate"
mode to deal with games like Golly! Ghost! without requiring pre-matted
bitmaps shows that the Space Invaders model wasn't even adequate for
general arcade use. It shows in that for a lot of the systems that
heavily depend on artwork, people just seem to randomly choose layers
for elements until they get something that works. Also, the fact that
MAME will switch to an alternate (Golly! Ghost!) mode depending on the
combination of elements is a trap for people learning to make artwork.
There are cases that the current approach of implying the blending mode
from the layer doesn't work with. Examples include LEDs behind
diffusers (requires additive blending for layout elements), and mutliple
stacked LCD panels (requires RGB multiplication for screens).
For configurability, it's now a lot easier to make multiple views using
groups. For example, if you want to make it possible to hide the
control panel section of your layout, you can put the control panel
elements in a group and create views with and without it.
I will gradually migrate the internal artwork to use the new approach.
I have an XSLT stylesheet that helps with this, but I'm not comfortable
adding it because it isn't a complete solution and it still requires
manul steps.
I wanted to get the re-worked pointer handling done sooner so I could
push them both at the same time, but unfortunately various things have
prevented me from progressing as quickly as I wanted to. Sorry guys,
that stuff's going to have to wait.