diff options
author | 2017-05-07 23:18:47 +1000 | |
---|---|---|
committer | 2017-05-14 21:44:11 +1000 | |
commit | 0f0d39ef81562c75e79176dd3bebb1e491ca39d5 (patch) | |
tree | 201cee7fdf55ee800f83859a92efd2cfe66cf2b3 /src/devices/video/hp1ll3.h | |
parent | e6c4be2b4d71c7a6c95be0bae111eb416ff0f9e7 (diff) |
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.
Diffstat (limited to 'src/devices/video/hp1ll3.h')
-rw-r--r-- | src/devices/video/hp1ll3.h | 104 |
1 files changed, 5 insertions, 99 deletions
diff --git a/src/devices/video/hp1ll3.h b/src/devices/video/hp1ll3.h index f95b8dcb32b..ab8b047a977 100644 --- a/src/devices/video/hp1ll3.h +++ b/src/devices/video/hp1ll3.h @@ -6,103 +6,11 @@ ***************************************************************************/ +#ifndef MAME_VIDEO_HP1LL3_H +#define MAME_VIDEO_HP1LL3_H #pragma once -#ifndef __HP1LL3_H__ -#define __HP1LL3_H__ - -///************************************************************************* -// MACROS / CONSTANTS -///************************************************************************* - -/* - * command types (send) - * - * 0 -- no data - * 1 -- write 1 word of data, then command - * 2 -- write 2 words of data, then command - * 3 -- write command, then 11 words of data (= CONF only?) - * 4 -- write 1 word of data, then command, then write X words of data, then write NOP - * - * (read) - * - * 3 -- ??? - * 4 -- write 1 word of data, then command, then read X words of data, then write NOP - */ -#define NOP 0 // type 0 -#define CONF 2 // type 3, configure GPU (screen size, timings...). 11 words of data. -#define DISVID 3 // type 0, disable video -#define ENVID 4 // type 0, enable video -#define WRMEM 7 // type 4, write GPU memory at offset, terminate by NOP -#define RDMEM 8 // type 4, read GPU memory from offset, terminate by NOP -#define WRSAD 9 // type 1, set screen area start address -#define WRORG 10 // type 1, set ??? -#define WRDAD 11 // type 1, set data area start address (16x16 area fill, sprite and cursor) -#define WRRR 12 // type 1, set replacement rule (rasterop) -#define MOVEP 13 // type 2, move pointer -#define IMOVEP 14 -#define DRAWP 15 // type 2, draw line -#define IDRAWP 16 -#define RDP 17 -#define WRUDL 18 // type 1, set user-defined line pattern (16-bit) -#define WRWINSIZ 19 // type 2, set ??? -#define WRWINORG 20 // type 2, set ??? -#define COPY 21 // type 2 -#define FILL 22 // type 1, fill area -#define FRAME 23 // type _, draw rectangle -#define SCROLUP 24 // type 2 -#define SCROLDN 25 // type 2 -#define SCROLLF 26 // type 2 -#define SCROLRT 27 // type 2 -#define RDWIN 28 // type 1 -#define WRWIN 29 // type 1 -#define RDWINPARM 30 -#define CR 31 -#define CRLFx 32 -#define LABEL 36 // type 1, draw text -#define ENSP 38 // type 0, enable sprite -#define DISSP 39 // type 0, disable sprite -#define MOVESP 40 // type 2, move sprite -#define IMOVESP 41 -#define RDSP 42 -#define DRAWPX 43 // type _, draw single pixel -#define WRFAD 44 // type 1, set font area start address -#define ENCURS 45 // type 0 -#define DISCURS 46 // type 0 -#define ID 63 - - -/* - * Replacement Rules (rops). sources: - * - * - NetBSD's diofbvar.h (definitions for Topcat chip) - * - pdf/hp/9000_300/specs/A-5958-4362-9_Series_300_Display_Color_Card_Theory_of_Operation_Oct85.pdf - * refers to TOPCAT documentation p/n A-1FH2-2001-7 (not online) - */ -#define RR_FORCE_ZERO 0x0 -#define RR_CLEAR RR_FORCE_ZERO -#define RR_AND 0x1 -#define RR_AND_NOT_OLD 0x2 -#define RR_NEW 0x3 -#define RR_COPY RR_NEW -#define RR_AND_NOT_NEW 0x4 -#define RR_OLD 0x5 -#define RR_XOR 0x6 -#define RR_OR 0x7 -#define RR_NOR 0x8 -#define RR_XNOR 0x9 -#define RR_NOT_OLD 0xa -#define RR_INVERT RR_NOT_OLD -#define RR_OR_NOT_OLD 0xb -#define RR_NOT_NEW 0xc -#define RR_COPYINVERTED RR_NOT_NEW -#define RR_OR_NOT_NEW 0xd -#define RR_NAND 0xe -#define RR_FORCE_ONE 0xf - -#define WS 16 // bits in a word - ///************************************************************************* // INTERFACE CONFIGURATION MACROS @@ -118,8 +26,7 @@ // ======================> hp1ll3_device -class hp1ll3_device : public device_t, - public device_video_interface +class hp1ll3_device : public device_t, public device_video_interface { public: // construction/destruction @@ -170,7 +77,6 @@ private: // device type definition -extern const device_type HP1LL3; - +DECLARE_DEVICE_TYPE(HP1LL3, hp1ll3_device) -#endif +#endif // MAME_VIDEO_HP1LL3_H |