Previous 15994 Revisions Next

r8673 Sunday 1st August, 2010 at 08:17:49 UTC by Jonathan Gevaryahu
Comment updates for zexall driver to clarify
[src/mess/drivers]zexall.c

src/mess/drivers/zexall.c
r8672r8673
11/******************************************************************************
22*
3*  Bare bones 'self contained' zexall test driver
3*  Self Contained zexall 'Z80 instruction exercizer' test driver
44*  By Jonathan Gevaryahu AKA Lord Nightmare
5*  Binary supplied by Blargg
6*  with help from Kevin 'kevtris' Horton (wrote preloader at 0000-00ff which implements the fffd-ffff serial stuff)
5*  Zexall originally written by Frank Cringle for ZX Spectrum
6*  Modularized Spectrum-independent Zexall binary supplied by Blargg
7*  Serial interface binary/preloader at 0x0000-0x00FF written by Kevin 'kevtris' Horton
78*
89*
910* mem map:
1011Ram 0000-FFFF (preloaded with binary)
11Special calls take place for three ram values:
12FFFD - shared ram with output device; z80 reads from here and considers the byte at FFFF read if this value incremented
13FFFE - shared ram with output device; z80 writes an incrementing value to FFFD if there is a byte waiting at FFFF until FFFD is incremented
14FFFF - shared ram with output device; z80 writes data to be sent to output device here
12Special calls take place for three ram values (this interface was designed by kevtris):
13FFFD - 'ack' - shared ram with output device; z80 reads from here and considers the byte at FFFF read if this value incremented
14FFFE - 'req' - shared ram with output device; z80 writes an incrementing value to FFFE to indicate that there is a byte waiting at FFFF and hence requesting the output device on the other end do something about it, until FFFD is incremented by the output device to acknowledge reciept
15FFFF - 'data' - shared ram with output device; z80 writes the data to be sent to output device here
1516One i/o port is used:
16170001 - bit 0 controls whether interrupt timer is enabled (1) or not (0), this is a holdover from a project of kevtris' and can be ignored.
1718
r8672r8673
2021/* Core includes */
2122#include "emu.h"
2223#include "cpu/z80/z80.h"
23//#include "dectalk.lh" //  hack to avoid screenless system crash
2424#include "machine/terminal.h"
2525
2626/* Defines */
r8672r8673
3030
3131static struct
3232{
33UINT8 data[8]; // what is this for? to suppress the scalar initializer warning?
34UINT8 out_data;
35UINT8 out_req;
36UINT8 out_req_last;
37UINT8 out_ack;
33   UINT8 data[8]; // unused; to suppress the scalar initializer warning
34   UINT8 out_data; // byte written to 0xFFFF
35   UINT8 out_req; // byte written to 0xFFFE
36   UINT8 out_req_last; // old value at 0xFFFE before the most recent write
37   UINT8 out_ack; // byte written to 0xFFFC
3838} zexall={ {0}};
3939
4040/* Devices */
r8672r8673
112112
113113static ADDRESS_MAP_START(z80_io, ADDRESS_SPACE_IO, 8)
114114   ADDRESS_MAP_UNMAP_HIGH
115   AM_RANGE(0x0001, 0x0001) AM_NOP // really a disable/enable for some sort of interrupt timer on kev's hardware, which is completely irrelevant for the test
115   AM_RANGE(0x0001, 0x0001) AM_NOP // really a disable/enable for some sort of interrupt timer on kev's hardware, which is completely irrelevant for the zexall test
116116ADDRESS_MAP_END
117117
118118
r8672r8673
137137
138138static MACHINE_DRIVER_START(zexall)
139139    /* basic machine hardware */
140    MDRV_CPU_ADD("maincpu", Z80, XTAL_3_579545MHz*60)  /* Toshiba TMPZ84C00AP @ 3.579545 MHz, verified, xtal is divided by 6 */
140    MDRV_CPU_ADD("maincpu", Z80, XTAL_3_579545MHz*10) 
141141    MDRV_CPU_PROGRAM_MAP(z80_mem)
142142    MDRV_CPU_IO_MAP(z80_io)
143143    MDRV_QUANTUM_TIME(HZ(60))
144144    MDRV_MACHINE_RESET(zexall)
145145
146146    /* video hardware */
147    //MDRV_DEFAULT_LAYOUT(layout_dectalk) // hack to avoid screenless system crash
148147   MDRV_IMPORT_FROM( generic_terminal )
149148   MDRV_GENERIC_TERMINAL_ADD(TERMINAL_TAG,dectalk_terminal_intf)
150149

Previous 15994 Revisions Next


© 1998-2018 The MESS Team