summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame
diff options
context:
space:
mode:
authorGravatarGravatar Ivan Vangelista <mesgnet@yahoo.it>2020-11-22 15:24:01 +0100
committerGravatarGravatar Ivan Vangelista <mesgnet@yahoo.it>2020-11-22 15:24:01 +0100
commit61971f7b26f90639db15539977c5cc64b0827942 (patch)
treeb9883c9a432fb7f50baa7c999f62ed910dfc4308 /src/mame
parent48f8ad3f1638a999a7ce7827cd5ac91d1b6f979b (diff)
cham24.cpp, famibox.cpp: fixed regression
Diffstat (limited to 'src/mame')
-rw-r--r--src/mame/drivers/cham24.cpp32
-rw-r--r--src/mame/drivers/famibox.cpp33
2 files changed, 33 insertions, 32 deletions
diff --git a/src/mame/drivers/cham24.cpp b/src/mame/drivers/cham24.cpp
index dcb1247683a..ccb92b387df 100644
--- a/src/mame/drivers/cham24.cpp
+++ b/src/mame/drivers/cham24.cpp
@@ -39,7 +39,7 @@ PCB Layout
|A |
| GW6582 LS02 |
| |-----------| 4040 |
-| 74HC245 |Phillps | 4040 |
+| 74HC245 |Philips | 4040 |
| |SAA71111AH2| |
| |20505650 | |
| |bP0219 | 24-3.U3 |
@@ -63,6 +63,8 @@ Notes:
#include "speaker.h"
+namespace {
+
class cham24_state : public driver_device
{
public:
@@ -71,6 +73,13 @@ public:
m_maincpu(*this, "maincpu"),
m_ppu(*this, "ppu") { }
+ void cham24(machine_config &config);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
+private:
required_device<n2a03_device> m_maincpu;
required_device<ppu2c0x_device> m_ppu;
@@ -87,12 +96,7 @@ public:
void cham24_IN0_w(uint8_t data);
uint8_t cham24_IN1_r();
void cham24_mapper_w(offs_t offset, uint8_t data);
- void init_cham24();
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
void cham24_set_mirroring( int mirroring );
- void cham24(machine_config &config);
void cham24_map(address_map &map);
void cham24_ppu_map(address_map &map);
};
@@ -234,6 +238,7 @@ void cham24_state::cham24_ppu_map(address_map &map)
{
map(0x0000, 0x1fff).bankr("bank1");
map(0x2000, 0x3eff).rw(FUNC(cham24_state::nt_r), FUNC(cham24_state::nt_w));
+ map(0x3f00, 0x3fff).rw(m_ppu, FUNC(ppu2c0x_device::palette_read), FUNC(ppu2c0x_device::palette_write));
}
static INPUT_PORTS_START( cham24 )
@@ -258,10 +263,6 @@ static INPUT_PORTS_START( cham24 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
INPUT_PORTS_END
-void cham24_state::video_start()
-{
-}
-
void cham24_state::machine_start()
{
@@ -285,14 +286,8 @@ void cham24_state::machine_reset()
m_nt_page[1] = m_nt_ram.get() + 0x400;
m_nt_page[2] = m_nt_ram.get() + 0x800;
m_nt_page[3] = m_nt_ram.get() + 0xc00;
-
- /* and read/write handlers */
- m_ppu->space(AS_PROGRAM).install_readwrite_handler(0x2000, 0x3eff, read8sm_delegate(*this, FUNC(cham24_state::nt_r)), write8sm_delegate(*this, FUNC(cham24_state::nt_w)));
}
-void cham24_state::init_cham24()
-{
-}
void cham24_state::cham24(machine_config &config)
{
@@ -330,4 +325,7 @@ ROM_START( cham24 )
ROM_LOAD( "24-3.u3", 0x0000, 0x10000, CRC(e97955fa) SHA1(6d686c5d0967c9c2f40dbd8e6a0c0907606f2c7d) ) // unknown rom
ROM_END
-GAME( 2002, cham24, 0, cham24, cham24, cham24_state, init_cham24, ROT0, "bootleg", "Chameleon 24", MACHINE_NOT_WORKING )
+} // Anonymous namespace
+
+
+GAME( 2002, cham24, 0, cham24, cham24, cham24_state, empty_init, ROT0, "bootleg", "Chameleon 24", MACHINE_NOT_WORKING )
diff --git a/src/mame/drivers/famibox.cpp b/src/mame/drivers/famibox.cpp
index 636fe3fe8d0..daafda79f57 100644
--- a/src/mame/drivers/famibox.cpp
+++ b/src/mame/drivers/famibox.cpp
@@ -21,7 +21,7 @@ case style and cartridge/case color: (FamicomBox = Black, FamicomStation = Gray
Specific Hardware information
-----------------------------
The unit had 3 controllers - 2 standard NES controllers and a NES Zapper light
-gun. The cartridges are shaped and appear to be idential to NES 72-pin
+gun. The cartridges are shaped and appear to be identical to NES 72-pin
cartridges. Unfortunately, it was made to play only the games specifically
released for it. Why?
@@ -33,22 +33,22 @@ released for it. Why?
Here's a list of some of the games known to have come with the FamicomBox:
1943; Baseball; Bomber Man; Devil World; Donkey Kong; Donkey Kong Jr.; Duck Hunt;
-Excite Bike; F1 Race; Fighting Golf; Golf; Gradius; Hogan?s Alley; Ice Climbers;
-Ice Hockey; Knight Rider; Makaimura: Ghosts ?n Goblins; McKids; Mah-Jong; Mario Bros.;
-Mike Tyson?s Punch-Out!!; Ninja Ryukenden; Operation Wolf (?); Punch-Out!!; Rock Man;
-Rygar; Senjou no Ookami; Soccer League Winner?s Cup; Super Chinese 2; Super Mario Bros;
+Excite Bike; F1 Race; Fighting Golf; Golf; Gradius; Hogan's Alley; Ice Climbers;
+Ice Hockey; Knight Rider; Makaimura: Ghosts 'n Goblins; McKids; Mah-Jong; Mario Bros.;
+Mike Tyson's Punch-Out!!; Ninja Ryukenden; Operation Wolf (?); Punch-Out!!; Rock Man;
+Rygar; Senjou no Ookami; Soccer League Winner's Cup; Super Chinese 2; Super Mario Bros;
Tag Team Pro Wrestling; Takahashi Meijin no Boukenjima; Tennis; Twin Bee;
Volleyball; Wild Gunman; Wrecking Crew.
Here's a list of some of the games known to have come with the FamicomStation:
1943; Baseball; Donkey Kong; Duck Hunt; F1 Race; Golf; Kame no Ongaeshi:
Urashima Densetsu; Mah-Jong; Mario Bros.; Night Raider; Senjou no Ookami;
-Soccer League Winner?s Cup; Super Chinese 2; Super Mario Bros; Tag Team Pro Wrestling;
+Soccer League Winner's Cup; Super Chinese 2; Super Mario Bros; Tag Team Pro Wrestling;
Takahashi Meijin no Boukenjima; Tennis; Wild Gunman; Wrecking Crew.
FamicomBox menu code maintains internal database of games (rom checksums and game names
-in ASCII). When checking game cartidges, it scans roms and tries to find matching game
-in its internal database. Additionaly, games having standard Nintendo header are accepted too.
+in ASCII). When checking game cartridges, it scans roms and tries to find matching game
+in its internal database. Additionally, games having standard Nintendo header are accepted too.
Current selection of games in driver is based on menu internal database.
Notes/ToDo:
@@ -67,6 +67,8 @@ Notes/ToDo:
#include "speaker.h"
+namespace {
+
class famibox_state : public driver_device
{
public:
@@ -81,6 +83,10 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(famibox_keyswitch_changed);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+
private:
required_device<n2a03_device> m_maincpu;
required_device<ppu2c0x_device> m_ppu;
@@ -112,9 +118,6 @@ private:
uint8_t famibox_IN1_r();
uint8_t famibox_system_r(offs_t offset);
void famibox_system_w(offs_t offset, uint8_t data);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
TIMER_CALLBACK_MEMBER(famicombox_attract_timer_callback);
TIMER_CALLBACK_MEMBER(famicombox_gameplay_timer_callback);
void famicombox_bankswitch(uint8_t bank);
@@ -393,6 +396,7 @@ void famibox_state::famibox_ppu_map(address_map &map)
{
map(0x0000, 0x1fff).bankr("ppubank1");
map(0x2000, 0x3eff).rw(FUNC(famibox_state::famibox_nt_r), FUNC(famibox_state::famibox_nt_w));
+ map(0x3f00, 0x3fff).rw(m_ppu, FUNC(ppu2c0x_device::palette_read), FUNC(ppu2c0x_device::palette_write));
}
/******************************************************
@@ -500,10 +504,6 @@ INPUT_PORTS_END
*******************************************************/
-void famibox_state::video_start()
-{
-}
-
void famibox_state::machine_reset()
{
famicombox_bankswitch(0);
@@ -589,4 +589,7 @@ ROM_START(famibox)
ROM_END
+} // Anonymous namespace
+
+
GAME( 1986, famibox, 0, famibox, famibox, famibox_state, empty_init, ROT0, "Nintendo", "FamicomBox", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND)