Previous 15994 Revisions Next

r3633 Thursday 27th November, 2008 at 10:42:30 UTC by Robbbert
[MBEE] Fixed u4 regression.
[src/mess]mess.mak messdriv.c
[src/mess/drivers]mbee.c

src/mess/messdriv.c
r3632r3633
587587//128u4   DRIVER( kc85_4d )   /* VEB KC 85/4 with disk interface               */
588588
589589   /* MICROBEE SYSTEMS */
590//128u4   DRIVER( mbee )      /* Microbee 16 Standard or Plus                  */
591//128u4   DRIVER( mbeeic )   /* Microbee 32 IC                           */
592//128u4   DRIVER( mbeepc )   /* Microbee 32 PC                           */
593//128u4   DRIVER( mbeepc85 )   /* Microbee 32 PC85                           */
594//128u4   DRIVER( mbee56 )   /* Microbee 56K (CP/M)                        */
590   DRIVER( mbee )      /* Microbee 16 Standard or Plus                  */
591   DRIVER( mbeeic )   /* Microbee 32 IC                           */
592   DRIVER( mbeepc )   /* Microbee 32 PC                           */
593   DRIVER( mbeepc85 )   /* Microbee 32 PC85                           */
594   DRIVER( mbee56 )   /* Microbee 56K (CP/M)                        */
595595
596596   /* TANDY RADIO SHACK */
597597   DRIVER( trs80 )      /* TRS-80 Model I - Level I BASIC               */
src/mess/mess.mak
r3632r3633
389389   $(MESSOBJ)/luxor.a \
390390   $(MESSOBJ)/lviv.a \
391391   $(MESSOBJ)/magnavox.a \
392   $(MESSOBJ)/mbee.a \
392393   $(MESSOBJ)/mc10.a \
393394   $(MESSOBJ)/mikro80.a \
394395   $(MESSOBJ)/mk2.a \
r3632r3633
449450#   $(MESSOBJ)/kaypro.a \
450451#   $(MESSOBJ)/kim1.a \
451452#   $(MESSOBJ)/lynx.a \
452#   $(MESSOBJ)/mbee.a \
453453#   $(MESSOBJ)/memotech.a \
454454#   $(MESSOBJ)/mephisto.a \
455455#   $(MESSOBJ)/mk1.a \
src/mess/drivers/mbee.c
r3632r3633
5656#include "devices/cassette.h"
5757#include "devices/z80bin.h"
5858#include "sound/speaker.h"
59#include "deprecat.h"
5960
6061static const device_config *cassette_device_image(running_machine *machine)
6162{
r3632r3633
290291
291292static Z80PIO_ON_INT_CHANGED( pio_interrupt )
292293{
293   cpunum_set_input_line(device->machine, 0, 0, state);
294   cpu_set_input_line(device->machine->cpu[0], 0, state);
294295}
295296
296297static READ8_DEVICE_HANDLER( pio_port_b_r )
r3632r3633
453454   UINT8 *RAM = memory_region(machine, "main");
454455   memory_configure_bank(machine, 1, 0, 2, &RAM[0x0000], 0x8000);
455456   memory_configure_bank(machine, 2, 0, 2, &RAM[0x11000], 0x4000);
456   memory_configure_bank(3, 0, 2, &RAM[0x11800], 0x4000);
457   memory_configure_bank(machine, 3, 0, 2, &RAM[0x11800], 0x4000);
457458   memory_set_bank(machine, 2, 1);
458   memory_set_bank(3, 0);
459   memory_set_bank(machine, 3, 0);
459460}
460461
461462static DRIVER_INIT( mbee56 )
r3632r3633
463464   UINT8 *RAM = memory_region(machine, "main");
464465   memory_configure_bank(machine, 1, 0, 2, &RAM[0x0000], 0xe000);
465466   memory_configure_bank(machine, 2, 0, 2, &RAM[0x11000], 0x4000);
466   memory_configure_bank(3, 0, 2, &RAM[0x11800], 0x4000);
467   memory_configure_bank(machine, 3, 0, 2, &RAM[0x11800], 0x4000);
467468   memory_set_bank(machine, 2, 1);
468   memory_set_bank(3, 0);
469   memory_set_bank(machine, 3, 0);
469470}
470471
471472ROM_START( mbee )
r3632r3633
545546
546547static Z80BIN_EXECUTE( mbee )
547548{
548   program_write_word_16le(0xa6, execute_address);         /* fix the EXEC command */
549   memory_write_word_16le(cputag_get_address_space(Machine,"main",ADDRESS_SPACE_PROGRAM), 0xa6, execute_address);         /* fix the EXEC command */
549550
550551   if (autorun)
551552   {
552      program_write_word_16le(0xa2, execute_address);      /* fix warm-start vector to get around some copy-protections */
553      cpunum_set_reg(0, REG_PC, execute_address);
553      memory_write_word_16le(cputag_get_address_space(Machine,"main",ADDRESS_SPACE_PROGRAM), 0xa2, execute_address);      /* fix warm-start vector to get around some copy-protections */
554      cpu_set_reg(cputag_get_cpu(Machine, "main"), REG_PC, execute_address);
554555   }
555556   else
556557   {
557      program_write_word_16le(0xa2, 0x8517);
558      memory_write_word_16le(cputag_get_address_space(Machine,"main",ADDRESS_SPACE_PROGRAM), 0xa2, 0x8517);
558559   }
559560}
560561
r3632r3633
573574         if (image_fread(image, &data, 1) != 1) return INIT_FAIL;
574575
575576         if ((j < mbee_size) || (j > 0xefff))
576            memory_write_byte(space, j, data);
577            memory_write_byte(cputag_get_address_space(Machine,"main",ADDRESS_SPACE_PROGRAM), j, data);
577578         else
578579            return INIT_FAIL;
579580      }
580581
581582      if (sw)
582583      {
583         program_write_word_16le(0xa2,0x801e);   /* fix warm-start vector to get around some copy-protections */
584         cpunum_set_reg(0, REG_PC, 0x801e);
584         memory_write_word_16le(cputag_get_address_space(Machine,"main",ADDRESS_SPACE_PROGRAM), 0xa2,0x801e);   /* fix warm-start vector to get around some copy-protections */
585         cpu_set_reg(cputag_get_cpu(Machine, "main"), REG_PC, 0x801e);
585586      }
586587      else
587         program_write_word_16le(0xa2,0x8517);
588         memory_write_word_16le(cputag_get_address_space(Machine,"main",ADDRESS_SPACE_PROGRAM), 0xa2,0x8517);
588589   }
589590   else if (!mame_stricmp(image_filetype(image), "com"))
590591   {
r3632r3633
596597         if (image_fread(image, &data, 1) != 1) return INIT_FAIL;
597598
598599         if ((j < mbee_size) || (j > 0xefff))
599            memory_write_byte(space, j, data);
600            memory_write_byte(cputag_get_address_space(Machine,"main",ADDRESS_SPACE_PROGRAM), j, data);
600601         else
601602            return INIT_FAIL;
602603      }
603604
604      if (sw) cpunum_set_reg(0, REG_PC, 0x100);
605      if (sw) cpu_set_reg(cputag_get_cpu(Machine, "main"), REG_PC, 0x100);
605606   }
606607
607608   return INIT_PASS;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team