Commit Graph

60 Commits

Author SHA1 Message Date
goldnchild
c21bea828d
Adding bitmap_printer_device and convert epson_lx810 to use it. (#8863) 2022-01-07 15:07:58 -05:00
Vas Crabb
270276c4d3 -Enabled complex combinations for analog axes:
* Made it possible to add digital controls to axis settings as enables.
* Mix multiple analog controls assigned to an axis setting.
* Added a "reverse" modifier for analog controls (useful with mixing).
* Fixed an issue assigning mouse axes using multiple mouse-like devices
  with -nomultimouse.

-frontend: More cleanup:

* Got rid of some abuse of "special main menus".
* Added a helper class for auto-pause menus that don't spawn submenus.
* Got rid of the fake menu that schedules an exit on the first frame.
* Turned the confirm quit prompt into a menu, eliminated one more
  special-cased event loop.
* Fixed the confirm quit prompt resuming if you return to emulation if
  you weren't paused to begin with.

-bus/centronics: Fixed conflicting DIP locations, reversed order and
 inverted polarity for Epson printers.

* Also added the LX-810 (without L suffix) DIP switches for reference -
  we don't have a device for this printer yet.
2021-11-06 13:52:48 +11:00
goldnchild
694f040217
bus/centronics/epson_lx810l.cpp: Fixed carriage position readback after soft readback. (#8679) 2021-10-12 22:51:22 +11:00
goldnchild
fb0db04135
ap2000: hook up reset to Centronics init signal (#8363) 2021-08-09 10:26:46 -04:00
Aaron Giles
89dbabd04d
volt_reg: Remove uses that are not needed anymore with the recent (#7367)
DAC changes. Which is all of them. Remove the device as well.
2020-10-20 10:59:34 -04:00
Vas Crabb
a1d35e5abf Cleaned up bitmap API.
Made const-qualified pixel accessors (pix, pixt, raw_pixptr) return
const-qualified references/pointers to pixesl, and added non-const
versions.  This makes bitmap more like standard library containers where
const protects the content as well as the dimensions.

Made the templated pixt accessor protected - having it public makes it
too easy to inadvertently get a pointer to the wrong location.

Removed the pix(8|16|32|64) accessors from the specific bitmaps.  You
could only use the "correct" one anyway, and having the "incorrect" ones
available prevented explicit instantiations of the class template
because the static assertions would fail.  You can still see the pixel
type in the bitmap class names, and you can't assign the result of
&pix(y, x) to the wrong kind of pointer without a cast.

Added fill member functions to the specific bitmap template, and added
a explicit instantiations.  This allows the bitmap size check to be
skipped on most bitmap fills, although the clipping check is still
there.  Also fixed a couple of places that were trying to fill an
indexed 16-bit bitmap with rgb_t::black() exposed by this (replaced with
zero to get the same net effect).  The explicit template instantiations
in the .cpp file mean the compiler can inline the function if necessary,
but don't need to generate a local out-of-line body if it chooses not
to.

Extended the size of the fill value parameter in the base bitmap class
to 64 bits so it works correctly for 64-bit bitmaps.

Fixed places where IE15 and VGM visualiser weren't accounting for row
bytes potentially being larger than width.

Fixed an off-by-one in an HP-DIO card where it was treating the Topcat
cursor right edge as exclusive.

Updated everything to work with the API changes, reduced the scope of
many variables, added more const, and replaced a few fill/copy loops
with stuff from <algorithm>.
2020-09-27 14:00:42 +10:00
Vas Crabb
ce67d8e6b0 bus/centronics/epson_lx801l.cpp: cleaned up indentation, got rid of some preprocessor macros leaking from the header 2020-08-16 12:25:10 +10:00
goldnchild
fb81629f73
Ap2000 fixes to get it to start up properly; Also adding green ready led indicator to printhead box to see status. (#7079)
ap2000: Fixes to get it to start up properly
- Proper initialization NMI delay
- Make printhead display ready status
2020-08-15 15:22:17 -04:00
goldnchild
5dcef206e2
Some Ap2000 fixes and UPD7810 analog fixes (#7075)
* Upd7810 analog conversion fixes (conversion registers, scan mode)

* Epson Ap2000 fixes for controls (remap controls to keypad)
2020-08-14 21:00:21 -04:00
Vas Crabb
01661be41c srcclean and cleanup (nw) 2020-06-21 14:59:50 +10:00
Ivan Vangelista
57cf17dc52 finally retired the READ8/16/32/64 and WRITE8/16/32/64 macros (nw) 2020-06-18 20:13:33 +02:00
Ivan Vangelista
b6c5f7c9da another bunch of READ* / WRITE* macros removal (nw) 2020-05-20 18:13:10 +02:00
AJR
ea8913e128 src/devices: Replace output().set_value with output finders (nw) 2019-10-30 10:08:54 -04:00
AJR
211bda4a53 ioport: Change PORT_CHANGED_MEMBER param type from void * to u32 (nw) 2019-08-15 12:21:42 -04:00
Vas Crabb
97b6717027 (nw) Clean up the mess on master
This effectively reverts b380514764 and
c24473ddff, restoring the state at
598cd52272.

Before pushing, please check that what you're about to push is sane.
Check your local commit log and ensure there isn't anything out-of-place
before pushing to mainline.  When things like this happen, it wastes
everyone's time.  I really don't need this in a week when real work™ is
busting my balls and I'm behind where I want to be with preparing for
MAME release.
2019-03-26 11:13:37 +11:00
andreasnaive
b380514764 Revert "conflict resolution (nw)"
This reverts commit c24473ddff, reversing
changes made to 009cba4fb8.
2019-03-25 23:13:40 +01:00
hap
d85f8b5d0d volt_reg: set default m_output (nw) 2019-02-19 14:22:06 +01:00
mooglyguy
bee81e496a -epson_lx810l: Eliminated MACHINE_CONFIG_START, nw
-e0156, e05a30: Eliminated MCFG, nw
2018-08-25 14:27:33 +02:00
mooglyguy
f10c6be54f ds1315, ds1386, ds2404, ds75160a, ds75161a, eeprom, eepromser, eeprompar: Removed MCFG, nw 2018-08-23 18:34:21 +02:00
Vas Crabb
f18c7cd65f Allow per-device internal layouts and remove some more MCFG_ macros.
Input and screen tags are now resolved relative to a layout's owner
device.

Easy way to demonstrate is with: mame64 intlc440 -tty ie15

Previously you'd only get the IE15 terminal's layout and you'd be unable
to use the INTELLEC 4/40 front panel.  Now you'll get the choice of
layouts from both the system and the terminal device in video options.
2018-07-16 16:26:01 +10:00
Vas Crabb
68dc93b74c more cleanup and removal of mcfg (nw) 2018-07-15 02:51:13 +10:00
mooglyguy
0b156d2889 Separate reel and stepper devices to an extent, cleaned up use of custom mcfgs for them, nw 2018-06-08 19:27:56 +02:00
mooglyguy
b66e57a15c Removed nearly all custom MCFG macros from eepromser, migrated more of policetr to newer syntax, nw 2018-06-07 21:49:11 +02:00
Vas Crabb
93eaa6a494 as if millions of this pointers suddenly cried out in terror, and were suddenly silenced
* streamline templates in addrmap.h
* get rid of overloads on read/write member names - this will become even more important in the near future
2018-06-08 01:29:39 +10:00
AJR
0ba652e723 diexec: Interrupt API changes (nw)
- PULSE_LINE is no longer a value. Existing uses have been changed to pulse_input_line with attotime::zero as the second argument.
- Formerly only INPUT_LINE_NMI and INPUT_LINE_RESET were allowed with PULSE_LINE. INPUT_LINE_NMI no longer receives special handling; instead, CPU devices must specify which of their input lines are edge-triggered and thus may be used with zero-width pulses by overriding the execute_input_edge_triggered predicate. INPUT_LINE_RESET is still special-cased, however.
- execute_default_irq_vector now allows a different default vector to be specified for each input line. This added flexibility may or may not prove useful.
2018-05-18 13:40:29 -04:00
Vas Crabb
6c11b3ce01 dsp16: fix condition mask in disassembler (nw)
(nw) remove more MCFG macros and make speaker config more explicit
2018-05-09 19:26:44 +10:00
Vas Crabb
4ea3cd0bc1 Streamline machine configuration macros - everyone's a device edition.
Start replacing special device macros with additional constructors,
starting with ISA, INTELLEC 4 and RS-232 buses.

Allow an object finder to take on the target of another object finder.

(For a combination of the previous two things in action, see either the
INTELLEC 4 driver, or the Apple 2 PC Exporter card.  Also check out
looping over a device finder array to instantiate devices in some
places.  Lots of things no longer need to pass tags around.)

Start supplying default clocks for things that have a standard clock or
have all clocks internal.

Eliminate the separate DEV versions of the DEVCB_ macros.  Previously,
the plain versions were a shortcut for DEVICE_SELF as the target.  You
can now supply a string tag (relative to current device being
configured), an object finder (takes on the base and relative tag), or
a reference to a device/interface (only do this if you know the device
won't be replaced out from under it, but that's a safe assumption for
your subdevices).  In almost all cases, you can get the effect you want
by supplying *this as the target.

Eliminate sound and CPU versions of macros.  They serve no useful
purpose, provide no extra checks, make error messages longer, add
indirection, and mislead newbies into thinking there's a difference.

Remove a lot of now-unnecessary ":" prefixes binding things relative to
machine root.

Clean up some miscellaneous rot.

Examples of new functionality in use in (some more subtle than others):
* src/mame/drivers/intellec4.cpp
* src/mame/drivers/tranz330.cpp
* src/mame/drivers/osboren1.cpp
* src/mame/drivers/zorba.cpp
* src/mame/devices/smioc.cpp
* src/devices/bus/a2bus/pc_xporter.cpp
* src/devices/bus/isa/isa.h
* src/devices/bus/isa/isa.h
* src/devices/bus/intellec4/intellec4.h
2018-05-06 00:51:27 +10:00
Vas Crabb
32a73f450d Make MCFG_DEVICE_ADD and callable device types more flexible:
* Allows defaulted clocks (see subtle example with vboy)
* Allows additional constructors (see RS232 port in tranz330)
* Allows use of device finder in place of tag in MCFG_DEVICE_ADD
* Requires out-of-line destructor for devices using incomplete types
* Requires XTAL or explicit u32 for clocks for devices with private types

Devices must still define the standard constructor.  When writing
additional constructors, be aware that the constructor runs before
device_add_mconfig in the context of the existing device, not the new
device.  See osborne1, zorba, tranz330, and vboy for examples of this in
use.  Compilation is a bit slower, but this is temporary while
refactoring is in progress.

Eliminated the need for MCFG_SOUND_ROUTE_EX.

Removed macros from slot option configuration - they just obfuscated
code and slowed it down with needless dynamic casts, but didn't actually
simplify it.
2018-05-04 03:01:32 +10:00
Olivier Galibert
115bb9936c Address maps macros removal, pass 1 [O. Galibert] 2018-03-14 14:07:14 +01:00
AJR
c8e3aff4ce centronics/epson_lx810l.cpp: Remove first_screen (nw) 2018-03-08 13:52:38 -05:00
Olivier Galibert
c521964316 API change: Memory maps are now methods of the owner class [O. Galibert]
Also, a lot more freedom happened, that's going to be more visible
soon.
2018-02-12 10:04:52 +01:00
Olivier Galibert
03ba80e0ef xtal.h is dead, long live to xtal.cpp [O. Galibert] 2018-01-23 10:25:25 +01:00
Olivier Galibert
d469cc04bc API Change: Machine configs are now a method of the owner class, and the prototype is simplified [O. Galibert]
Beware, the device context does not follow in MCFG_FRAGMENT_ADD
anymore due to the prototype change.  So creating a device then
configuring through a fragment doesn't work as-is.  The simplest
solution is just to add a MCFG_DEVICE_MODIFY at the start of the
fragment with the correct tag.
2018-01-17 16:11:18 +01:00
Vas Crabb
ba5715596a This causes huge changes in behaviour that can't be hand-waved away.
Revert "Removal of voltage_regulator_device (nw)"

This reverts commit 1af133752a.

Revert "New way to provide DAC reference inputs (nw)"

This reverts commit 1c6a7ab40c.
2018-01-13 02:06:27 +11:00
AJR
1c6a7ab40c New way to provide DAC reference inputs (nw)
- Introduce MCFG_SOUND_REFERENCE_INPUT to provide fixed inputs through the resampler, eliminating the need for the "voltage regulator" device
- Replace memset use in sound.cpp with std::fill

This was my third implementation of this concept. The previous two involved attaching sound streams to the dummy device (which required giving it device_sound_interface and other modifications).
2018-01-10 02:11:14 -05:00
smf-
4b6e1f2a0c fix upd7801 & upd78c05 internal ram size & removed ram from memory maps. (nw)
Fixes fp1100 regression in:

SHA-1: 907115ed06

* create c-chip device with correct CPU type in it and a bunch of notes (pinout etc.)
create a uPD78C11 derived CPU type for this purpose, with internal ROM map
use internal ROM map for other uPD78C10 chips as it's always present.
add missing NO_DUMP definitions to various games using C-Chips with correct size etc.
pump megablast through the device code as really all it ever does is bank the c-chip window and test the RAM.
2017-07-12 10:11:25 +01:00
AJR
463dce64a0 Remove timer_set from src/devices/bus (nw) 2017-06-18 23:59:10 -04:00
Ivan Vangelista
f31b152080 device_add_mconfig up to devices/bus/h* (nw) 2017-06-08 17:20:12 +02:00
Vas Crabb
a6ee791664 Goodbye MACHINE_CONFIG_FRAGMENT, it was nice knowing you.
(nw) This is a pretty minimal change.  The point where the root device is added has been moved
from the MACHINE_CONFIG_START macro to the constructor of the machine configuration class (made
possible by giving drivers their own device types).  This isn't the final change in this area.
The root device is still being handled specially in that its configuration comes from the game
driver structure.  This needs to be harmonised with regular devices.  But that's a job for
another day.
2017-05-22 14:31:40 +10:00
Vas Crabb
0f0d39ef81 Move static data out of devices into the device types. This is a significant change, so please pay attention.
The core changes are:
* Short name, full name and source file are no longer members of device_t, they are part of the device type
* MACHINE_COFIG_START no longer needs a driver class
* MACHINE_CONFIG_DERIVED_CLASS is no longer necessary
* Specify the state class you want in the GAME/COMP/CONS line
* The compiler will work out the base class where the driver init member is declared
* There is one static device type object per driver rather than one per machine configuration

Use DECLARE_DEVICE_TYPE or DECLARE_DEVICE_TYPE_NS to declare device type.
* DECLARE_DEVICE_TYPE forward-declares teh device type and class, and declares extern object finders.
* DECLARE_DEVICE_TYPE_NS is for devices classes in namespaces - it doesn't forward-declare the device type.

Use  DEFINE_DEVICE_TYPE or DEFINE_DEVICE_TYPE_NS to define device types.
* These macros declare storage for the static data, and instantiate the device type and device finder templates.

The rest of the changes are mostly just moving stuff out of headers that shouldn't be there, renaming stuff for consistency, and scoping stuff down where appropriate.

Things I've actually messed with substantially:
* More descriptive names for a lot of devices
* Untangled the fantasy sound from the driver state, which necessitates breaking up sound/flip writes
* Changed DECO BSMT2000 ready callback into a device delegate
* Untangled Microprose 3D noise from driver state
* Used object finders for CoCo multipak, KC85 D002, and Irem sound subdevices
* Started to get TI-99 stuff out of the TI-990 directory and arrange bus devices properly
* Started to break out common parts of Samsung ARM SoC devices
* Turned some of FM, SID, SCSP DSP, EPIC12 and Voodoo cores into something resmbling C++
* Tried to make Z180 table allocation/setup a bit safer
* Converted generic keyboard/terminal to not use WRITE8 - space/offset aren't relevant
* Dynamically allocate generic terminal buffer so derived devices (e.g. teleprinter) can specify size
* Imporved encapsulation of Z80DART channels
* Refactored the SPC7110 bit table generator loop to make it more readable
* Added wrappers for SNES PPU operations so members can be made protected
* Factored out some boilerplate for YM chips with PSG
* toaplan2 gfx
* stic/intv resolution
* Video System video
* Out Run/Y-board sprite alignment
* GIC video hookup
* Amstrad CPC ROM box members
* IQ151 ROM cart region
* MSX cart IRQ callback resolution time
* SMS passthrough control devices starting subslots

I've smoke-tested several drivers, but I've probably missed something.  Things I've missed will likely blow up spectacularly with failure to bind errors and the like.  Let me know if there's more subtle breakage (could have happened in FM or Voodoo).

And can everyone please, please try to keep stuff clean.  In particular, please stop polluting the global namespace.  Keep things out of headers that don't need to be there, and use things that can be scoped down rather than macros.
It feels like an uphill battle trying to get this stuff under control while more of it's added.
2017-05-14 21:44:11 +10:00
smf-
4e24c4f2ba fix MSVC build (nw) 2017-02-28 10:53:03 +00:00
Vas Crabb
6c23897483 Self-registering devices prep:
* Make device_creator a variable template and get rid of the ampersands
* Remove screen.h and speaker.h from emu.h and add where necessary
* Centralise instantiations of screen and speaker finder templates
* Add/standardise #include guards in many hearers
* Remove many redundant #includes
* Order #includesr to help catch headers that can't be #included alone

(nw) This changes #include order to be prefix, unit header if applicable
then other stuff roughly in order from most dependent to least dependent
library.  This helps catch headers that don't #include things that they
use.
2017-02-27 22:57:14 +11:00
Olivier Galibert
a2557f1b02 Remove emu.h from headers (nw)
Per Vas' request.  If the compile fails for you (i'm thinking osx and
windows native debuggers here in particular), add '#include "emu.h"'
as first include of the cpp files that fail.

Due to our use of precompilation and forced inclusion, emu.h must be
included as the very first non-comment thing we do if we want to be
sure msvc compiles are identical to gcc/clang ones.  Doing it directly
instead of through an include increases the correctness probability by
a magnitude.
2017-02-11 18:31:20 +01:00
AJR
a4b3eafc7a upd7810: Replace fake I/O space with callbacks 2017-02-09 19:11:19 -05:00
Miodrag Milanovic
ddb290d5f6 NOTICE (TYPE NAME CONSOLIDATION)
Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8
also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
2016-10-22 13:13:17 +02:00
smf-
36944269bd DAC WIP, started documenting the DACs in use. [smf]
ataxx: Fixed missing sound channel caused by one dac not being hooked up and one dac being hooked up to two addresses.
bestbest: Fixed high pitch screech caused by incorrect addressing (two dacs weren't hooked up and two were hooked up to two addresses).
cchasm: Fixed static noise generation caused by feeding the same bit to both dacs.
cheekyms: Slightly improved sound by implementing sound triggers as 8 x 1 bit dacs instead of 1 x 8 bit dac.
galeb: Fixed sound by implementing it according to http://www.deltasoft.com.hr/retro/galebemu.htm & implemented enough of LOAD/SAVE to stop it hanging.
hard drivin: (all games in driver) Improved 12 bit controls, although centre still goes out of sync.
mea8000: Converted to a sound device.
megaphx: Fixed noisy samples due to wrong format.
microvsn: Fixed sound pitch caused by incorrect usage of write_signed8().
seicross: Changed to a 4 bit dac as samples are packed nibble.
spaceg: Preliminary sound using space invaders samples.
suna8: Changed to a 4 bit dac as samples are packed nibble.
vcombat: Fixed static during machine gun fire due to incorrect dc offset removal.
vectrex: Fixed noisy samples due to wrong format.
wheelfir: Fixed sound, eeprom & analogue steering wheel and brake pedal.
2016-10-17 16:04:02 +01:00
Nathan Woods
7f5e233933 Created a tiny_rom_entry structure for the purposes of rom_entry declarations in code, and a first pass at the required core changes
to unpack tiny_rom_entry structures at runtime.

WARNING - I've done preliminary testing on a tiny build (pacman works), but nothing more.  I know for a fact that a full compile fails
2016-08-06 08:54:37 -04:00
Ivan Vangelista
b7ec0d4fa8 epson_lx810l.cpp: fixed ROM_REGION type (nw) 2016-07-04 09:12:50 +02:00
Robbbert
11751e2d3c LX810, AP2000: Fixed memory problem. Still has an eeprom issue. 2016-07-02 15:36:47 +10:00
Miodrag Milanovic
3abcaee63f Cleanups and version bump 2016-02-24 07:46:57 +01:00