~ubuntu-branches/debian/sid/mame/sid

« back to all changes in this revision

Viewing changes to mess/src/mess/machine/pf10.c

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Jordi Mallach, Emmanuel Kasper
  • Date: 2011-12-19 22:56:27 UTC
  • mfrom: (0.1.2)
  • Revision ID: package-import@ubuntu.com-20111219225627-ub5oga1oys4ogqzm
Tags: 0.144-1
[ Jordi Mallach ]
* Fix syntax errors in DEP5 copyright file (lintian).
* Use a versioned copyright Format specification field.
* Update Vcs-* URLs.
* Move transitional packages to the new metapackages section, and make
  them priority extra.
* Remove references to GNU/Linux and MESS sources from copyright.
* Add build variables for s390x.
* Use .xz tarballs as it cuts 4MB for the upstream sources.
* Add nplayers.ini as a patch. Update copyright file to add CC-BY-SA-3.0.

[ Emmanuel Kasper ]
* New upstream release. Closes: #651538.
* Add Free Desktop compliant png icons of various sizes taken from
  the hydroxygen iconset
* Mess is now built from a new source package, to avoid possible source
  incompatibilities between mame and the mess overlay.
* Mame-tools are not built from the mame source package anymore, but
  from the mess source package

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
 
3
 
    Epson PF-10
4
 
 
5
 
    Serial floppy drive
6
 
 
7
 
    Skeleton driver, not working
8
 
 
9
 
***************************************************************************/
10
 
 
11
 
#include "emu.h"
12
 
#include "pf10.h"
13
 
#include "cpu/m6800/m6800.h"
14
 
#include "machine/upd765.h"
15
 
 
16
 
 
17
 
/***************************************************************************
18
 
    TYPE DEFINITIONS
19
 
***************************************************************************/
20
 
 
21
 
typedef struct _pf10_state pf10_state;
22
 
struct _pf10_state
23
 
{
24
 
        UINT8 dummy;
25
 
};
26
 
 
27
 
 
28
 
/*****************************************************************************
29
 
    INLINE FUNCTIONS
30
 
*****************************************************************************/
31
 
 
32
 
INLINE pf10_state *get_safe_token(device_t *device)
33
 
{
34
 
        assert(device != NULL);
35
 
        assert(device->type() == PF10);
36
 
 
37
 
        return (pf10_state *)downcast<legacy_device_base *>(device)->token();
38
 
}
39
 
 
40
 
 
41
 
/*****************************************************************************
42
 
    ADDRESS MAPS
43
 
*****************************************************************************/
44
 
 
45
 
static ADDRESS_MAP_START( pf10_mem, AS_PROGRAM, 8 )
46
 
        AM_RANGE(0x0040, 0x013f) AM_RAM /* internal ram */
47
 
        AM_RANGE(0x0800, 0x0fff) AM_RAM /* external 2k ram */
48
 
        AM_RANGE(0xe000, 0xffff) AM_ROM AM_REGION("pf10", 0)
49
 
ADDRESS_MAP_END
50
 
 
51
 
static ADDRESS_MAP_START( pf10_io, AS_IO, 8 )
52
 
        ADDRESS_MAP_UNMAP_HIGH
53
 
        ADDRESS_MAP_GLOBAL_MASK(0xff)
54
 
ADDRESS_MAP_END
55
 
 
56
 
 
57
 
/*****************************************************************************
58
 
    MACHINE CONFIG
59
 
*****************************************************************************/
60
 
 
61
 
static const upd765_interface pf10_upd765a_intf =
62
 
{
63
 
        DEVCB_NULL, /* interrupt line */
64
 
        DEVCB_NULL,
65
 
        NULL,
66
 
        UPD765_RDY_PIN_NOT_CONNECTED, /* ??? */
67
 
        {NULL, NULL, NULL, NULL}
68
 
};
69
 
 
70
 
static MACHINE_CONFIG_FRAGMENT( pf10 )
71
 
        MCFG_CPU_ADD("pf10", M6803, XTAL_2_4576MHz / 4 /* ??? */) /* HD63A03 */
72
 
        MCFG_CPU_PROGRAM_MAP(pf10_mem)
73
 
        MCFG_CPU_IO_MAP(pf10_io)
74
 
 
75
 
        MCFG_UPD765A_ADD("upd765a", pf10_upd765a_intf)
