Previous 199869 Revisions Next

r22559 Friday 26th April, 2013 at 12:59:44 UTC by Robbbert
(MESS) Ravens: added cassette (not working) and quickload.
cd2650: added note
instruct: added part of the interrupt block
[src/mess/drivers]cd2650.c instruct.c ravens.c

trunk/src/mess/drivers/instruct.c
r22558r22559
4343      not in the matrix, but are connected to hardware directly. This needs
4444      to be emulated. (SENS key done)
4545    - Connect 10 toggle switches and 10 round red leds.
46    - Hook up the Interrupt Block unit (no info available).
4647
4748****************************************************************************/
4849
r22558r22559
5960   instruct_state(const machine_config &mconfig, device_type type, const char *tag)
6061      : driver_device(mconfig, type, tag),
6162   m_maincpu(*this, "maincpu"),
62   m_p_ram(*this, "p_ram"),
63   m_p_loram(*this, "loram"),
64   m_p_hiram(*this, "hiram"),
6365   m_cass(*this, "cassette")
6466   { }
6567
r22558r22559
7173   DECLARE_WRITE8_MEMBER(portf9_w);
7274   DECLARE_WRITE8_MEMBER(portfa_w);
7375   DECLARE_QUICKLOAD_LOAD_MEMBER( instruct );
76   INTERRUPT_GEN_MEMBER(t2l_int);
7477   virtual void machine_reset();
7578   UINT8 m_digit;
7679   bool m_valid_digit;
7780   required_device<cpu_device> m_maincpu;
78   required_shared_ptr<UINT8> m_p_ram;
81   required_shared_ptr<UINT8> m_p_loram;
82   required_shared_ptr<UINT8> m_p_hiram;
7983   required_device<cassette_image_device> m_cass;
8084};
8185
r22558r22559
139143   return ( (m_cass->input() > 0.03) ? 1 : 0) | (ioport("HW")->read() & 1);
140144}
141145
146INTERRUPT_GEN_MEMBER( instruct_state::t2l_int )
147{
148   device.execute().set_input_line_and_vector(0, HOLD_LINE, 0x2e); // unknown vector, guess
149}
150
142151static ADDRESS_MAP_START( instruct_mem, AS_PROGRAM, 8, instruct_state )
143152   ADDRESS_MAP_UNMAP_HIGH
144   AM_RANGE(0x0000, 0x01ff) AM_RAM AM_SHARE("p_ram") // 512 bytes onboard ram
153   AM_RANGE(0x0000, 0x01ff) AM_RAM AM_SHARE("loram") // 512 bytes onboard ram
145154   AM_RANGE(0x0200, 0x177f) AM_RAM // expansion ram needed by quickloads
146155   AM_RANGE(0x1780, 0x17ff) AM_RAM // 128 bytes in s2656 chip
147   AM_RANGE(0x1800, 0x1fff) AM_ROM
156   AM_RANGE(0x1800, 0x1fff) AM_RAM AM_SHARE("hiram")
148157ADDRESS_MAP_END
149158
150159static ADDRESS_MAP_START( instruct_io, AS_IO, 8, instruct_state )
r22558r22559
212221
213222void instruct_state::machine_reset()
214223{
215   // copy the roms into ram so it can boot
216   UINT8* ROM = memregion("maincpu")->base();
217   memcpy(m_p_ram, ROM+0x1800, 0x0200);
224   UINT8* rom = memregion("user1")->base();
225   memcpy(m_p_loram, rom, 0x200);
226   memcpy(m_p_hiram, rom, 0x800);
227   m_maincpu->reset();
218228}
219229
220230QUICKLOAD_LOAD_MEMBER( instruct_state, instruct )
r22558r22559
292302   MCFG_CPU_ADD("maincpu",S2650, XTAL_3_579545MHz / 4)
293303   MCFG_CPU_PROGRAM_MAP(instruct_mem)
294304   MCFG_CPU_IO_MAP(instruct_io)
305   MCFG_CPU_PERIODIC_INT_DRIVER(instruct_state, t2l_int, 50)
295306
296307   /* video hardware */
297308   MCFG_DEFAULT_LAYOUT(layout_instruct)
r22558r22559
308319
309320/* ROM definition */
310321ROM_START( instruct )
311   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
312   ROM_LOAD( "instruct.rom", 0x1800, 0x0800, CRC(131715a6) SHA1(4930b87d09046113ab172ba3fb31f5e455068ec7) )
322   ROM_REGION( 0x0800, "user1", ROMREGION_ERASEFF )
323   ROM_LOAD( "instruct.rom", 0x0000, 0x0800, CRC(131715a6) SHA1(4930b87d09046113ab172ba3fb31f5e455068ec7) )
313324ROM_END
314325
315326/* Driver */
trunk/src/mess/drivers/ravens.c
r22558r22559
1212
1313No instructions, no schematics - it's all guesswork.
1414
15The cassette saves a noise but it returns a bad load.
1516
17
1618Version 0.9
1719-----------
1820Hardware:
r22558r22559
2426The few photos show the CPU and a number of ordinary 74LSxxx chips.
2527There is a XTAL of unknown frequency.
2628
27There is a cassette interface..
28
2929The buttons are labelled CMD, RUN, GOTO, RST, F, MON, PC, NXT but at
3030this time not all buttons are identified.
3131
r22558r22559
4040-- E examine tape file
4141-- F fetch (load) from tape
4242
43Quickload: Load the program then press Y. There are 6 that work and
44           6 that do nothing.
45
4346ToDo:
4447- Fix display of 8 round leds
4548- Cassette
r22558r22559
4750Version V2.0
4851------------
4952This used a terminal interface with a few non-standard control codes.
50The pushbuttons and LEDs appear to have been done away with.
53The pushbuttons and LEDs appear to have been done away with. The list
54is the same as on the CD2650.
5155
5256Commands (must be in uppercase):
5357A    Examine memory; press C to alter memory
5458B    Set breakpoint?
5559C    View breakpoint?
56D    Dump to screen
60D    Dump to screen and tape (at the same time)
5761E    Execute
5862I    ?
5963L    Load
6064R    ?
61V    ?
65V    Verify?
6266
6367ToDo:
6468- Cassette
r22558r22559
6771
6872#include "emu.h"
6973#include "cpu/s2650/s2650.h"
74#include "imagedev/cassette.h"
75#include "imagedev/snapquik.h"
7076#include "machine/terminal.h"
77#include "sound/wave.h"
7178#include "ravens.lh"
7279
7380
r22558r22559
7784   ravens_state(const machine_config &mconfig, device_type type, const char *tag)
7885      : driver_device(mconfig, type, tag),
7986      m_maincpu(*this, "maincpu"),
80      m_terminal(*this, TERMINAL_TAG)
81   { }
87      m_terminal(*this, TERMINAL_TAG),
88      m_cass(*this, "cassette") { }
8289
8390   DECLARE_READ8_MEMBER(port07_r);
8491   DECLARE_READ8_MEMBER(port17_r);
r22558r22559
8895   DECLARE_WRITE8_MEMBER(leds_w);
8996   DECLARE_WRITE8_MEMBER(kbd_put);
9097   DECLARE_MACHINE_RESET(ravens2);
98   DECLARE_READ8_MEMBER(cass_r);
99   DECLARE_WRITE8_MEMBER(cass_w);
100   DECLARE_QUICKLOAD_LOAD_MEMBER( ravens );
91101   UINT8 m_term_char;
92102   UINT8 m_term_data;
93103   required_device<cpu_device> m_maincpu;
94104   optional_device<generic_terminal_device> m_terminal;
105   required_device<cassette_image_device> m_cass;
95106};
96107
108WRITE8_MEMBER( ravens_state::cass_w )
109{
110   m_cass->output(BIT(data, 0) ? -1.0 : +1.0);
111}
112
113READ8_MEMBER( ravens_state::cass_r )
114{
115   return (m_cass->input() > 0.03) ? 1 : 0;
116}
117
97118WRITE8_MEMBER( ravens_state::display_w )
98119{
99120   output_set_digit_value(offset, data);
r22558r22559
173194   ADDRESS_MAP_UNMAP_HIGH
174195   AM_RANGE( 0x0000, 0x07ff) AM_ROM
175196   AM_RANGE( 0x0800, 0x1fff) AM_RAM
197   AM_RANGE( 0x2000, 0x7FFF) AM_RAM // for quickload, optional
176198ADDRESS_MAP_END
177199
178200static ADDRESS_MAP_START( ravens_io, AS_IO, 8, ravens_state )
r22558r22559
180202   AM_RANGE(0x09, 0x09) AM_WRITE(leds_w) // LED output port
181203   AM_RANGE(0x10, 0x15) AM_WRITE(display_w) // 6-led display
182204   AM_RANGE(0x17, 0x17) AM_READ(port17_r) // pushbuttons
183   //AM_RANGE(S2650_SENSE_PORT, S2650_FO_PORT) AM_READWRITE(ravens_cass_in,ravens_cass_out)
184   AM_RANGE(0x102, 0x103) AM_NOP // stops error log filling up while using debug
205   AM_RANGE(S2650_SENSE_PORT, S2650_FO_PORT) AM_READWRITE(cass_r,cass_w)
185206ADDRESS_MAP_END
186207
187208static ADDRESS_MAP_START( ravens2_io, AS_IO, 8, ravens_state )
r22558r22559
189210   AM_RANGE(0x07, 0x07) AM_READ(port07_r)
190211   AM_RANGE(0x1b, 0x1b) AM_WRITE(port1b_w)
191212   AM_RANGE(0x1c, 0x1c) AM_WRITE(port1c_w)
192   //AM_RANGE(S2650_SENSE_PORT, S2650_FO_PORT) AM_READWRITE(ravens_cass_in,ravens_cass_out)
193   AM_RANGE(0x102, 0x103) AM_NOP // stops error log filling up while using debug
213   AM_RANGE(S2650_SENSE_PORT, S2650_FO_PORT) AM_READWRITE(cass_r,cass_w)
194214ADDRESS_MAP_END
195215
196216/* Input ports */
r22558r22559
237257   DEVCB_DRIVER_MEMBER(ravens_state, kbd_put)
238258};
239259
260QUICKLOAD_LOAD_MEMBER( ravens_state, ravens )
261{
262   address_space &space = m_maincpu->space(AS_PROGRAM);
263   int i;
264   int quick_addr = 0x100;
265   int exec_addr;
266   int quick_length;
267   UINT8 *quick_data;
268   int read_;
269
270   quick_length = image.length();
271   quick_data = (UINT8*)malloc(quick_length);
272   if (!quick_data)
273   {
274      image.seterror(IMAGE_ERROR_INVALIDIMAGE, "Cannot open file");
275      image.message(" Cannot open file");
276      return IMAGE_INIT_FAIL;
277   }
278
279   read_ = image.fread( quick_data, quick_length);
280   if (read_ != quick_length)
281   {
282      image.seterror(IMAGE_ERROR_INVALIDIMAGE, "Cannot read the file");
283      image.message(" Cannot read the file");
284      return IMAGE_INIT_FAIL;
285   }
286
287   if (quick_data[0] != 0xc6)
288   {
289      image.seterror(IMAGE_ERROR_INVALIDIMAGE, "Invalid header");
290      image.message(" Invalid header");
291      return IMAGE_INIT_FAIL;
292   }
293
294   exec_addr = quick_data[1] * 256 + quick_data[2];
295
296   if (exec_addr >= quick_length)
297   {
298      image.seterror(IMAGE_ERROR_INVALIDIMAGE, "Exec address beyond end of file");
299      image.message(" Exec address beyond end of file");
300      return IMAGE_INIT_FAIL;
301   }
302
303   if (quick_length < 0x0900)
304   {
305      image.seterror(IMAGE_ERROR_INVALIDIMAGE, "File too short");
306      image.message(" File too short");
307      return IMAGE_INIT_FAIL;
308   }
309
310   if (quick_length > 0x8000)
311   {
312      image.seterror(IMAGE_ERROR_INVALIDIMAGE, "File too long");
313      image.message(" File too long");
314      return IMAGE_INIT_FAIL;
315   }
316
317//   read_ = 0x1000;
318//   if (quick_length < 0x1000)
319//      read_ = quick_length;
320
321   for (i = quick_addr; i < read_; i++)
322      space.write_byte(i, quick_data[i]);
323
324//   read_ = 0x1780;
325//   if (quick_length < 0x1780)
326//      read_ = quick_length;
327
328//   if (quick_length > 0x157f)
329//      for (i = 0x1580; i < read_; i++)
330//         space.write_byte(i, quick_data[i]);
331
332//   if (quick_length > 0x17ff)
333//      for (i = 0x1800; i < quick_length; i++)
334//         space.write_byte(i, quick_data[i]);
335
336   /* display a message about the loaded quickload */
337   image.message(" Quickload: size=%04X : exec=%04X",quick_length,exec_addr);
338
339   // Start the quickload
340   m_maincpu->set_pc(exec_addr);
341   return IMAGE_INIT_PASS;
342}
343
240344static MACHINE_CONFIG_START( ravens, ravens_state )
241345   /* basic machine hardware */
242346   MCFG_CPU_ADD("maincpu",S2650, XTAL_1MHz) // frequency is unknown
r22558r22559
245349
246350   /* video hardware */
247351   MCFG_DEFAULT_LAYOUT(layout_ravens)
352
353   /* quickload */
354   MCFG_QUICKLOAD_ADD("quickload", ravens_state, ravens, "pgm", 1)
355
356   /* cassette */
357   MCFG_CASSETTE_ADD( "cassette", default_cassette_interface )
358   MCFG_SPEAKER_STANDARD_MONO("mono")
359   MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
360   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
248361MACHINE_CONFIG_END
249362
250363static MACHINE_CONFIG_START( ravens2, ravens_state )
r22558r22559
256369
257370   /* video hardware */
258371   MCFG_GENERIC_TERMINAL_ADD(TERMINAL_TAG, terminal_intf)
372
373   /* cassette */
374   MCFG_CASSETTE_ADD( "cassette", default_cassette_interface )
375   MCFG_SPEAKER_STANDARD_MONO("mono")
376   MCFG_SOUND_WAVE_ADD(WAVE_TAG, "cassette")
377   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
259378MACHINE_CONFIG_END
260379
261380/* ROM definition */
r22558r22559
272391/* Driver */
273392
274393/*    YEAR  NAME     PARENT   COMPAT   MACHINE  INPUT   CLASS        INIT     COMPANY    FULLNAME       FLAGS */
275COMP( 1985, ravens,  0,       0,       ravens,  ravens, driver_device, 0, "Joseph Glagla and Dieter Feiler", "Ravensburger Selbstbaucomputer V0.9", GAME_NOT_WORKING | GAME_NO_SOUND_HW )
394COMP( 1984, ravens,  0,       0,       ravens,  ravens, driver_device, 0, "Joseph Glagla and Dieter Feiler", "Ravensburger Selbstbaucomputer V0.9", GAME_NOT_WORKING | GAME_NO_SOUND_HW )
276395COMP( 1985, ravens2, ravens,  0,       ravens2, ravens, driver_device, 0, "Joseph Glagla and Dieter Feiler", "Ravensburger Selbstbaucomputer V2.0", GAME_NOT_WORKING | GAME_NO_SOUND_HW )
trunk/src/mess/drivers/cd2650.c
r22558r22559
88        The system only uses 1000-14FF for videoram and 17F0-17FF for
99        scratch ram. All other ram is optional.
1010
11        All commands must be in upper case. They are A,B,C,D,E,I,L,R,V.
12        L,D,V appear to be commands to load, dump and verify tapes.
13        The in and output lines for tapes are SENSE and FLAG, which is
14        the usual with S2650 systems. The remaining commands have
15        unknown functions.
11        All commands must be in upper case. See the RAVENS2 driver for
12        a list of the monitor commands. Some commands have slightly different
13        numeric inputs, and the D command doesn't seem to work.
1614
1715        TODO
1816        - Lots, probably. The computer is a complete mystery. No pictures,

Previous 199869 Revisions Next


© 1997-2024 The MAME Team