diff options
author | Vas Crabb <vas@vastheman.com> | 2021-09-06 06:34:42 +1000 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2021-09-06 06:34:42 +1000 |
commit | 4f495994c41cd2fbaf89c08f755e828ae3261828 (patch) | |
tree | 8ea2c8522b807e394ea942460687b66e3ec7e381 /src/mame/includes | |
parent | 5e02ff231e2472e7e75a97b6e8758a070b227f8e (diff) |
-ui: Made zoom controls a bit more intuitive.
* The UI controls are described as zoom in/out, but they had the
opposite effect on the palette and tile viewers. That has been
changed to make them consistent with the tilemap viewer.
* Made the default zoom key not act as a toggle. People are familiar
with the function of Ctrl+0/=/- in web browsers, so making them behave
similarly in MAME should make it more approachable. Also added the
default zoom key to the relevant documentation page.
* Implemented the default zoom key for the palette and tile viewers.
* In the tilemap viewer, if the view is in default expand to fit mode,
zoom in/out starting from the actual zoom ratio. Once again, this
behaves more like the zoom controls in a web browser displaying an
image so it should be more intuitive.
* Made more messages from the tilemap viewer localisable.
-util/zippath.cpp: Fixed MT08074.
* There were multiple issues at play here. After #8443 was applied,
is_root was simply never returning true on Windows, as OSD_WINDOWS
isn't actually defined outside libosd and libocore. This caused
phantom parent items to appear in disk roots on Windows, but it meant
that the check in zippath_resolve would always fail so the trailing
backslash would be trimmed. Fixing the macro test in is_root meant
the trailing backslash from C:\ would no longer be trimmed, which
caused the stat in zippath_resolve to fail.
-bigbord2.cpp: Hooked up floppy DRQ that had somehow got lost.
-Reduced tag map lookups in several drivers and devices.
-util/coretmpl.h: Removed an overload of bitswap that can be avoided
using if constexpr.
-Added doxygen comments to some classes, and fixed several doxygen
warnings.
-util, osd: Test for _WIN32 rather than WIN32.
* In C++17 mode, WIN32 is no longer a predefined macro, although various
things in 3rdparty define it to maintain legacy support. We're better
off moving forward anyway for when WIN32 disappears entirely. (WIN32
is not a reserved name, while _WIN32 is, starting with an underscore
follwed by an uppercase letter.)
Diffstat (limited to 'src/mame/includes')
-rw-r--r-- | src/mame/includes/hng64.h | 94 | ||||
-rw-r--r-- | src/mame/includes/taxidriv.h | 89 |
2 files changed, 34 insertions, 149 deletions
diff --git a/src/mame/includes/hng64.h b/src/mame/includes/hng64.h index 13ed54c51a1..6d77879759b 100644 --- a/src/mame/includes/hng64.h +++ b/src/mame/includes/hng64.h @@ -5,38 +5,19 @@ #pragma once -#include "machine/msm6242.h" -#include "machine/timer.h" #include "cpu/mips/mips3.h" #include "cpu/nec/v5x.h" -#include "sound/l7a1045_l6028_dsp_a.h" -#include "video/poly.h" #include "cpu/tlcs870/tlcs870.h" #include "machine/mb8421.h" +#include "machine/msm6242.h" +#include "machine/timer.h" +#include "sound/l7a1045_l6028_dsp_a.h" +#include "video/poly.h" + #include "emupal.h" #include "screen.h" #include "tilemap.h" -enum hng64trans_t -{ - HNG64_TILEMAP_NORMAL = 1, - HNG64_TILEMAP_ADDITIVE, - HNG64_TILEMAP_ALPHA -}; - -struct blit_parameters -{ - bitmap_rgb32 * bitmap; - rectangle cliprect; - uint32_t tilemap_priority_code; - uint8_t mask; - uint8_t value; - uint8_t alpha; - hng64trans_t drawformat; -}; - -#define HNG64_MASTER_CLOCK 50000000 - ///////////////// /// 3d Engine /// @@ -141,14 +122,7 @@ class hng64_lamps_device : public device_t public: hng64_lamps_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - auto lamps0_out_cb() { return m_lamps_out_cb[0].bind(); } - auto lamps1_out_cb() { return m_lamps_out_cb[1].bind(); } - auto lamps2_out_cb() { return m_lamps_out_cb[2].bind(); } - auto lamps3_out_cb() { return m_lamps_out_cb[3].bind(); } - auto lamps4_out_cb() { return m_lamps_out_cb[4].bind(); } - auto lamps5_out_cb() { return m_lamps_out_cb[5].bind(); } - auto lamps6_out_cb() { return m_lamps_out_cb[6].bind(); } - auto lamps7_out_cb() { return m_lamps_out_cb[7].bind(); } + template <unsigned N> auto lamps_out_cb() { return m_lamps_out_cb[N].bind(); } void lamps_w(offs_t offset, uint8_t data) { m_lamps_out_cb[offset](data); } @@ -191,7 +165,6 @@ public: m_idt7133_dpram(*this, "com_ram"), m_gfxdecode(*this, "gfxdecode"), m_in(*this, "IN%u", 0U), - m_an_in(*this, "AN%u", 0U), m_samsho64_3d_hack(0), m_roadedge_3d_hack(0) { } @@ -214,17 +187,36 @@ public: required_device<palette_device> m_palette; private: + static constexpr int HNG64_MASTER_CLOCK = 50'000'000; + /* TODO: NOT measured! */ - const int PIXEL_CLOCK = (HNG64_MASTER_CLOCK*2)/4; // x 2 is due to the interlaced screen ... + static constexpr int PIXEL_CLOCK = (HNG64_MASTER_CLOCK*2)/4; // x 2 is due to the interlaced screen ... - const int HTOTAL = 0x200+0x100; - const int HBEND = 0; - const int HBSTART = 0x200; + static constexpr int HTOTAL = 0x200+0x100; + static constexpr int HBEND = 0; + static constexpr int HBSTART = 0x200; - const int VTOTAL = 264*2; - const int VBEND = 0; - const int VBSTART = 224*2; + static constexpr int VTOTAL = 264*2; + static constexpr int VBEND = 0; + static constexpr int VBSTART = 224*2; + enum hng64trans_t + { + HNG64_TILEMAP_NORMAL = 1, + HNG64_TILEMAP_ADDITIVE, + HNG64_TILEMAP_ALPHA + }; + + struct blit_parameters + { + bitmap_rgb32 * bitmap; + rectangle cliprect; + uint32_t tilemap_priority_code; + uint8_t mask; + uint8_t value; + uint8_t alpha; + hng64trans_t drawformat; + }; required_device<mips3_device> m_maincpu; required_device<v53a_device> m_audiocpu; @@ -257,17 +249,8 @@ private: required_device<gfxdecode_device> m_gfxdecode; required_ioport_array<8> m_in; - required_ioport_array<8> m_an_in; - - void hng64_default_lamps0_w(uint8_t data) { logerror("lamps0 %02x\n", data); } - void hng64_default_lamps1_w(uint8_t data) { logerror("lamps1 %02x\n", data); } - void hng64_default_lamps2_w(uint8_t data) { logerror("lamps2 %02x\n", data); } - void hng64_default_lamps3_w(uint8_t data) { logerror("lamps3 %02x\n", data); } - void hng64_default_lamps4_w(uint8_t data) { logerror("lamps4 %02x\n", data); } - void hng64_default_lamps5_w(uint8_t data) { logerror("lamps5 %02x\n", data); } - void hng64_default_lamps6_w(uint8_t data) { logerror("lamps6 %02x\n", data); } - void hng64_default_lamps7_w(uint8_t data) { logerror("lamps7 %02x\n", data); } + template <unsigned N> void hng64_default_lamps_w(uint8_t data) { logerror("lamps%u %02x\n", N, data); } void hng64_drive_lamps7_w(uint8_t data); void hng64_drive_lamps6_w(uint8_t data); @@ -405,16 +388,6 @@ private: // unknown access void ioport4_w(uint8_t data); - // analog input access - uint8_t anport0_r(); - uint8_t anport1_r(); - uint8_t anport2_r(); - uint8_t anport3_r(); - uint8_t anport4_r(); - uint8_t anport5_r(); - uint8_t anport6_r(); - uint8_t anport7_r(); - DECLARE_WRITE_LINE_MEMBER( sio0_w ); uint8_t m_port7; @@ -470,6 +443,7 @@ private: uint32_t startx, uint32_t starty, int incxx, int incxy, int incyx, int incyy, int wraparound, uint32_t flags, uint8_t priority, uint8_t priority_mask, hng64trans_t drawformat); + static void hng64_configure_blit_parameters(blit_parameters *blit, tilemap_t *tmap, bitmap_rgb32 &dest, const rectangle &cliprect, uint32_t flags, uint8_t priority, uint8_t priority_mask, hng64trans_t drawformat); diff --git a/src/mame/includes/taxidriv.h b/src/mame/includes/taxidriv.h deleted file mode 100644 index 9c7a2834396..00000000000 --- a/src/mame/includes/taxidriv.h +++ /dev/null @@ -1,89 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Nicola Salmoria -#ifndef MAME_INCLUDES_TAXIDRIV_H -#define MAME_INCLUDES_TAXIDRIV_H - -#pragma once - -#include "emupal.h" - -class taxidriv_state : public driver_device -{ -public: - taxidriv_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette"), - m_vram0(*this, "vram0"), - m_vram1(*this, "vram1"), - m_vram2(*this, "vram2"), - m_vram3(*this, "vram3"), - m_vram4(*this, "vram4"), - m_vram5(*this, "vram5"), - m_vram6(*this, "vram6"), - m_vram7(*this, "vram7"), - m_scroll(*this, "scroll") - { } - - void taxidriv(machine_config &config); - -protected: - virtual void machine_start() override; - -private: - required_device<cpu_device> m_maincpu; - required_device<gfxdecode_device> m_gfxdecode; - required_device<palette_device> m_palette; - - required_shared_ptr<uint8_t> m_vram0; - required_shared_ptr<uint8_t> m_vram1; - required_shared_ptr<uint8_t> m_vram2; - required_shared_ptr<uint8_t> m_vram3; - required_shared_ptr<uint8_t> m_vram4; - required_shared_ptr<uint8_t> m_vram5; - required_shared_ptr<uint8_t> m_vram6; - required_shared_ptr<uint8_t> m_vram7; - required_shared_ptr<uint8_t> m_scroll; - - int m_s1; - int m_s2; - int m_s3; - int m_s4; - int m_latchA; - int m_latchB; - int m_bghide; - int m_spritectrl[9]; - - void p2a_w(uint8_t data); - void p2b_w(uint8_t data); - void p2c_w(uint8_t data); - void p3a_w(uint8_t data); - void p3b_w(uint8_t data); - void p3c_w(uint8_t data); - void p4a_w(uint8_t data); - void p4b_w(uint8_t data); - void p4c_w(uint8_t data); - uint8_t p0a_r(); - uint8_t p0c_r(); - void p0b_w(uint8_t data); - void p0c_w(uint8_t data); - uint8_t p1b_r(); - uint8_t p1c_r(); - void p1a_w(uint8_t data); - void p1c_w(uint8_t data); - uint8_t p8910_0a_r(); - uint8_t p8910_1a_r(); - void p8910_0b_w(uint8_t data); - void spritectrl_w(offs_t offset, uint8_t data); - - void taxidriv_palette(palette_device &palette) const; - - uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void cpu2_map(address_map &map); - void cpu3_map(address_map &map); - void cpu3_port_map(address_map &map); - void main_map(address_map &map); -}; - -#endif // MAME_INCLUDES_TAXIDRIV_H |