76
 
MACHINE_CONFIG_END
77
 
 
78
 
 
79
 
/***************************************************************************
80
 
    ROM DEFINITIONS
81
 
***************************************************************************/
82
 
 
83
 
ROM_START( pf10 )
84
 
        ROM_REGION(0x2000, "pf10", ROMREGION_LOADBYNAME)
85
 
        ROM_LOAD("k3pf1.bin", 0x0000, 0x2000, CRC(eef4593a) SHA1(bb176e4baf938fe58c2d32f7c46d7bb7b0627755))
86
 
ROM_END
87
 
 
88
 
 
89
 
/*****************************************************************************
90
 
    DEVICE INTERFACE
91
 
*****************************************************************************/
92
 
 
93
 
static DEVICE_START( pf10 )
94
 
{
95
 
        pf10_state *pf10 = get_safe_token(device);
96
 
 
97
 
        pf10->dummy = 0;
98
 
}
99
 
 
100
 
static DEVICE_RESET( pf10 )
101
 
{
102
 
}
103
 
 
104
 
DEVICE_GET_INFO( pf10 )
105
 
{
106
 
        switch (state)
107
 
        {
108
 
                /* --- the following bits of info are returned as 64-bit signed integers --- */
109
 
                case DEVINFO_INT_TOKEN_BYTES:                   info->i = sizeof(pf10_state);                                   break;
110
 
                case DEVINFO_INT_INLINE_CONFIG_BYTES:   info->i = 0;                                                                    break;
111
 
 
112
 
                /* --- the following bits of info are returned as pointers --- */
113
 
                case DEVINFO_PTR_MACHINE_CONFIG:                info->machine_config = MACHINE_CONFIG_NAME(pf10);       break;
114
 
                case DEVINFO_PTR_ROM_REGION:                    info->romregion = ROM_NAME(pf10);                               break;
115
 
 
116
 
                /* --- the following bits of info are returned as pointers to data or functions --- */
117
 
                case DEVINFO_FCT_START:                                 info->start = DEVICE_START_NAME(pf10);                  break;
118
 
                case DEVINFO_FCT_STOP:                                  /* Nothing */                                                                   break;
119
 
                case DEVINFO_FCT_RESET:                                 info->reset = DEVICE_RESET_NAME(pf10);                  break;
120
 
 
121
 
                /* --- the following bits of info are returned as NULL-terminated strings --- */
122
 
                case DEVINFO_STR_NAME:                                  strcpy(info->s, "PF-10");                                               break;
123
 
                case DEVINFO_STR_FAMILY:                                strcpy(info->s, "Floppy drive");                                break;
124
 
                case DEVINFO_STR_VERSION:                               strcpy(info->s, "1.0");                                                 break;
125
 
                case DEVINFO_STR_SOURCE_FILE:                   strcpy(info->s, __FILE__);                                              break;
126
 
                case DEVINFO_STR_CREDITS:                               strcpy(info->s, "Copyright MESS Team");                 break;
127
 
        }
128
 
}
129
 
 
130
 
 
131
 
/***************************************************************************
132
 
    IMPLEMENTATION
133
 
***************************************************************************/
134
 
 
135
 
/* serial interface in (to the host computer) */
136
 
READ_LINE_DEVICE_HANDLER( pf10_txd1_r )
137
 
{
138
 
        logerror("%s: pf10_txd1_r\n", device->machine().describe_context());
139
 
 
140
 
        return 0;
141
 
}
142
 
 
143
 
WRITE_LINE_DEVICE_HANDLER( pf10_rxd1_w )
144
 
{
145
 
        logerror("%s: pf10_rxd1_w %u\n", device->machine().describe_context(), state);
146
 
}
147
 
 
148
 
 
149
 
/* serial interface out (to another floppy drive) */
150
 
READ_LINE_DEVICE_HANDLER( pf10_txd2_r )
151
 
{
152
 
        logerror("%s: pf10_txd2_r\n", device->machine().describe_context());
153
 
 
154
 
        return 0;
155
 
}
156
 
 
157
 
WRITE_LINE_DEVICE_HANDLER( pf10_rxd2_w )
158
 
{
159
 
        logerror("%s: pf10_rxd2_w %u\n", device->machine().describe_context(), state);
160
 
}
161
 
 
162
 
DEFINE_LEGACY_DEVICE(PF10, pf10);