Previous 15994 Revisions Next

r15385 Saturday 2nd June, 2012 at 20:10:31 UTC by R. Belmont
Apple II: Laser 128 and 128EX partially working, can boot ProDOS, DOS 3.3 dies. [R. Belmont]
[src/mess]mess.mak
[src/mess/drivers]apple2.c
[src/mess/includes]apple2.h
[src/mess/machine]apple2.c laser128.c* laser128.h*

src/mess/machine/laser128.c
r0r15385
1/*********************************************************************
2
3    laser128.c
4
5    Helper to implement the Laser 128's built-in slot peripherals
6
7*********************************************************************/
8
9#include "laser128.h"
10#include "includes/apple2.h"
11
12/***************************************************************************
13    PARAMETERS
14***************************************************************************/
15
16//**************************************************************************
17//  GLOBAL VARIABLES
18//**************************************************************************
19
20const device_type A2BUS_LASER128 = &device_creator<a2bus_laser128_device>;
21
22MACHINE_CONFIG_FRAGMENT( a2laser128 )
23MACHINE_CONFIG_END
24
25/***************************************************************************
26    FUNCTION PROTOTYPES
27***************************************************************************/
28
29//-------------------------------------------------
30//  machine_config_additions - device-specific
31//  machine configurations
32//-------------------------------------------------
33
34machine_config_constructor a2bus_laser128_device::device_mconfig_additions() const
35{
36   return MACHINE_CONFIG_NAME( a2laser128 );
37}
38
39//**************************************************************************
40//  LIVE DEVICE
41//**************************************************************************
42
43a2bus_laser128_device::a2bus_laser128_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock) :
44    device_t(mconfig, type, name, tag, owner, clock),
45    device_a2bus_card_interface(mconfig, *this)
46{
47   m_shortname = "a2laser128";
48}
49
50a2bus_laser128_device::a2bus_laser128_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
51    device_t(mconfig, A2BUS_LASER128, "VTech Laser 128 Internal Device", tag, owner, clock),
52    device_a2bus_card_interface(mconfig, *this)
53{
54   m_shortname = "a2laser128";
55}
56
57//-------------------------------------------------
58//  device_start - device-specific startup
59//-------------------------------------------------
60
61void a2bus_laser128_device::device_start()
62{
63   // set_a2bus_device makes m_slot valid
64   set_a2bus_device();
65}
66
67void a2bus_laser128_device::device_reset()
68{
69    m_rom = device().machine().root_device().memregion("maincpu")->base();
70    m_slot7_bank = 0;
71}
72
73UINT8 a2bus_laser128_device::read_c0nx(address_space &space, UINT8 offset)
74{
75    return 0x00;
76}
77
78void a2bus_laser128_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
79{
80}
81
82UINT8 a2bus_laser128_device::read_cnxx(address_space &space, UINT8 offset)
83{
84    return m_rom[offset + (m_slot * 0x100) + 0x4000];
85}
86
87UINT8 a2bus_laser128_device::read_c800(address_space &space, UINT16 offset)
88{
89    switch (m_slot)
90    {
91        case 1:
92            return m_rom[(offset & 0x7ff) + 0x4800];
93
94        case 2:
95            return m_rom[(offset & 0x7ff) + 0x5800];
96
97        case 5:
98            return m_rom[(offset & 0x7ff) + 0x5000];
99
100        case 6:
101            return m_rom[(offset & 0x7ff) + 0x7800];
102
103        case 7:
104            return m_rom[(offset & 0x7ff) + 0x5c00 + m_slot7_bank];
105    }
106
107    return 0xff;
108}
109
110void a2bus_laser128_device::write_c800(address_space &space, UINT16 offset, UINT8 data)
111{
112}
113
114bool a2bus_laser128_device::take_c800()
115{
116    if ((m_slot == 1) || (m_slot == 2) || (m_slot == 5) || (m_slot == 7))
117    {
118        return true;
119    }
120
121    return false;
122}
123
src/mess/machine/laser128.h
r0r15385
1/*********************************************************************
2
3    laser128.h
4
5    Helper to implement the Laser 128's built-in slot peripherals
6
7*********************************************************************/
8
9#ifndef __A2BUS_LASER128__
10#define __A2BUS_LASER128__
11
12#include "emu.h"
13#include "machine/a2bus.h"
14
15//**************************************************************************
16//  TYPE DEFINITIONS
17//**************************************************************************
18
19class a2bus_laser128_device:
20    public device_t,
21    public device_a2bus_card_interface
22{
23public:
24    // construction/destruction
25    a2bus_laser128_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
26    a2bus_laser128_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
27
28    // optional information overrides
29    virtual machine_config_constructor device_mconfig_additions() const;
30
31protected:
32    virtual void device_start();
33    virtual void device_reset();
34
35    // overrides of standard a2bus slot functions
36    virtual UINT8 read_c0nx(address_space &space, UINT8 offset);
37    virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data);
38    virtual UINT8 read_cnxx(address_space &space, UINT8 offset);
39    virtual UINT8 read_c800(address_space &space, UINT16 offset);
40    virtual void write_c800(address_space &space, UINT16 offset, UINT8 data);
41    virtual bool take_c800();
42
43private:
44    UINT8 *m_rom;
45    int m_slot7_bank;
46};
47
48// device type definition
49extern const device_type A2BUS_LASER128;
50
51#endif /* __A2BUS_LASER128__ */
52
src/mess/machine/apple2.c
r15384r15385
449449   }
450450   else
451451   {
452      return apple2_slotram_r(space, slotnum, offset);
452        if (m_machinetype == LASER128)
453        {
454            UINT8 *rom = space.machine().root_device().memregion("maincpu")->base();
455           
456            return rom[(offset&0x1ff) + 0x4200];
457        }
458        else
459        {
460            return apple2_slotram_r(space, slotnum, offset);
461        }
453462   }
454463
455464   // else fall through to floating bus
r15384r15385
18521861   apple2_reset(machine);
18531862}
18541863
1864MACHINE_START( laser128 )
1865{
1866   apple2_memmap_config mem_cfg;
1867   apple2_state *state = machine.driver_data<apple2_state>();
1868
1869    state->m_flags_mask = 0;
1870    state->m_machinetype = LASER128;
1871
1872   apple2_init_common(machine);
1873
1874   /* setup memory */
1875   memset(&mem_cfg, 0, sizeof(mem_cfg));
1876   mem_cfg.first_bank = 1;
1877   mem_cfg.memmap = apple2_memmap_entries;
1878   mem_cfg.auxmem = (UINT8*)NULL;
1879   apple2_setup_memory(machine, &mem_cfg);
1880
1881   /* perform initial reset */
1882   apple2_reset(machine);
1883}
1884
18551885MACHINE_START( apple2orig )
18561886{
18571887   apple2_memmap_config mem_cfg;
src/mess/includes/apple2.h
r15384r15385
7676{
7777    APPLE_II,           // Apple II/II+
7878    APPLE_IIEPLUS,      // Apple IIe/IIc/IIgs/IIc+
79    TK2000              // Microdigital TK2000
79    TK2000,             // Microdigital TK2000
80    LASER128            // Laser 128/128EX/128EX2
8081} machine_type_t;
8182
8283typedef enum
r15384r15385
233234MACHINE_START( apple2 );
234235MACHINE_START( apple2orig );
235236MACHINE_START( tk2000 );
237MACHINE_START( laser128 );
236238UINT8 apple2_getfloatingbusvalue(running_machine &machine);
237239READ8_HANDLER( apple2_c0xx_r );
238240WRITE8_HANDLER( apple2_c0xx_w );
src/mess/drivers/apple2.c
r15384r15385
207207#include "machine/a2themill.h"
208208#include "machine/a2sam.h"
209209#include "machine/a2alfam2.h"
210#include "machine/laser128.h"
210211
211212/***************************************************************************
212213    PARAMETERS
r15384r15385
628629//    SLOT_INTERFACE("scsi", A2BUS_SCSI)  /* Apple II SCSI Card */
629630SLOT_INTERFACE_END
630631
632static SLOT_INTERFACE_START(laser128_internal)
633    SLOT_INTERFACE("l128int", A2BUS_LASER128)
634SLOT_INTERFACE_END
635
631636static SLOT_INTERFACE_START(apple2eaux_cards)
632637SLOT_INTERFACE_END
633638
r15384r15385
785790    MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl6", A2BUS_IWM_FDC, NULL)
786791MACHINE_CONFIG_END
787792
793static MACHINE_CONFIG_DERIVED( laser128, apple2c )
794   MCFG_MACHINE_START(laser128)
788795
796    MCFG_A2BUS_SLOT_REMOVE("sl6")
797
798    MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl1", A2BUS_LASER128, NULL)
799    MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl2", A2BUS_LASER128, NULL)
800    MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl3", A2BUS_LASER128, NULL)
801    MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl4", A2BUS_LASER128, NULL)
802    MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl5", A2BUS_LASER128, NULL)
803    MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl6", A2BUS_IWM_FDC, NULL)     // slots 6 and 7 are hacks for now
804//    MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl7", A2BUS_LASER128, NULL)
805MACHINE_CONFIG_END
806
789807/***************************************************************************
790808
791809  Game driver(s)
r15384r15385
10381056   ROM_LOAD("las128ex.256", 0x0000, 0x8000, CRC(B67C8BA1) SHA1(8BD5F82A501B1CF9D988C7207DA81E514CA254B0))
10391057ROM_END
10401058
1059ROM_START(las128e2)
1060   ROM_REGION(0x2000,"gfx1",0)
1061   ROM_LOAD ( "341-0265-a.chr", 0x0000, 0x1000, BAD_DUMP CRC(2651014d) SHA1(b2b5d87f52693817fc747df087a4aa1ddcdb1f10)) // need to dump real laser rom
1062   ROM_LOAD ( "341-0265-a.chr", 0x1000, 0x1000, BAD_DUMP CRC(2651014d) SHA1(b2b5d87f52693817fc747df087a4aa1ddcdb1f10)) // need to dump real laser rom
10411063
1064   ROM_REGION(0x8700,"maincpu",0)
1065    ROM_LOAD( "laser 128ex2 v6.1 rom.bin", 0x000000, 0x008000, CRC(7f911c90) SHA1(125754c1bd777d4c510f5239b96178c6f2e3236b) )
1066ROM_END
1067
10421068ROM_START(apple2cp)
10431069   ROM_REGION(0x2000,"gfx1",0)
10441070   ROM_LOAD ( "341-0265-a.chr", 0x0000, 0x1000,CRC(2651014d) SHA1(b2b5d87f52693817fc747df087a4aa1ddcdb1f10))
r15384r15385
10731099COMP( 1984, tk2000,   apple2c,  0,        tk2000,      apple2e,  0,        "Microdigital",      "TK2000" , GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
10741100COMP( 1989, prav8c,   apple2c,  0,        apple2c,      apple2e,  0,        "Pravetz",           "Pravetz 8C", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
10751101COMP( 1983, las3000,  apple2,   0,        apple2p,      apple2p,  0,        "Video Technology",  "Laser 3000",   GAME_NOT_WORKING )
1076COMP( 1987, laser128, apple2c,  0,        apple2c,      apple2e,  0,        "Video Technology",  "Laser 128 (rev 4)", GAME_NOT_WORKING )
1077COMP( 1987, las128ex, apple2c,  0,        apple2c,      apple2e,  0,        "Video Technology",  "Laser 128ex (rev 4a)", GAME_NOT_WORKING )
1102COMP( 1987, laser128, apple2c,  0,        laser128,      apple2e,  0,        "Video Technology",  "Laser 128 (version 4.2)", GAME_NOT_WORKING )
1103COMP( 1988, las128ex, apple2c,  0,        laser128,      apple2e,  0,        "Video Technology",  "Laser 128ex (version 4.5)", GAME_NOT_WORKING )
10781104COMP( 1985, apple2c0, apple2c,  0,        apple2c_iwm, apple2e,  0,        "Apple Computer",    "Apple //c (UniDisk 3.5)", GAME_SUPPORTS_SAVE )
10791105COMP( 1986, apple2c3, apple2c,  0,        apple2c_iwm, apple2e,  0,        "Apple Computer",    "Apple //c (Original Memory Expansion)", GAME_SUPPORTS_SAVE )
10801106COMP( 1986, apple2c4, apple2c,  0,        apple2c_iwm, apple2e,  0,        "Apple Computer",    "Apple //c (rev 4)", GAME_NOT_WORKING )
src/mess/mess.mak
r15384r15385
663663    $(MESS_MACHINE)/a2themill.o \
664664    $(MESS_MACHINE)/a2sam.o \
665665    $(MESS_MACHINE)/a2alfam2.o \
666    $(MESS_MACHINE)/laser128.o \
666667   $(MESS_MACHINE)/lisa.o      \
667668   $(MESS_DRIVERS)/lisa.o      \
668669   $(MESS_MACHINE)/nubus.o     \

Previous 15994 Revisions Next


© 1998-2018 The MESS Team