mirror of
https://github.com/holub/mame
synced 2025-04-16 13:34:55 +03:00
orao: cleanup
This commit is contained in:
parent
19038a11e8
commit
5d66a3e628
@ -3204,9 +3204,6 @@ files {
|
||||
MAME_DIR .. "src/mame/includes/galeb.h",
|
||||
MAME_DIR .. "src/mame/video/galeb.cpp",
|
||||
MAME_DIR .. "src/mame/drivers/orao.cpp",
|
||||
MAME_DIR .. "src/mame/includes/orao.h",
|
||||
MAME_DIR .. "src/mame/machine/orao.cpp",
|
||||
MAME_DIR .. "src/mame/video/orao.cpp",
|
||||
}
|
||||
|
||||
createMESSProjects(_target, _subtarget, "philips")
|
||||
|
@ -2,21 +2,25 @@
|
||||
// copyright-holders:Miodrag Milanovic
|
||||
/***************************************************************************
|
||||
|
||||
Orao driver by Miodrag Milanovic
|
||||
Orao driver by Miodrag Milanovic
|
||||
|
||||
01/03/2008 Updated to work with latest SVN code
|
||||
23/02/2008 Sound support added.
|
||||
22/02/2008 Preliminary driver.
|
||||
2008-02-22 Preliminary driver.
|
||||
2008-02-23 Sound support added.
|
||||
2008-03-01 Updated to work with latest SVN code
|
||||
|
||||
Driver is based on work of Josip Perusanec
|
||||
|
||||
Ctrl-V turns on keyclick
|
||||
Ctrl-S turns on reversed video
|
||||
|
||||
Todo:
|
||||
- When pasting, shift key doesn't work
|
||||
|
||||
Driver is based on work of Josip Perusanec
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/orao.h"
|
||||
|
||||
#include "cpu/m6502/m6502.h"
|
||||
|
||||
#include "emupal.h"
|
||||
#include "screen.h"
|
||||
#include "softlist.h"
|
||||
@ -24,122 +28,145 @@
|
||||
|
||||
#include "formats/orao_cas.h"
|
||||
|
||||
#include "sound/spkrdev.h"
|
||||
#include "imagedev/cassette.h"
|
||||
|
||||
class orao_state : public driver_device
|
||||
{
|
||||
public:
|
||||
orao_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_memory(*this, "memory")
|
||||
, m_vram(*this, "videoram")
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_speaker(*this, "speaker")
|
||||
, m_cassette(*this, "cassette")
|
||||
, m_io_keyboard(*this, "LINE.%d", 0)
|
||||
{ }
|
||||
|
||||
void orao(machine_config &config);
|
||||
|
||||
void init_orao();
|
||||
|
||||
private:
|
||||
u8 kbd_r(offs_t offset);
|
||||
void sound_w(offs_t offset, u8 data);
|
||||
virtual void machine_reset() override;
|
||||
virtual void machine_start() override;
|
||||
u32 screen_update_orao(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
void mem_map(address_map &map);
|
||||
|
||||
required_shared_ptr<u8> m_memory;
|
||||
required_shared_ptr<u8> m_vram;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<speaker_sound_device> m_speaker;
|
||||
required_device<cassette_image_device> m_cassette;
|
||||
required_ioport_array<20> m_io_keyboard;
|
||||
bool m_spr_bit;
|
||||
};
|
||||
|
||||
|
||||
/* Address maps */
|
||||
void orao_state::orao_mem(address_map &map)
|
||||
void orao_state::mem_map(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x5fff).ram().share("memory");
|
||||
map(0x6000, 0x7fff).ram().share("video_ram"); // video ram
|
||||
map(0x8000, 0x9fff).rw(FUNC(orao_state::orao_io_r), FUNC(orao_state::orao_io_w));
|
||||
map(0x6000, 0x7fff).ram().share("videoram");
|
||||
map(0x8000, 0x87ff).r(FUNC(orao_state::kbd_r));
|
||||
map(0x8800, 0x8fff).w(FUNC(orao_state::sound_w));
|
||||
map(0xa000, 0xafff).ram(); // extension
|
||||
map(0xb000, 0xbfff).ram(); // DOS
|
||||
map(0xc000, 0xdfff).rom();
|
||||
map(0xe000, 0xffff).rom();
|
||||
map(0xc000, 0xffff).rom().region("maincpu",0);
|
||||
}
|
||||
|
||||
|
||||
/* Input ports */
|
||||
// bits 0-3 are masked out in the code
|
||||
static INPUT_PORTS_START( orao )
|
||||
PORT_START("LINE.0")
|
||||
PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP))
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN))
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
|
||||
|
||||
PORT_START("LINE.1")
|
||||
PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Control") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL)
|
||||
PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("LINE.2")
|
||||
PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1))
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2))
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3") PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3))
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4") PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4))
|
||||
|
||||
PORT_START("LINE.3")
|
||||
PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
|
||||
PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("LINE.4")
|
||||
PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('R')
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('T')
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&')
|
||||
|
||||
PORT_START("LINE.5")
|
||||
PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
|
||||
PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("LINE.6")
|
||||
PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('O')
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('I')
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('U')
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'')
|
||||
|
||||
PORT_START("LINE.7")
|
||||
PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(')
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')')
|
||||
PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("LINE.8")
|
||||
PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('E')
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('W')
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
|
||||
|
||||
PORT_START("LINE.9")
|
||||
PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"')
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
|
||||
PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("LINE.10")
|
||||
PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('L')
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('J')
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('K')
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('M')
|
||||
|
||||
PORT_START("LINE.11")
|
||||
PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>')
|
||||
PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("LINE.12")
|
||||
PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('D')
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('A')
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('S')
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
|
||||
|
||||
PORT_START("LINE.13")
|
||||
PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('X')
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('C')
|
||||
PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("LINE.14")
|
||||
PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('F')
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('H')
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('G')
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('N')
|
||||
|
||||
PORT_START("LINE.15")
|
||||
PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('B')
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('V')
|
||||
PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
@ -151,7 +178,6 @@ static INPUT_PORTS_START( orao )
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR(':') PORT_CHAR('*')
|
||||
|
||||
PORT_START("LINE.17")
|
||||
PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Del") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('^') PORT_CHAR('@')
|
||||
PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
@ -163,18 +189,92 @@ static INPUT_PORTS_START( orao )
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR(';') PORT_CHAR('+')
|
||||
|
||||
PORT_START("LINE.19")
|
||||
PORT_BIT(0x0F, IP_ACTIVE_HIGH, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=')
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0')
|
||||
PORT_BIT(0xC0, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
INPUT_PORTS_END
|
||||
|
||||
/* Driver initialization */
|
||||
void orao_state::init_orao()
|
||||
{
|
||||
memset(m_memory,0xff,0x6000);
|
||||
}
|
||||
|
||||
void orao_state::machine_reset()
|
||||
{
|
||||
m_spr_bit = 0;
|
||||
}
|
||||
|
||||
void orao_state::machine_start()
|
||||
{
|
||||
save_item(NAME(m_spr_bit));
|
||||
}
|
||||
|
||||
u8 orao_state::kbd_r(offs_t offset)
|
||||
{
|
||||
switch(offset)
|
||||
{
|
||||
/* Keyboard*/
|
||||
case 0x07FC : return m_io_keyboard[0]->read();
|
||||
case 0x07FD : return m_io_keyboard[1]->read();
|
||||
case 0x07FA : return m_io_keyboard[2]->read();
|
||||
case 0x07FB : return m_io_keyboard[3]->read();
|
||||
case 0x07F6 : return m_io_keyboard[4]->read();
|
||||
case 0x07F7 : return m_io_keyboard[5]->read();
|
||||
case 0x07EE : return m_io_keyboard[6]->read();
|
||||
case 0x07EF : return m_io_keyboard[7]->read();
|
||||
case 0x07DE : return m_io_keyboard[8]->read();
|
||||
case 0x07DF : return m_io_keyboard[9]->read();
|
||||
case 0x07BE : return m_io_keyboard[10]->read();
|
||||
case 0x07BF : return m_io_keyboard[11]->read();
|
||||
case 0x077E : return m_io_keyboard[12]->read();
|
||||
case 0x077F : return m_io_keyboard[13]->read();
|
||||
case 0x06FE : return m_io_keyboard[14]->read();
|
||||
case 0x06FF : return m_io_keyboard[15]->read();
|
||||
case 0x05FE : return m_io_keyboard[16]->read();
|
||||
case 0x05FF : return m_io_keyboard[17]->read();
|
||||
case 0x03FE : return m_io_keyboard[18]->read();
|
||||
case 0x03FF : return m_io_keyboard[19]->read();
|
||||
/* Tape */
|
||||
case 0x07FF : return (m_cassette->input() > 0.004) ? 0xff : 0;
|
||||
}
|
||||
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
|
||||
void orao_state::sound_w(offs_t offset, u8 data)
|
||||
{
|
||||
m_speaker->level_w(m_spr_bit);
|
||||
m_cassette->output(m_spr_bit ? 1.0 : -1.0);
|
||||
m_spr_bit ^= 1;
|
||||
}
|
||||
|
||||
// bitmapped graphics
|
||||
u32 orao_state::screen_update_orao(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
u16 addr = 0;
|
||||
for (u16 y = 0; y < 256; y++)
|
||||
{
|
||||
int horpos = 0;
|
||||
for (u8 x = 0; x < 32; x++)
|
||||
{
|
||||
u8 code = m_vram[addr++];
|
||||
for (u8 b = 0; b < 8; b++)
|
||||
{
|
||||
bitmap.pix16(y, horpos++) = (code >> b) & 0x01;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Machine driver */
|
||||
void orao_state::orao(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
M6502(config, m_maincpu, 1000000);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &orao_state::orao_mem);
|
||||
M6502(config, m_maincpu, 8_MHz_XTAL / 8);
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &orao_state::mem_map);
|
||||
|
||||
/* video hardware */
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
||||
@ -187,7 +287,6 @@ void orao_state::orao(machine_config &config)
|
||||
|
||||
PALETTE(config, "palette", palette_device::MONOCHROME);
|
||||
|
||||
|
||||
/* audio hardware */
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50);
|
||||
@ -203,18 +302,18 @@ void orao_state::orao(machine_config &config)
|
||||
|
||||
/* ROM definition */
|
||||
ROM_START( orao )
|
||||
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
|
||||
ROM_LOAD( "bas12.rom", 0xc000, 0x2000, CRC(42ae6f69) SHA1(b9d4a544fae13a9c492af027545178addd557111) )
|
||||
ROM_LOAD( "crt12.rom", 0xe000, 0x2000, CRC(94ebdc94) SHA1(3959d717f96558823ccc806c842d2fb5ab0c3890) )
|
||||
ROM_REGION( 0x4000, "maincpu", 0 )
|
||||
ROM_LOAD( "bas12.ic5", 0x0000, 0x2000, CRC(42ae6f69) SHA1(b9d4a544fae13a9c492af027545178addd557111) )
|
||||
ROM_LOAD( "crt12.ic6", 0x2000, 0x2000, CRC(94ebdc94) SHA1(3959d717f96558823ccc806c842d2fb5ab0c3890) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( orao103 )
|
||||
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
|
||||
ROM_LOAD( "bas13.rom", 0xc000, 0x2000, CRC(35daf5da) SHA1(499c5a4bd930c26ec6226623c2793b4c7f771658) )
|
||||
ROM_LOAD( "crt13.rom", 0xe000, 0x2000, CRC(e7076014) SHA1(0e213287b0b520440af6a2a6297788a9356818c2) )
|
||||
ROM_REGION( 0x4000, "maincpu", 0 )
|
||||
ROM_LOAD( "bas13.ic5", 0x0000, 0x2000, CRC(35daf5da) SHA1(499c5a4bd930c26ec6226623c2793b4c7f771658) )
|
||||
ROM_LOAD( "crt13.ic6", 0x2000, 0x2000, CRC(e7076014) SHA1(0e213287b0b520440af6a2a6297788a9356818c2) )
|
||||
ROM_END
|
||||
|
||||
/* Driver */
|
||||
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
|
||||
COMP( 1984, orao, 0, 0, orao, orao, orao_state, init_orao, "PEL Varazdin", "Orao 102", 0 )
|
||||
COMP( 1985, orao103, orao, 0, orao, orao, orao_state, init_orao103, "PEL Varazdin", "Orao 103", 0 )
|
||||
COMP( 1984, orao, 0, 0, orao, orao, orao_state, init_orao, "PEL Varazdin", "Orao 102", MACHINE_SUPPORTS_SAVE )
|
||||
COMP( 1985, orao103, orao, 0, orao, orao, orao_state, init_orao, "PEL Varazdin", "Orao 103", MACHINE_SUPPORTS_SAVE )
|
||||
|
@ -1,53 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Miodrag Milanovic
|
||||
/*****************************************************************************
|
||||
*
|
||||
* includes/orao.h
|
||||
*
|
||||
****************************************************************************/
|
||||
#ifndef MAME_INCLUDES_ORAO_H
|
||||
#define MAME_INCLUDES_ORAO_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "sound/spkrdev.h"
|
||||
#include "imagedev/cassette.h"
|
||||
|
||||
class orao_state : public driver_device
|
||||
{
|
||||
public:
|
||||
orao_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
driver_device(mconfig, type, tag),
|
||||
m_memory(*this, "memory"),
|
||||
m_video_ram(*this, "video_ram"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_speaker(*this, "speaker"),
|
||||
m_cassette(*this, "cassette"),
|
||||
m_line(*this, "LINE.%u", 0),
|
||||
m_beep(0)
|
||||
{ }
|
||||
|
||||
void orao(machine_config &config);
|
||||
|
||||
void init_orao();
|
||||
void init_orao103();
|
||||
|
||||
private:
|
||||
uint8_t orao_io_r(offs_t offset);
|
||||
void orao_io_w(offs_t offset, uint8_t data);
|
||||
virtual void machine_reset() override;
|
||||
virtual void video_start() override;
|
||||
uint32_t screen_update_orao(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
||||
void orao_mem(address_map &map);
|
||||
|
||||
required_shared_ptr<uint8_t> m_memory;
|
||||
required_shared_ptr<uint8_t> m_video_ram;
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<speaker_sound_device> m_speaker;
|
||||
required_device<cassette_image_device> m_cassette;
|
||||
required_ioport_array<20> m_line;
|
||||
uint8_t m_beep;
|
||||
};
|
||||
|
||||
#endif // MAME_INCLUDES_ORAO_H
|
@ -1,80 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Miodrag Milanovic
|
||||
/***************************************************************************
|
||||
|
||||
Orao machine driver by Miodrag Milanovic
|
||||
|
||||
23/02/2008 Sound support added.
|
||||
22/02/2008 Preliminary driver.
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "imagedev/cassette.h"
|
||||
#include "includes/orao.h"
|
||||
|
||||
|
||||
/* Driver initialization */
|
||||
void orao_state::init_orao()
|
||||
{
|
||||
memset(m_memory,0xff,0x6000);
|
||||
}
|
||||
|
||||
void orao_state::init_orao103()
|
||||
{
|
||||
memset(m_memory,0xff,0x6000);
|
||||
}
|
||||
|
||||
void orao_state::machine_reset()
|
||||
{
|
||||
}
|
||||
|
||||
uint8_t orao_state::orao_io_r(offs_t offset)
|
||||
{
|
||||
double level;
|
||||
|
||||
switch(offset) {
|
||||
/* Keyboard*/
|
||||
case 0x07FC : return m_line[0]->read();
|
||||
case 0x07FD : return m_line[1]->read();
|
||||
case 0x07FA : return m_line[2]->read();
|
||||
case 0x07FB : return m_line[3]->read();
|
||||
case 0x07F6 : return m_line[4]->read();
|
||||
case 0x07F7 : return m_line[5]->read();
|
||||
case 0x07EE : return m_line[6]->read();
|
||||
case 0x07EF : return m_line[7]->read();
|
||||
case 0x07DE : return m_line[8]->read();
|
||||
case 0x07DF : return m_line[9]->read();
|
||||
case 0x07BE : return m_line[10]->read();
|
||||
case 0x07BF : return m_line[11]->read();
|
||||
case 0x077E : return m_line[12]->read();
|
||||
case 0x077F : return m_line[13]->read();
|
||||
case 0x06FE : return m_line[14]->read();
|
||||
case 0x06FF : return m_line[15]->read();
|
||||
case 0x05FE : return m_line[16]->read();
|
||||
case 0x05FF : return m_line[17]->read();
|
||||
case 0x03FE : return m_line[18]->read();
|
||||
case 0x03FF : return m_line[19]->read();
|
||||
/* Tape */
|
||||
case 0x07FF :
|
||||
level = m_cassette->input();
|
||||
if (level < 0) {
|
||||
return 0x00;
|
||||
}
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
|
||||
void orao_state::orao_io_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
if (offset == 0x0800)
|
||||
{
|
||||
m_speaker->level_w(m_beep);
|
||||
m_cassette->output(m_beep ? 1.0 : -1.0);
|
||||
m_beep ^= 1;
|
||||
}
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Miodrag Milanovic
|
||||
/***************************************************************************
|
||||
|
||||
Orao video driver by Miodrag Milanovic
|
||||
|
||||
01/03/2008 Updated to work with latest SVN code
|
||||
22/02/2008 Preliminary driver.
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/orao.h"
|
||||
|
||||
void orao_state::video_start()
|
||||
{
|
||||
}
|
||||
|
||||
uint32_t orao_state::screen_update_orao(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
uint8_t code;
|
||||
int y, x, b;
|
||||
|
||||
int addr = 0;
|
||||
for (y = 0; y < 256; y++)
|
||||
{
|
||||
int horpos = 0;
|
||||
for (x = 0; x < 32; x++)
|
||||
{
|
||||
code = m_video_ram[addr++];
|
||||
for (b = 0; b < 8; b++)
|
||||
{
|
||||
bitmap.pix16(y, horpos++) = (code >> b) & 0x01;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user