Commit Graph

84 Commits

Author SHA1 Message Date
Vas Crabb
74bfa27912 remove some MCFG macros that were barely used any more (nw) 2019-01-06 22:11:30 +11:00
Vas Crabb
c241943e67 seems to get bind errors in some cases without this (nw) 2018-12-29 08:36:03 +11:00
Vas Crabb
f1f0591f43 Start cleaning up palette configuration:
* Basically, initialisers go in the constructor arguments, and things for setting format go in set_format.
* Initialisation patterns can be specified with an enum discriminator or with a FUNC and optionally a tag.
* Formats can be specified with an enum discriminator or a size and function pointer.
* You must always supply the number of entries when setting the format.
* When initislising with a paletter initialisation member, you can specify the entries and indirecte entries together.
* The palette_device now has a standard constructor, so use .set_entries if you are specifying entry count with no format/initialisation.
* Also killed an overload on delegates that wasn't being useful.
2018-12-29 05:53:50 +11:00
David Haywood
ccded2bf8b Namco System 21 and other related refactors (#4013)
* namco checkpoint (including cam900 submission)

* move code into device (nw)

* start splitting DSP support code into devices (nw)

* fix crash (nw)

* prepare for further splitting (nw)

* move code for C67 based DSP PCB into it's own device (nw)

* survive F3 resets without crashing or breaking the 3D (nw)

* less magic numbers (nw)

* optional -> required
don't use fake bootstrap on older type, suspend CPU instead

* restore CPU yield hack for solvalou (nw)

* (nw)

* give galaxian3 some DSPs (nw)

* address hap's concern with a different workaround since MAME is awkward (nw)

* split namco21 driver into 3 drivers as the different configurations really are entirely different boardsets with similar components, not a real 'system'
emulated entire PCB set for driveyes ( http://www.tvspels-nostalgi.com/Bilder/PCB/Namco/driverseye_cage_inside.jpg ) although how the PCBs communicate is not yet known (C139 maybe, which might also be an MCU)

* remove empty file (nw)

* actually thinking about it, this is cleaner (nw)

* mark cybsledj as World instead, there's nothing about this set other than the CY1 code to indicate that it's a Japanese set, and I don't think the Namco codes represent region, just release order.

* newline (nw)

* newline (nw)
2018-09-21 15:01:12 -04:00
mooglyguy
b5ff656e9a -c1541, c1571, c2031, c1551, rastersp: Removed MCFG and MACHINE_CONFIG usage. [Ryan Holtz]
-model3: Some basic MACHINE_CONFIG cleanup, nw

-pla: Added PLS100 device, nw
2018-08-01 04:45:25 +02:00
AJR
a69902b460 Remove emupal.h from emu.h (nw) 2018-06-13 14:56:22 -04: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
b60c852f11 Set finder tag relative to current device being configured rather than
the finder's owner.  This meand you no longer need to care about the
your relationship to the object being configured and a lot of ^ and :
can disappear.  There's a bit reduction in string pasting in macros from
this.

Yes, I have to make this apply to devcb etc. as well, but that's a job
for another day.

There's probably at least one thing broken by this where optional
objects are involved.  Most things can be solved by just getting rid of
the now-problematic ^ and : prefixes.
2018-04-30 23:32:41 +10:00
AJR
3d3785864e emupal.h: Remove underscores from template parameter names (nw) 2018-04-13 14:13:55 -04:00
cam900
6924f3cdc1 gstream : Add precalculated RGB Palette for X2222 drawing gfxs, Cleanup duplicates (#3370)
* gstream : Convert bitmap into bitmap_ind16, Cleanup duplicates

* gstream.cpp : Fix compile

* gstream.cpp : Revert "convert bitmap into ind16", Add precalculated rgb data for X2222 draw gfxs

* gstream.cpp : Build fixes

* gstream.cpp : More build fixes

* gstream.cpp : Remove unneeded arguments of drawgfx_transpen_x2222
2018-03-24 08:39:17 -04:00
AJR
7ede8f952d Unbreak MCFG_PALETTE_INDIRECT_ENTRIES (nw) 2018-03-04 13:59:25 -05:00
wilbertpol
3b923d59cc destaticify initializations (nw) (#3289)
* destaticify initializations (nw)

* fix this->set_screen (nw)
2018-03-04 04:18:08 +11:00
Olivier Galibert
d0715c830d memory: Deambiguate handlers, also a hint of things to come (nw) 2018-01-19 08:23:19 +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
d18aa3e097 never hurts to srcclean (nw) 2017-07-09 03:21:32 +10:00
Bryan McPhail
1a3b2550fb Revert custom DECO conversion in emu dir 2017-06-28 10:16:18 -04:00
Bryan McPhail
dad7fca1f7 Add alternate revision of Cobra Command. Add correct palette weighting for all Dec8 games 2017-06-27 17:00:41 -04:00
Vas Crabb
96c9112785 general cleanup:
* move rarely-used output and pty interfaces out of emu.h
* consolidate and de-duplicate forward declarations, also remove some obsolete ones
* clean up more #include guard macros
* scope down a few more things

(nw) Everyone, please keep forward declarations for src/emu in src/emu/emufwd.h -
this will make it far easier to keep them in sync with declarations than having
them scattered through all the other files.
2017-05-23 15:01:11 +10:00
Dirk Best
12bc38285f emupal: Don't hardcode color PROM region name, add error handling 2017-05-21 23:21:15 +02:00
AJR
dfdd5be76c Disallow a negative number of palette entries by changing some types (nw) 2017-04-16 18:39:18 -04:00
AJR
8fe18e9ecc New device interface for palettes
- Create device_palette_interface, which takes over most functionality from palette_device except for the initialization/decoding routines and RAM interface.
- Update screen_device and device_gfx_interface to use a device_palette_interface object rather than a palette_device. This necessitates slight alterations to a few drivers and devices.
- Modify v9938 and v9958 to use the new device_palette_interface rather than a subdevice. This entails breaking a cyclic dependency between device_video_interface and screen_device for this case.
2017-04-06 11:30:40 +10:00
arbee
9c963f9b53 New games added as GAME_NOT_WORKING:
Pirate Ship [Phil Bennett, R. Belmont, (dump credits?)]
2017-04-01 16:53:24 -04:00
Vas Crabb
aa739563d1 Self-registering devices.
* MAME now walks all devices when generating -lx output irrespective of whether they're actually instantiated anywhere or not.
* -lx is at least 30% faster than previous implementation.
* Only possible drawback is that filtering drivers no longer filters devices.
2017-03-03 00:45:14 +11: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
Vas Crabb
8179a84458 Introduce u8/u16/u32/u64/s8/s16/s32/s64
* New abbreviated types are in osd and util namespaces, and also in global namespace for things that #include "emu.h"
* Get rid of import of cstdint types to global namespace (C99 does this anyway)
* Remove the cstdint types from everything in emu
* Get rid of U64/S64 macros
* Fix a bug in dps16 caused by incorrect use of macro
* Fix debugcon not checking for "do " prefix case-insensitively
* Fix a lot of messed up tabulation
* More constexpr
* Fix up many __names
2016-11-19 05:38:48 +11: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
AJR
a237f50680 More consistent use of integer types in tilemap_t and other graphics-related classes (nw)
- Define indirect_pen_t, requiring a slight reordering of emu.h due to an unsurprising dependency
2016-09-03 10:01:39 -04:00
AJR
1fe589ca1e Show color values in palette viewer
- On the UI graphics viewer's palette screen, moving the mouse over a color rectangle will show the index of the entry and its RGB values in hexadecimal.
- For indirect pens, the index of the corresponding color will also be shown.
- For colors in normal RAM-based palettes, the raw (i.e. undecoded) value stored in memory will also be shown. This does not currently work with most buffered palettes (though the Seibu SPI driver has been updated for this purpose), and is totally incompatible with PROM-based or RAMDAC-based palettes.

(nw) The changes made to the core while implementing this feature may look more substantial than they really are. A whole batch of read methods have been made const, and palette_device now has a generic read_entry function that is used both internally and externally.
2016-08-26 22:39:58 -04:00
Dirk Best
75e5db381b Add support to adjust the screen color
This is now used for monochrome screens instead of creating custom
palettes.
2016-03-12 02:36:28 +01:00
Miodrag Milanovic
4e8e3066f8 reverting:
SHA-1: 1f90ceab07

* tags are now strings (nw)
fix start project for custom builds in Visual Studio (nw)
2016-01-20 21:42:13 +01:00
Miodrag Milanovic
1f90ceab07 tags are now strings (nw)
fix start project for custom builds in Visual Studio (nw)
2016-01-16 14:54:42 +01:00
Miodrag Milanovic
91605d3f4d clang-modernize part 1 (nw) 2015-12-03 18:17:25 +01:00
Dirk Best
a320032368 move rgbi formats out of emupal.h 2015-08-12 19:21:37 +02:00
Dirk Best
b25a7af59f emupal: add support for the IIBBGGRR format, only apply intensity bit if
there is a color defined
2015-08-12 12:26:43 +02:00
Dirk Best
ef406a0889 micro3d: use standard palette device ram 2015-08-04 10:54:59 +02:00
Dirk Best
e7415c85a8 cmmb: remove palette trampoline 2015-08-02 23:57:36 +02:00
Dirk Best
4460ea60b3 liberate: use palette device for palette ram for prosport 2015-08-01 13:05:50 +02:00
Dirk Best
3882549d6a emupal: add support for inverted data palette ram and add more formats 2015-08-01 11:40:44 +02:00
Dirk Best
6f12e6cf06 Add the rest of the 3-bit palettes and add the possiblity to set
individual r/g/b levels for pens
2015-07-29 15:56:07 +02:00
Dirk Best
6187ca5ef0 Add a 3-bit BGR variant and use it for unkhorse 2015-07-27 13:37:54 +02:00
Dirk Best
b25e97668a Define a standard 3-bit RGB palette and use it for Monkey Magic 2015-07-27 11:15:44 +02:00
Olivier Galibert
278cf84e55 Replace dynamic_array with std::vector [O. Galibert] 2015-04-14 19:58:17 +02:00
mamehaze
d00d8db769 add supduck palette type to emupal.c and use that (nw) 2014-12-01 15:45:26 +00:00
Alex W. Jackson
5e412b19e8 emupal/tilemap refactoring: configure_tilemap_groups is now a tilemap_t method rather than a palette_device method (nw) 2014-06-22 09:46:37 +00:00
Alex W. Jackson
10e08f136a Added some more friendly macros to help define custom palette formats (nw) 2014-06-03 07:39:21 +00:00
Miodrag Milanovic
1006bdc76b New macro added for per driver defined palette formats (nw) 2014-06-03 06:46:06 +00:00
Alex W. Jackson
4bfc3aa3e8 emupal.c: Support palette RAM less than the full width of the data bus it's on,
without the need for per-driver trampolines. Started removing said trampolines.
[Alex Jackson]

(nw) This fixes generic_paletteram regressions in simpl156.c and tmnt.c.
Just a couple left now.
2014-05-06 05:20:51 +00:00
Miodrag Milanovic
410d406237 removed few not anymore used legacy macros (nw) 2014-04-30 07:05:38 +00:00
Alex W. Jackson
bd52970133 galpani3.c, highvdeo.c, igs_m027.c, majorpkr.c: fix generic_paletteram regressions (nw) 2014-04-30 04:23:12 +00:00
Alex W. Jackson
b112d3261d tnzs.c and related drivers: fix generic_paletteram regression (nw) 2014-04-24 17:51:40 +00:00