path: root/src/mame/drivers/rainbow.cpp
Commit message (Collapse)AuthorAgeFilesLines
* video/upd7220.cpp: Made address space use word addressing, and implemented ↵ Brian Johnson2021-08-051-6/+6
| | | | proper ead/dad/mask support for draw_char. (#8379)
* floppies: Turn the format arrays into function calls. Create a default ↵ Olivier Galibert2021-03-021-7/+6
| | | | "mfm", "fm" and "pc" list of formats. Their contents, and which driver uses what, may need some tuning.
* sk.cpp and 315_5313 devices, actions_atj2279b, rainbow and silverball ↵ Ivan Vangelista2021-02-201-0/+1
| | | | drivers: ran srcclean and some grammar corrections for recenty merged PRs
* rainbow.cpp: Rainbow 100 A ROM added [bsdimp] (#7723) rfka012021-02-201-2/+10
* Enable GCC implicit fallthrough warning. Vas Crabb2020-11-151-1/+1
| | | | | | I've guessed whether break or [[fallthrough]] is appropriate. In cases where it looked particularly suspicious, I added a FIXME comment. All of these changes should be reviewed by someone familiar with the code.
* Numerous drivers: Modernization and runtime tag lookup elimination AJR2020-10-181-44/+43
| | | | | * Substitute output finders for output().set_value * Use more array finders, particularly for keyboard ports
* Cleaned up bitmap API. Vas Crabb2020-09-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>.
* validity.cpp: Limit characters allowed in I/O port tags, and check ROMs and ↵ Vas Crabb2020-08-271-10/+10
| | | | I/O ports for devices individually.
* drivers starting with t, u, v, w, x: more macro removal + some others (nw) Ivan Vangelista2020-06-041-4/+4
* drivers starting with p, q, r and s: some macro removal (nw) Ivan Vangelista2020-06-031-70/+70
* lots of files: simplified handlers (nw) Ivan Vangelista2020-05-141-4/+4
* devices/machine: simplified more handlers (nw) Ivan Vangelista2020-03-251-1/+1
* i8274, upd7201: Replace legacy device emulations and rename new devices AJR2020-02-231-8/+8
| | | | (nw) The victor9k change is confirmed from schematics: the RI lines are only linked to the VIA.
* srcclean (nw) Vas Crabb2019-12-211-2/+2
* rainbow: just add the skips for the floppy tests (nw) cracyc2019-12-101-17/+6
* Add locations to Rainbow 100A ROMs, and correct the character set ROM based ↵ Lord-Nightmare2019-12-101-5/+5
| | | | on a new dump. [Bitsavers]
* rainbow.cpp: add electronically dumped Rainbow A ROMs rfka012019-12-041-3/+3
* -rainbow: Separated Model A and Model B to coexist without needing an ↵ Ryan Holtz2019-11-071-282/+330
| | | | #ifdef. [Ryan Holtz]
* Make devdelegate more like devcb for configuration. This is a Vas Crabb2019-10-261-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* (nw) removed every remaining AM_ macro I could find in comments, but one in ↵ Ivan Vangelista2019-10-101-3/+3
| | | | emu\memarray.h cause I didn't want to cause a full recompile for this (nw)
* (nw) clean up code rot and cancer Vas Crabb2019-10-081-23/+23
| | | | | | | | | | I haven't tested the hh_sm510.cpp changes very well yet - I'll give it another review soon, and test it some more before the end of the month. I'm not sure about whether any of the B or BA handlers should be in the base config methods for G&W. I've left them there for some configurations that always have them, but I might rip them out of the common methods altogether. It's not like Tiger where all the games use them.
* 68000: Rework interrupt handling [O. Galibert] Olivier Galibert2019-04-051-2/+2
| | | | | | | * Implement the cpu space as an address space * Make all vectored interrupts use the cpu space * Make it possible to direct the cpu space to another space, use it for amiga (which handles it as a normal AS_PROGRAM read) * Make it possible to disable the priority muxer and get 3 lines instead, use it for cps2
* z80ctc, z80dart, z80sio: Simplify read/write handlers (nw) AJR2019-03-271-1/+1
* (nw) Clean up the mess on master Vas Crabb2019-03-261-73/+66
| | | | | | | | | | | | | This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. 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.
* Revert "conflict resolution (nw)" andreasnaive2019-03-251-66/+73
| | | | | This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
* bus/bbc/exp, bus/bbc/rom, ds1315, upd7002: Simplify read/write handlers (nw) AJR2019-03-141-9/+9
* (nw) sorry, take 2 Ivan Vangelista2019-02-251-30/+26
| | | | | screen.h: added constructor for SVG screens and removed a couple of macros (nw) mame\drivers: remove most MCFG and MACHINE_CONFIG macros from drivers starting with P, Q and R (nw)
* bus/wangpc, upd7220: Eliminate address_space arguments from handlers (nw) AJR2019-02-251-5/+2
* bus/newbrain, bus/tiki100, wd2010: Simplify read/write handlers (nw) AJR2019-02-191-14/+14
* (nw) clean up trivial stuff - the device delegate boilerplate is ugly, I ↵ Vas Crabb2019-02-191-1/+1
| | | | will address it ASAP
* some more MCFG macros removal (nw) Ivan Vangelista2019-02-081-1/+1
* com8116: Simplify read/write handlers (nw) AJR2019-02-021-2/+2
| | | | adm23: Add baud rate switches (nw)
* emu\softlist_dev: removed MCFG macros (nw) Ivan Vangelista2019-01-301-1/+1
* imagedev\floppy: removed MCFG macros (nw) Ivan Vangelista2019-01-281-6/+6
* srcclean and cleanup (nw) Vas Crabb2019-01-271-3/+3
* devices\machine\ticket, timer: removed MCFG macros (nw) Ivan Vangelista2019-01-211-1/+1
* [Rainbow-100]: document driver state (and remove bloat) (#4410) Bavarese2018-12-281-34/+26
| | | | | | | | | | | | | | | | | * [Rainbow-100]: document driver state (and remove bloat) Venix 86-R (plus Boston Softworks Extensions) working (tested yesterday), just follow Noted regressions in the PC subsystem (3.5 " DS DD images and 5.25 SSDD at slot 3 +4 ) after (?) April 2018. Can't fix these myself, though (effect: file content broken while directory listing seems OK; seek errors and 'write fault error reading from X' when copying). UCSD Forth and Pascal expects 4 identical QD drives, so definitions for PC-style drives in slot 3 and 4 were commented out. * [Rainbow-100]: fix regression introduced 2018-12-05 Incorrect polarity in routine: WRITE8_MEMBER(rainbow_state::diagnostic_w) [before]- m_SCREEN_BLANK = (data & 2) ? false : true; [0.2.05]+ m_screen_blank = BIT(data, 1); [now]: m_screen_blank = BIT(data, 1) ? false : true; See
* srcclean (nw) Vas Crabb2018-12-231-17/+17
* macOS compile fix and first pass at cancer removal from rainbow.cpp, nw mooglyguy2018-12-051-509/+497
* [Rainbow-100]: correct palette problems and silence log output (#4373) Bavarese2018-12-051-145/+154
| | | | | | | | | | | | | | | * Correct palette problems and silence log output Monitor autodetection avoids false colors [on a real machine, this would require rewiring]. Corrected palette problems (non-working flag). Also, video levels from DEC's documentation turned out too dark. Converted printf to logerror. * Old_palette removed * More fixes that slipped through (NW) * Update rainbow.cpp * Update rainbow.cpp
* src/mame: more misc MCFG removal (nw) Ivan Vangelista2018-12-041-2/+2
* Don't #include legacy header "flopdrv.h" except where it's still used (nw) AJR2018-11-251-1/+1
* src/mame/video: switched various devices to devcb3 and removed MCFG macros (nw) Ivan Vangelista2018-11-211-6/+5
* mc6845, upd7220: removed MCFG macros (nw) Ivan Vangelista2018-11-201-5/+6
* (nw) misc cleanup: Vas Crabb2018-11-041-3/+3
| | | | | | | | | | * tabify a JSON file (not currently handled by srcclean) * get rid of stray printf * µ'nSP in header comments - we do UTF-8 source * spg2xx.cpp: make room for LOG_GENERAL - it's defined as (1U << 0) if you don't give it a different value * spg2xx.h: inline on member function declarations generally doesn't do anything useful - it's implicit when the function body is inlined at declaration, and in other cases you usually want to put the inline qualifier on the definition, not the declaration * rainbow.cpp: revert mouse changes - there's no reason a Mouse Systems driver couldn't be loaded, and the Logitech mouse is Microsoft-compatible * video21.cpp: use deal/stand for blackjack control buttons now that we're not using deal for vblank
* srcclean and cleanup (nw) Vas Crabb2018-10-281-1/+1
* [Rainbow-100]: default to Microsoft Mouse Bavarese2018-10-241-11/+11
| | | | Default to Microsoft Mouse (sane for DEC Windows 1.03). Note that the older DEC Windows 1.0 uses another hard wired mouse model, possibly the DEC hockeypuck mouse (VSAxxx).
* [Rainbow-100]: write fault must not be set to 1 Bavarese2018-10-191-7/+6
| | | Write fault must not be set to 1 permanently (only in case of fatal write errors).
* rs232: some more MCFG removal (nw) Ivan Vangelista2018-10-191-15/+13
* Re-write serial mouse support: Vas Crabb2018-09-191-4/+5
| | | | | | | | | | | | | | | | | | | | | | * Separate Microsoft 2-button mouse and Logitech 3-button Microsoft-compatible mouse * Add Microsoft wheel mouse * Make Mouse Systems mouse behave more realistically * Add Mouse Systems "rotatable" mouse * Simplify code and eliminate timers (nw) X/Y translation and buttons works for all devices. The wheel on the wheel mouse seems to be transmitting the right data, and CuteMouse detects the wheel as being present, but no software seems to support it properly. Software supporting the Mouse Systems "rotatable" mouse is very rare - typically people just set the DIP switches on their M-1 for "non-rotatable" mode. A standard mouse driver will see the "rotatable" mouse moving two mickeys for each count, and move eratically on rotation. The "rotable" mouse is poorly tested due to lack of software. (nw) MAME doesn't have a proper input type for a mouse wheel, and it doesn't seem to be possible to map the host mouse wheel to an axis when configuring inputs. The default mapping ends up assigining the wheel or rotation to one of the translation axes, which is very unhelpful.