Previous 15994 Revisions Next

r5408 Wednesday 12th August, 2009 at 11:16:57 UTC by Curt Coder
[MM1] Fixed floppy options.
[src/mess/drivers]mikromik.c

src/mess/drivers/mikromik.c
r5407r5408
11#include "driver.h"
22#include "includes/mikromik.h"
3#include "formats/basicdsk.h"
34#include "devices/basicdsk.h"
5#include "devices/mflopimg.h"
46#include "cpu/i8085/i8085.h"
57#include "machine/8237dma.h"
68#include "machine/nec765.h"
r5407r5408
1719   - pixel display
1820   - system disks
1921   - hook up DMA channels
20   - UPD uPD7220 emulation
22   - NEC uPD7220 emulation (Intel 82720 GDC)
2123
2224*/
2325
r5407r5408
249251
250252/* System Configuration */
251253
252static DEVICE_IMAGE_LOAD( mm1_floppy )
253{
254   if (image_has_been_created(image))
255      return INIT_FAIL;
254static FLOPPY_OPTIONS_START( mm1 )
255   FLOPPY_OPTION( mm1, "dsk", "Nokia MikroMikko 1 disk image", basicdsk_identify_default, basicdsk_construct_default,
256      HEADS([2])
257      TRACKS([80])
258      SECTORS([8])
259      SECTOR_LENGTH([512])
260      FIRST_SECTOR_ID([1]))
261FLOPPY_OPTIONS_END
256262
257   if (device_load_basicdsk_floppy(image) == INIT_PASS)
258   {
259      int size = image_length(image);
260
261      if (size == 80*2*16*256)  // 640KB
262      {
263         /* image, tracks, heads, sectors per track, sector length, first sector id, offset track zero, track skipping */
264         basicdsk_set_geometry(image, 80, 2, 16, 256, 1, 0, FALSE);
265
266         return INIT_PASS;
267      }
268   }
269
270   return INIT_FAIL;
271}
272
273263#ifdef UNUSED_CODE
274264static DEVICE_IMAGE_LOAD( mm2_floppy )
275265{
r5407r5408
308298   switch(state)
309299   {
310300      /* --- the following bits of info are returned as 64-bit signed integers --- */
311      case MESS_DEVINFO_INT_COUNT:               info->i = 2; break;
301      case MESS_DEVINFO_INT_COUNT:         info->i = 2; break;
312302
313303      /* --- the following bits of info are returned as pointers to data or functions --- */
314      case MESS_DEVINFO_PTR_LOAD:                  info->load = DEVICE_IMAGE_LOAD_NAME(mm1_floppy); break;
304      case MESS_DEVINFO_PTR_FLOPPY_OPTIONS:   info->p = (void *) floppyoptions_mm1; break;
315305
316      /* --- the following bits of info are returned as NULL-terminated strings --- */
317      case MESS_DEVINFO_STR_FILE_EXTENSIONS:         strcpy(info->s = device_temp_str(), "img"); break;
318
319      default:                              legacybasicdsk_device_getinfo(devclass, state, info); break;
306      default:                        floppy_device_getinfo(devclass, state, info); break;
320307   }
321308}
322309

Previous 15994 Revisions Next


© 1998-2018 The MESS Team