mirror of
https://github.com/holub/mame
synced 2025-07-02 08:39:21 +03:00
(MESS) phc25 : added cursor and wave sound.
This commit is contained in:
parent
a8d021d5b5
commit
1fb2bc3b79
@ -29,6 +29,11 @@
|
|||||||
- tune cassette trigger level
|
- tune cassette trigger level
|
||||||
- accurate video timing
|
- accurate video timing
|
||||||
|
|
||||||
|
- sound isn't working (should be a keyclick)
|
||||||
|
- backspace and return are very slow, while other keys are way too fast
|
||||||
|
- Basic and screen drawing are sluggish
|
||||||
|
- Screen attribute bits need to be found out
|
||||||
|
|
||||||
10 SCREEN 2,1,1:CLS
|
10 SCREEN 2,1,1:CLS
|
||||||
20 FOR X=0 TO 8
|
20 FOR X=0 TO 8
|
||||||
30 LINE(X*24,0)-(X*24+16,191),X,BF
|
30 LINE(X*24,0)-(X*24+16,191),X,BF
|
||||||
@ -108,10 +113,11 @@ WRITE8_MEMBER( phc25_state::port40_w )
|
|||||||
m_centronics->strobe_w(BIT(data, 3));
|
m_centronics->strobe_w(BIT(data, 3));
|
||||||
|
|
||||||
/* MC6847 */
|
/* MC6847 */
|
||||||
|
m_ag = BIT(data, 7);
|
||||||
m_vdg->intext_w(BIT(data, 2));
|
m_vdg->intext_w(BIT(data, 2));
|
||||||
m_vdg->gm0_w(BIT(data, 5));
|
m_vdg->gm0_w(BIT(data, 5));
|
||||||
m_vdg->gm1_w(BIT(data, 6));
|
m_vdg->gm1_w(BIT(data, 6));
|
||||||
m_vdg->ag_w(BIT(data, 7));
|
m_vdg->ag_w(m_ag);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Memory Maps */
|
/* Memory Maps */
|
||||||
@ -262,9 +268,19 @@ INPUT_PORTS_END
|
|||||||
/* Video */
|
/* Video */
|
||||||
|
|
||||||
READ8_MEMBER( phc25_state::video_ram_r )
|
READ8_MEMBER( phc25_state::video_ram_r )
|
||||||
|
{
|
||||||
|
if (m_ag) // graphics (to be checked)
|
||||||
{
|
{
|
||||||
return m_video_ram[offset & 0x17ff];
|
return m_video_ram[offset & 0x17ff];
|
||||||
}
|
}
|
||||||
|
else // text
|
||||||
|
{
|
||||||
|
offset &= 0x7ff;
|
||||||
|
m_vdg->inv_w(BIT(m_video_ram[offset | 0x800], 0)); // cursor attribute
|
||||||
|
//m_vdg->css_w(BIT(m_video_ram[offset | 0x800], 7)); // unknown attribute
|
||||||
|
return m_video_ram[offset];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
UINT8 phc25_state::pal_char_rom_r(running_machine &machine, UINT8 ch, int line)
|
UINT8 phc25_state::pal_char_rom_r(running_machine &machine, UINT8 ch, int line)
|
||||||
{
|
{
|
||||||
@ -354,7 +370,7 @@ static const cassette_interface phc25_cassette_interface =
|
|||||||
|
|
||||||
static MACHINE_CONFIG_START( phc25, phc25_state )
|
static MACHINE_CONFIG_START( phc25, phc25_state )
|
||||||
/* basic machine hardware */
|
/* basic machine hardware */
|
||||||
MCFG_CPU_ADD(Z80_TAG, Z80, 4000000)
|
MCFG_CPU_ADD(Z80_TAG, Z80, 4000000 ) // divide by 3 to make keyboard usable
|
||||||
MCFG_CPU_PROGRAM_MAP(phc25_mem)
|
MCFG_CPU_PROGRAM_MAP(phc25_mem)
|
||||||
MCFG_CPU_IO_MAP(phc25_io)
|
MCFG_CPU_IO_MAP(phc25_io)
|
||||||
|
|
||||||
@ -363,6 +379,8 @@ static MACHINE_CONFIG_START( phc25, phc25_state )
|
|||||||
MCFG_SOUND_ADD(AY8910_TAG, AY8910, 1996750)
|
MCFG_SOUND_ADD(AY8910_TAG, AY8910, 1996750)
|
||||||
MCFG_SOUND_CONFIG(ay8910_intf)
|
MCFG_SOUND_CONFIG(ay8910_intf)
|
||||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
|
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
|
||||||
|
MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
|
||||||
|
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
|
||||||
|
|
||||||
/* devices */
|
/* devices */
|
||||||
MCFG_CASSETTE_ADD("cassette", phc25_cassette_interface)
|
MCFG_CASSETTE_ADD("cassette", phc25_cassette_interface)
|
||||||
@ -408,6 +426,6 @@ ROM_END
|
|||||||
|
|
||||||
/* Driver */
|
/* Driver */
|
||||||
|
|
||||||
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */
|
/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */
|
||||||
COMP( 1983, phc25, 0, 0, pal, phc25, driver_device, 0, "Sanyo", "PHC-25 (Europe)", GAME_NOT_WORKING )
|
COMP( 1983, phc25, 0, 0, pal, phc25, driver_device, 0, "Sanyo", "PHC-25 (Europe)", GAME_NOT_WORKING )
|
||||||
COMP( 1983, phc25j, phc25, 0, ntsc, phc25j, driver_device, 0, "Sanyo", "PHC-25 (Japan)", GAME_NOT_WORKING )
|
COMP( 1983, phc25j, phc25, 0, ntsc, phc25j, driver_device, 0, "Sanyo", "PHC-25 (Japan)", GAME_NOT_WORKING )
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "cpu/z80/z80.h"
|
#include "cpu/z80/z80.h"
|
||||||
#include "imagedev/cassette.h"
|
#include "imagedev/cassette.h"
|
||||||
|
#include "sound/wave.h"
|
||||||
#include "machine/ram.h"
|
#include "machine/ram.h"
|
||||||
#include "bus/centronics/ctronics.h"
|
#include "bus/centronics/ctronics.h"
|
||||||
#include "video/mc6847.h"
|
#include "video/mc6847.h"
|
||||||
@ -26,31 +27,29 @@ class phc25_state : public driver_device
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
phc25_state(const machine_config &mconfig, device_type type, const char *tag)
|
phc25_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: driver_device(mconfig, type, tag),
|
: driver_device(mconfig, type, tag)
|
||||||
m_maincpu(*this, Z80_TAG),
|
, m_video_ram(*this, "video_ram")
|
||||||
m_vdg(*this, MC6847_TAG),
|
, m_maincpu(*this, Z80_TAG)
|
||||||
m_centronics(*this, CENTRONICS_TAG),
|
, m_vdg(*this, MC6847_TAG)
|
||||||
m_cassette(*this, "cassette"),
|
, m_centronics(*this, CENTRONICS_TAG)
|
||||||
m_video_ram(*this, "video_ram")
|
, m_cassette(*this, "cassette")
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
required_device<cpu_device> m_maincpu;
|
|
||||||
required_device<mc6847_base_device> m_vdg;
|
|
||||||
required_device<centronics_device> m_centronics;
|
|
||||||
required_device<cassette_image_device> m_cassette;
|
|
||||||
|
|
||||||
virtual void video_start();
|
|
||||||
|
|
||||||
DECLARE_READ8_MEMBER( port40_r );
|
DECLARE_READ8_MEMBER( port40_r );
|
||||||
DECLARE_WRITE8_MEMBER( port40_w );
|
DECLARE_WRITE8_MEMBER( port40_w );
|
||||||
DECLARE_READ8_MEMBER( video_ram_r );
|
DECLARE_READ8_MEMBER( video_ram_r );
|
||||||
|
|
||||||
static UINT8 ntsc_char_rom_r(running_machine &machine, UINT8 ch, int line);
|
static UINT8 ntsc_char_rom_r(running_machine &machine, UINT8 ch, int line);
|
||||||
static UINT8 pal_char_rom_r(running_machine &machine, UINT8 ch, int line);
|
static UINT8 pal_char_rom_r(running_machine &machine, UINT8 ch, int line);
|
||||||
|
|
||||||
/* video state */
|
private:
|
||||||
required_shared_ptr<UINT8> m_video_ram;
|
virtual void video_start();
|
||||||
UINT8 *m_char_rom;
|
UINT8 *m_char_rom;
|
||||||
|
bool m_ag;
|
||||||
|
required_shared_ptr<UINT8> m_video_ram;
|
||||||
|
required_device<cpu_device> m_maincpu;
|
||||||
|
required_device<mc6847_base_device> m_vdg;
|
||||||
|
required_device<centronics_device> m_centronics;
|
||||||
|
required_device<cassette_image_device> m_cassette;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user