Previous 15994 Revisions Next

r6502 Wednesday 2nd December, 2009 at 15:36:31 UTC by Curt Coder
[XOR100] Added terminal support, promoted to working.
[docs]messnew.txt
[src/mess/drivers]xor100.c
[src/mess/machine]msm8251.c msm8251.h

src/mess/machine/msm8251.c
r6501r6502
6262    PROTOTYPES
6363***************************************************************************/
6464
65static void msm8251_receive_character(const device_config *device, UINT8 ch);
6665static void msm8251_in_callback(running_machine *machine, int id, unsigned long state);
6766static void msm8251_update_tx_empty(const device_config *device);
6867static void msm8251_update_tx_ready(const device_config *device);
r6501r6502
721720    bit of data has been received
722721-------------------------------------------------*/
723722
724static void msm8251_receive_character(const device_config *device, UINT8 ch)
723void msm8251_receive_character(const device_config *device, UINT8 ch)
725724{
726725   msm8251_t *uart = get_token(device);
727726
src/mess/machine/msm8251.h
r6501r6502
8383void msm8251_connect_to_serial_device(const device_config *device, const device_config *image);
8484void msm8251_connect(const device_config *device, struct serial_connection *other_connection);
8585
86void msm8251_receive_character(const device_config *device, UINT8 ch);
87
8688#endif /* __MSM8251_H__ */
src/mess/drivers/xor100.c
r6501r6502
22
33        XOR S-100-12
44
5        12/05/2009 Skeleton driver.
6
7    Execution of this monitor rom starts at F800.
8
9    I/O sequence:   read 0A, discard result
10            read 0B, output result to 0B
11            send the sequence AA 40 4E 37 to 01, then to 03 (programming a device?)
12            L1:read 03 to see if display device is ready
13            write ascii character to 02 goto L1 until signon message is displayed
14            in same fashion display top of memory (F800)
15            display prompt character (*) wait for input
16            read 03 to see if a key is being input, if so read 02 and display it
17            if illegal input, display ? then display prompt on a new line
18
19    To summarise:   out 01 and out 03 - program a device
20            out 02 - display a character
21            in 02 - read character from keyboard
22            in 03 - get busy status of display (bit 0) and keyboard (bit 1) High=ready
23
245*****************************************************************************************************/
256
267/*
278
289    TODO:
2910
30    - terminal
31    - keyboard
3211    - ROM should be mirrored every 2K at boot
3312    - 2/4 MHz jumper J2
3413    - floppy
3514    - memory expansion
3615    - COM5016
37    - CTC
16    - CTC signals
3817
3918*/
4019
r6501r6502
4726#include "machine/com8116.h"
4827#include "machine/i8255a.h"
4928#include "machine/msm8251.h"
29#include "machine/terminal.h"
5030#include "machine/wd17xx.h"
5131#include "machine/z80ctc.h"
5232#include "devices/messram.h"
r6501r6502
7252
7353static READ8_HANDLER( prom_disable_r )
7454{
75   memory_install_readwrite8_handler(space, 0x0000, 0xf7ff, 0, 0, SMH_BANK(1), SMH_BANK(2));
55   const address_space *program = cputag_get_address_space(space->machine, Z80_TAG, ADDRESS_SPACE_PROGRAM);
56
57   memory_install_readwrite8_handler(program, 0x0000, 0xf7ff, 0, 0, SMH_BANK(1), SMH_BANK(2));
7658   memory_set_bank(space->machine, 1, 1);
7759
7860   return 0xff;
r6501r6502
8466   com8116_stt_w(device, 0, data >> 4);
8567}
8668
69static WRITE8_DEVICE_HANDLER( i8251_b_data_w )
70{
71   const device_config   *terminal = devtag_get_device(device->machine, "terminal");
72   
73   msm8251_data_w(device, 0, data);
74   terminal_write(terminal, 0, data);
75}
76
8777/* Memory Maps */
8878
8979static ADDRESS_MAP_START( xor100_mem, ADDRESS_SPACE_PROGRAM, 8 )
r6501r6502
9787   ADDRESS_MAP_GLOBAL_MASK(0xff)
9888   AM_RANGE(0x00, 0x00) AM_DEVREADWRITE(I8251_A_TAG, msm8251_data_r, msm8251_data_w)
9989   AM_RANGE(0x01, 0x01) AM_DEVREADWRITE(I8251_A_TAG, msm8251_status_r, msm8251_control_w)
100   AM_RANGE(0x02, 0x02) AM_DEVREADWRITE(I8251_B_TAG, msm8251_data_r, msm8251_data_w)
90   AM_RANGE(0x02, 0x02) AM_DEVREADWRITE(I8251_B_TAG, msm8251_data_r, i8251_b_data_w)
10191   AM_RANGE(0x03, 0x03) AM_DEVREADWRITE(I8251_B_TAG, msm8251_status_r, msm8251_control_w)
10292   AM_RANGE(0x04, 0x07) AM_DEVREADWRITE(I8255A_TAG, i8255a_r, i8255a_w)
10393   AM_RANGE(0x08, 0x08) AM_WRITE(mmu_w)
r6501r6502
110100/* Input Ports */
111101
112102static INPUT_PORTS_START( xor100 )
103   PORT_INCLUDE(generic_terminal)
104
113105   PORT_START("DSW0")
114106   PORT_DIPNAME( 0x0f, 0x05, "Serial Port A" )
115107   PORT_DIPSETTING(    0x00, "50 baud" )
r6501r6502
147139   PORT_DIPSETTING(    0xf0, "19200 baud" )
148140INPUT_PORTS_END
149141
150/* Video */
151
152static VIDEO_START( xor100 )
153{
154}
155
156static VIDEO_UPDATE( xor100 )
157{
158    return 0;
159}
160
161142/* COM5016 Interface */
162143
163144static WRITE_LINE_DEVICE_HANDLER( com5016_fr_w )
r6501r6502
244225{
245226   DEVCB_NULL,
246227   DEVCB_NULL,
247   {FLOPPY_0, FLOPPY_1, NULL, NULL}
228   { FLOPPY_0, FLOPPY_1, NULL, NULL }
248229};
249230
231/* Terminal Interface */
232
233static WRITE8_DEVICE_HANDLER( xor100_kbd_put )
234{
235   xor100_state *state = device->machine->driver_data;
236
237   msm8251_receive_character(state->i8251_b, data);
238}
239
240static GENERIC_TERMINAL_INTERFACE( xor100_terminal_intf )
241{
242   DEVCB_HANDLER(xor100_kbd_put)
243};
244
250245/* Machine Initialization */
251246
252247static MACHINE_START( xor100 )
r6501r6502
328323    MDRV_MACHINE_RESET(xor100)
329324
330325    /* video hardware */
331    MDRV_SCREEN_ADD(SCREEN_TAG, RASTER)
332    MDRV_SCREEN_REFRESH_RATE(50)
333    MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
334    MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
335    MDRV_SCREEN_SIZE(640, 480)
336    MDRV_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
337    MDRV_PALETTE_LENGTH(2)
338    MDRV_PALETTE_INIT(black_and_white)
326   MDRV_IMPORT_FROM( generic_terminal )   
339327
340    MDRV_VIDEO_START(xor100)
341    MDRV_VIDEO_UPDATE(xor100)
342
343328   /* devices */
344329   MDRV_MSM8251_ADD(I8251_A_TAG, /*XTAL_8MHz/2,*/ printer_8251_intf)
345330   MDRV_MSM8251_ADD(I8251_B_TAG, /*XTAL_8MHz/2,*/ terminal_8251_intf)
346331   MDRV_I8255A_ADD(I8255A_TAG, printer_8255_intf)
347332   MDRV_Z80CTC_ADD(Z80CTC_TAG, XTAL_8MHz/2, ctc_intf)
348333   MDRV_COM8116_ADD(COM5016_TAG, 5000000, com5016_intf) // COM5016
349   MDRV_WD179X_ADD(WD1795_TAG, /*XTAL_8MHz/8,*/ wd1795_intf ) // WD1795-02
334   MDRV_WD179X_ADD(WD1795_TAG, /*XTAL_8MHz/8,*/ wd1795_intf) // WD1795-02
350335   MDRV_FLOPPY_2_DRIVES_ADD(xor100_floppy_config)
351
352336   MDRV_CASSETTE_ADD(CASSETTE_TAG, xor100_cassette_config)
337   MDRV_GENERIC_TERMINAL_ADD("terminal", xor100_terminal_intf) 
353338   
354339   /* internal ram */
355340   MDRV_RAM_ADD("messram")
r6501r6502
363348   ROM_LOAD( "xp 185.8b", 0xf800, 0x0800, CRC(0d0bda8d) SHA1(11c83f7cd7e6a570641b44a2f2cc5737a7dd8ae3) )
364349ROM_END
365350
366
367351/* System Drivers */
368352
369/*    YEAR  NAME        PARENT  COMPAT  MACHINE     INPUT       INIT    CONFIG      COMPANY                 FULLNAME        FLAGS */
370COMP( 1982, xor100,      0,      0,      xor100,      xor100,      0,      0,      "Xor Data Science",      "XOR S-100-12",   GAME_NOT_WORKING )
353/*    YEAR  NAME        PARENT  COMPAT  MACHINE     INPUT       INIT    CONFIG  COMPANY                 FULLNAME        FLAGS */
354COMP( 1982, xor100,      0,      0,      xor100,      xor100,      0,      0,      "Xor Data Science",      "XOR S-100-12",   0 )
docs/messnew.txt
r6501r6502
110.135.1
22
3New System Drivers Supported (in no particular order):
4------------------------------------------------------
3New System Drivers Supported:
4-----------------------------
5- Elektor SC/MP [Miodrag Milanovic]
6- Hawthorne Technologies TinyGiant HT68k [Miodrag Milanovic]
57- Hector MX40c [JJ Stacino]
68- Hector MX80c [JJ Stacino]
79- Microsystems International Limited MOD-8 [Miodrag Milanovic]
810- Science of Cambridge MK-14 [Miodrag Milanovic]
911- Robotron K1003 [Miodrag Milanovic]
10- Elektor SC/MP [Miodrag Milanovic]
11- Hawthorne Technologies TinyGiant HT68k [Miodrag Milanovic]
1212
13
14
1315Systems Promoted from GAME_NOT_WORKING:
1416---------------------------------------
1517- Ausbaufähiger Mikrocomputer mit dem U 880 (Huebler/Everts) [Curt Coder]
r6501r6502
1719- Hector 2HR [JJ Stacino]
1820- Hector HRX [JJ Stacino]
1921- Victor [JJ Stacino]
22- XOR S-100-12 [Curt Coder]
2023
2124
2225
r6501r6502
6063- [TI99] Fixed a crash when the user mounts cartridge dump files in legacy
6164  mode.  [Michael Zapf]
6265
66- [XOR100] Added terminal support. [Curt Coder]
6367
6468
69
6570Imgtool Changes:
6671----------------
6772(none)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team