Previous 15994 Revisions Next

r15280 Wednesday 23rd May, 2012 at 06:27:44 UTC by Robbbert
ELEKTOR - added cassette & notes, Marked as WORKING.
[src/mess/drivers]vc4000.c
[src/mess/includes]vc4000.h

src/mess/includes/vc4000.h
r15279r15280
1111#include "cpu/s2650/s2650.h"
1212#include "imagedev/cartslot.h"
1313#include "imagedev/snapquik.h"
14#include "imagedev/cassette.h"
15#include "sound/wave.h"
1416
1517// define this to use digital inputs instead of the slow
1618// autocentering analog mame joys
r15279r15280
7072{
7173public:
7274   vc4000_state(const machine_config &mconfig, device_type type, const char *tag)
73      : driver_device(mconfig, type, tag)
75      : driver_device(mconfig, type, tag),
76   m_cass(*this, CASSETTE_TAG)
7477   { }
7578
7679   DECLARE_WRITE8_MEMBER(vc4000_sound_ctl);
r15279r15280
7881   DECLARE_READ8_MEMBER(vc4000_video_r);
7982   DECLARE_WRITE8_MEMBER(vc4000_video_w);
8083   DECLARE_READ8_MEMBER(vc4000_vsync_r);
84   DECLARE_READ8_MEMBER(elektor_cass_r);
85   DECLARE_WRITE8_MEMBER(elektor_cass_w);
8186   vc4000_video_t m_video;
8287   UINT8 m_sprite_collision[0x20];
8388   UINT8 m_background_collision[0x20];
r15279r15280
8893   UINT8 m_objects[512];
8994   UINT8 m_irq_pause;
9095   bitmap_ind16 *m_bitmap;
96   optional_device<cassette_image_device> m_cass;
9197};
9298
9399
src/mess/drivers/vc4000.c
r15279r15280
4545
4646Go to the bottom to see the game list and emulation status of each.
4747
48Elektor TV Games Computer - this is much the same as the vc4000, however it has
49its own ROM (with inbuilt monitor program similar to the Signetics Intructor 50),
50and 2K of ram. No cart slot, but has a cassette interface.  ToDo:
51- Memory addresses to the 2636 to be confirmed
52- Keys to confirm
53- Cassette interface
54- Quickload files load but don't run.
55When booted you get the familiar 00 00 pattern. Pressing 1 gives a display of
56IIII. Nothing else happens.
48******************************************************************************
5749
50Elektor TV Games Computer
51This is much the same as the vc4000, however it has its own ROM (with inbuilt
52monitor program similar to the Signetics Instructor 50), and 2K of ram. No cart
53slot, no joystick, but has a cassette interface.
54
55ToDo:
56- Most quickloads don't work too well
57- Might need to rework keyboard, again
58
59When booted you get the familiar 00 00 pattern. Pressing Q gives a display of
60IIII. Now, you enter a command.
61
62Key   Command    Purpose
63------------------------
64Q     Start      Boot up system
65L     RCAS       Load a tape
66S     WCAS       Save a tape
67W     BP1/2      Set a breakpoint
68R     REG        View/Set registers
69X     PC         Go
70+pad  +          Enter data and do next thing
71-pad  -          Decrement
72-     MEM        Specify an address
730-9   0-9        Hex digits
74A-F   A-F        Hex digits
75
76Keyboard layout when using the Monitor on real hardware (n/a = key not assigned)
77
78n/a    RCAS  WCAS  C    D  E  F
79Start  BP1/2 REG   8    9  A  B
80n/a    PC    MEM   4    5  6  7
81Reset  -     +     0    1  2  3
82
83This wouldn't fit too well on our keyboard with any chance of remembering
84it, so I've hooked it much the same as the Instructor.
85
86The Select key (Z) and the joystick don't actually exist, but I've left them
87in the keyboard matrix for now.
88
5889******************************************************************************/
5990
6091#include "includes/vc4000.h"
r15279r15280
96127   logerror("Write to sound control register offset= %d value= %d\n", offset, data);
97128}
98129
130// Write cassette - Address 0x1DFF
131WRITE8_MEMBER( vc4000_state::elektor_cass_w )
132{
133   m_cass->output(BIT(data, 7) ? -1.0 : +1.0);
134}
99135
136// Read cassette - Address 0x1DBF
137READ8_MEMBER( vc4000_state::elektor_cass_r )
138{
139   return (m_cass->input() > 0.03) ? 0xff : 0x7f;
140}
141
100142static ADDRESS_MAP_START( vc4000_mem, AS_PROGRAM, 8, vc4000_state )
101143   ADDRESS_MAP_UNMAP_HIGH
102144   ADDRESS_MAP_GLOBAL_MASK(0x1fff)
r15279r15280
114156   ADDRESS_MAP_GLOBAL_MASK(0x1fff)
115157   AM_RANGE(0x0000, 0x07ff) AM_ROM
116158   AM_RANGE(0x0800, 0x0fff) AM_RAM
117   AM_RANGE(0x1680, 0x16ff) AM_READWRITE(vc4000_key_r, vc4000_sound_ctl) AM_MIRROR(0x0800)
118   AM_RANGE(0x1700, 0x17ff) AM_READWRITE(vc4000_video_r, vc4000_video_w) AM_MIRROR(0x0800)
159   //AM_RANGE(0x1000, 0x15ff) AM_RAM  ram extension area
160   AM_RANGE(0x1d80, 0x1dff) AM_MIRROR(0x400) AM_READWRITE(elektor_cass_r,elektor_cass_w)
161   AM_RANGE(0x1e80, 0x1e8f) AM_MIRROR(0x800) AM_READWRITE(vc4000_key_r,vc4000_sound_ctl)
162   AM_RANGE(0x1f00, 0x1fff) AM_MIRROR(0x800) AM_READWRITE(vc4000_video_r, vc4000_video_w)
119163ADDRESS_MAP_END
120164
121165static INPUT_PORTS_START( vc4000 )
r15279r15280
186230#endif
187231INPUT_PORTS_END
188232
233INPUT_PORTS_START( elektor )
234   PORT_START("PANEL")
235   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Start") PORT_CODE(KEYCODE_Q)
236   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Game Select") PORT_CODE(KEYCODE_Z)
237
238   PORT_START("KEYPAD1_1")
239   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("RCAS") PORT_CODE(KEYCODE_L)
240   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("BP1/2") PORT_CODE(KEYCODE_W)
241   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("PC") PORT_CODE(KEYCODE_X)
242   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS_PAD)
243
244   PORT_START("KEYPAD1_2")
245   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("WCAS") PORT_CODE(KEYCODE_S)
246   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("REG") PORT_CODE(KEYCODE_R)
247   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("MEM") PORT_CODE(KEYCODE_MINUS)
248   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("+") PORT_CODE(KEYCODE_PLUS_PAD)
249
250   PORT_START("KEYPAD1_3")
251   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("C") PORT_CODE(KEYCODE_C)
252   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("8") PORT_CODE(KEYCODE_8)
253   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("4") PORT_CODE(KEYCODE_4)
254   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("0") PORT_CODE(KEYCODE_0)
255
256   PORT_START("KEYPAD2_1")
257   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("D") PORT_CODE(KEYCODE_D)
258   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("9") PORT_CODE(KEYCODE_9)
259   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("5") PORT_CODE(KEYCODE_5)
260   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("1") PORT_CODE(KEYCODE_1)
261
262   PORT_START("KEYPAD2_2")
263   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("E") PORT_CODE(KEYCODE_E)
264   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("A") PORT_CODE(KEYCODE_A)
265   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("6") PORT_CODE(KEYCODE_6)
266   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("2") PORT_CODE(KEYCODE_2)
267
268   PORT_START("KEYPAD2_3")
269   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("F") PORT_CODE(KEYCODE_F)
270   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("B") PORT_CODE(KEYCODE_B)
271   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("7") PORT_CODE(KEYCODE_7)
272   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("3") PORT_CODE(KEYCODE_3)
273#ifndef ANALOG_HACK
274    // auto centering too slow, so only using 5 bits, and scaling at videoside
275    PORT_START("JOY1_X")
276PORT_BIT(0xff,0x70,IPT_AD_STICK_X) PORT_SENSITIVITY(70) PORT_KEYDELTA(5) PORT_CENTERDELTA(0) PORT_MINMAX(20,225) PORT_CODE_DEC(KEYCODE_LEFT) PORT_CODE_INC(KEYCODE_RIGHT) PORT_CODE_DEC(JOYCODE_X_LEFT_SWITCH) PORT_CODE_INC(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(1)
277    PORT_START("JOY1_Y")
278PORT_BIT(0xff,0x70,IPT_AD_STICK_Y) PORT_SENSITIVITY(70) PORT_KEYDELTA(5) PORT_CENTERDELTA(0) PORT_MINMAX(20,225) PORT_CODE_DEC(KEYCODE_UP) PORT_CODE_INC(KEYCODE_DOWN) PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH) PORT_CODE_INC(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(1)
279    PORT_START("JOY2_X")
280PORT_BIT(0xff,0x70,IPT_AD_STICK_X) PORT_SENSITIVITY(70) PORT_KEYDELTA(5) PORT_CENTERDELTA(0) PORT_MINMAX(20,225) PORT_CODE_DEC(KEYCODE_DEL) PORT_CODE_INC(KEYCODE_PGDN) PORT_CODE_DEC(JOYCODE_X_LEFT_SWITCH) PORT_CODE_INC(JOYCODE_X_RIGHT_SWITCH) PORT_PLAYER(2)
281    PORT_START("JOY2_Y")
282PORT_BIT(0xff,0x70,IPT_AD_STICK_Y) PORT_SENSITIVITY(70) PORT_KEYDELTA(5) PORT_CENTERDELTA(0) PORT_MINMAX(20,225) PORT_CODE_DEC(KEYCODE_HOME) PORT_CODE_INC(KEYCODE_END) PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH) PORT_CODE_INC(JOYCODE_Y_DOWN_SWITCH) PORT_PLAYER(2)
283#else
284   PORT_START("JOYS")
285   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
286   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
287   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
288   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
289   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CODE(KEYCODE_DEL) PORT_PLAYER(2)
290   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CODE(KEYCODE_PGDN) PORT_PLAYER(2)
291   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CODE(KEYCODE_END) PORT_PLAYER(2)
292   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CODE(KEYCODE_HOME) PORT_PLAYER(2)
293
294   PORT_START("CONFIG")
295   PORT_CONFNAME( 0x01, 0x00, "Treat Joystick as...")
296   PORT_CONFSETTING(    0x00, "Buttons")
297   PORT_CONFSETTING(    0x01, "Paddle")
298#endif
299INPUT_PORTS_END
300
189301static const rgb_t vc4000_palette[] =
190302{
191303   // background colors
r15279r15280
300412static MACHINE_CONFIG_DERIVED( elektor, vc4000 )
301413   MCFG_CPU_MODIFY("maincpu")
302414   MCFG_CPU_PROGRAM_MAP(elektor_mem)
415   MCFG_CASSETTE_ADD( CASSETTE_TAG, default_cassette_interface )
416   MCFG_SOUND_WAVE_ADD(WAVE_TAG, CASSETTE_TAG)
417   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
303418MACHINE_CONFIG_END
304419
305420ROM_START( vc4000 )
r15279r15280
404519   address_space *space = image.device().machine().device("maincpu")->memory().space(AS_PROGRAM);
405520   int i;
406521   int quick_addr = 0x08c0;
522   int exec_addr;
407523   int quick_length;
408524   UINT8 *quick_data;
409525   int read_;
r15279r15280
421537      return IMAGE_INIT_FAIL;
422538
423539   quick_addr = quick_data[1] * 256 + quick_data[2];
540   exec_addr = quick_data[3] * 256 + quick_data[4];
424541
425542   //if ((quick_addr + quick_length - 5) > 0x1000)
426543   //  return IMAGE_INIT_FAIL;
r15279r15280
433550         space->write_byte(i + quick_addr, quick_data[i+5]);
434551   }
435552
436   logerror("quick loading at %.4x size:%.4x\n", quick_addr, (quick_length-5));
553   /* display a message about the loaded quickload */
554   image.message(" Quickload: size=%04X : start=%04X : end=%04X : exec=%04X",quick_length-5,quick_addr,quick_addr+quick_length-5,exec_addr);
555
556   // Start the quickload (only does something on Elektor)
557   cpu_set_reg(image.device().machine().device("maincpu"), STATE_GENPC, exec_addr);
437558   return IMAGE_INIT_PASS;
438559}
439560
r15279r15280
462583CONS(1979, krvnjvtv, 0,         vc4000,   vc4000,    vc4000,      0,        "SOE",              "OC Jeu Video TV Karvan", GAME_IMPERFECT_GRAPHICS )    /* France */
463584CONS(1979, oc2000,   krvnjvtv,  0,        vc4000,    vc4000,      0,        "SOE",              "OC-2000",          GAME_IMPERFECT_GRAPHICS )          /* France */
464585CONS(1980, mpt05,    0,         vc4000,   vc4000,    vc4000,      0,        "ITMC",             "MPT-05",           GAME_IMPERFECT_GRAPHICS )          /* France */
465COMP(1979, elektor,  0,         0,        elektor,   vc4000,      0,        "Elektor",          "Elektor TV Games Computer", GAME_NOT_WORKING )
586COMP(1979, elektor,  0,         0,        elektor,   elektor,     0,        "Elektor",          "Elektor TV Games Computer", GAME_IMPERFECT_GRAPHICS )
466587
467588/*  Game List and Emulation Status
468589

Previous 15994 Revisions Next


© 1998-2018 The MESS Team