Previous 15994 Revisions Next

r4187 Friday 23rd January, 2009 at 15:51:20 UTC by Curt Coder
[NEWBRAIN] Improved EIM bank switching, added missing FDC ROM, added state saving.
[src/mess/drivers]newbrain.c
[src/mess/includes]newbrain.h
[src/mess/video]newbrain.c

src/mess/video/newbrain.c
r4186r4187
1111
1212   /* register for state saving */
1313
14//   state_save_register_global(machine, state->);
14   state_save_register_global(machine, state->tvcnsl);
15   state_save_register_global(machine, state->tvctl);
16   state_save_register_global(machine, state->tvram);
17   state_save_register_global_array(machine, state->segment_data);
1518}
1619
1720static void newbrain_update(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
r4186r4187
8184         }
8285      }
8386
84      /* increase row counter */
85      rc++;
86
87      if (rc == (ucr ? 8 : 10))
87      if (gr)
8888      {
89         /* reset row counter */
90         rc = 0;
91
89         /* get new data for each line */
9290         videoram_addr += columns;
9391         videoram_addr += excess;
9492      }
93      else
94      {
95         /* increase row counter */
96         rc++;
97
98         if (rc == (ucr ? 8 : 10))
99         {
100            /* reset row counter */
101            rc = 0;
102
103            videoram_addr += columns;
104            videoram_addr += excess;
105         }
106      }
95107   }
96108}
97109
src/mess/includes/newbrain.h
r4186r4187
1111#define FDC_Z80_TAG         "416"
1212#define NEC765_TAG         "418"
1313
14#define NEWBRAIN_EIM_RAM_SIZE         0x10000
15
1416#define NEWBRAIN_ENRG1_CLK            0x01
1517#define NEWBRAIN_ENRG1_TVP            0x04
1618#define NEWBRAIN_ENRG1_CTS            0x10
r4186r4187
4648   int copint;            /* COP interrupt */
4749   int anint;            /* A/DC interrupt */
4850   int bee;            /* identity */
49   int a16;            /* address line 16 */
5051   UINT8 enrg1;         /* enable register 1 */
5152   UINT8 enrg2;         /* enable register 2 */
5253
r4186r4187
6465   int keydata;         /* keyboard column */
6566
6667   /* paging state */
67   UINT8 paging;         /* paging control register */
68   int paging;            /* paging enabled */
69   int mpm;            /* multi paging mode ? */
70   int a16;            /* address line 16 */
6871   UINT8 pr[16];         /* expansion interface paging register */
72   UINT8 *eim_ram;         /* expansion interface RAM */
6973
7074   /* floppy state */
7175   int fdc_int;         /* interrupt */
r4186r4187
7983   UINT8 *char_rom;      /* character ROM */
8084
8185   /* user bus state */
82   UINT8 user;           
86   UINT8 user;
8387
8488   /* timers */
8589   emu_timer *reset_timer;   /* power on reset timer */
src/mess/drivers/newbrain.c
r4186r4187
4444
4545   TODO:
4646
47   - boot ends up in HALT because the COP is not responding
48   - a000-bfff should be unmapped for newbrain_m
49   - COP420 microbus
50   - video excess
47   - bitmapped graphics mode
48   - COP420 microbus access
5149   - escape key is missing
5250   - layout for the 16-segment displays
51   - CP/M 2.2 ROMs
52   - floppy disc controller
5353   - convert FDC into a device
5454   - convert EIM into a device
5555
56   - floppy disc controller
57   - CP/M 2.2
58   - expansion box
5956   - Micropage ROM/RAM card
6057   - Z80 PIO board
6158   - peripheral (PI) box
r4186r4187
8279   cputag_set_input_line(machine, Z80_TAG, INPUT_LINE_IRQ0, level);
8380}
8481
82/* Bank Switching */
83
84#define memory_install_unmapped(program, bank, bank_start, bank_end) \
85   memory_install_readwrite8_handler(program, bank_start, bank_end, 0, 0, SMH_UNMAP, SMH_UNMAP);
86
87#define memory_install_rom(program, bank, bank_start, bank_end) \
88   memory_install_readwrite8_handler(program, bank_start, bank_end, 0, 0, SMH_BANK((FPTR)bank), SMH_UNMAP);
89
90#define memory_install_ram(program, bank, bank_start, bank_end) \
91   memory_install_readwrite8_handler(program, bank_start, bank_end, 0, 0, SMH_BANK((FPTR)bank), SMH_BANK((FPTR)bank));
92
93static void newbrain_eim_bankswitch(running_machine *machine)
94{
95   newbrain_state *state = machine->driver_data;
96
97   const address_space *program = cputag_get_address_space(machine, Z80_TAG, ADDRESS_SPACE_PROGRAM);
98   int bank;
99
100   for (bank = 1; bank < 9; bank++)
101   {
102      int page = (state->a16 << 3) | bank;
103      UINT8 data = ~state->pr[page];
104      int ch = (data >> 3) & 0x03;
105      int eim_bank = data & 0x07;
106
107      UINT16 eim_bank_start = eim_bank * 0x2000;
108      UINT16 bank_start = (bank - 1) * 0x2000;
109      UINT16 bank_end = bank_start + 0x1fff;
110
111      switch (ch)
112      {
113      case 0:
114         /* ROM */
115         memory_install_rom(program, bank, bank_start, bank_end);
116         memory_configure_bank(machine, bank, 0, 1, memory_region(machine, "eim") + eim_bank_start, 0);
117         break;
118
119      case 2:
120         /* RAM */
121         memory_install_ram(program, bank, bank_start, bank_end);
122         memory_configure_bank(machine, bank, 0, 1, state->eim_ram + eim_bank_start, 0);
123         break;
124
125      default:
126         logerror("Invalid memory channel %u!\n", ch);
127         break;
128      }
129   }
130}
131
132static void newbrain_a_bankswitch(running_machine *machine)
133{
134   newbrain_state *state = machine->driver_data;
135
136   const address_space *program = cputag_get_address_space(machine, Z80_TAG, ADDRESS_SPACE_PROGRAM);
137   int bank;
138
139   if (state->paging)
140   {
141      /* expansion interface module paging */
142      newbrain_eim_bankswitch(machine);
143      return;
144   }
145
146   for (bank = 1; bank < 9; bank++)
147   {
148      UINT16 bank_start = (bank - 1) * 0x2000;
149      UINT16 bank_end = bank_start + 0x1fff;
150
151      if (state->pwrup)
152      {
153         /* all banks point to ROM at 0xe000 */
154         memory_install_rom(program, bank, bank_start, bank_end);
155         memory_configure_bank(machine, bank, 0, 1, memory_region(machine, Z80_TAG) + 0xe000, 0);
156      }
157      else
158      {
159         memory_configure_bank(machine, bank, 0, 1, memory_region(machine, Z80_TAG) + bank_start, 0);
160
161         if (bank < 5)
162         {
163            /* bank is RAM */
164            memory_install_ram(program, bank, bank_start, bank_end);
165         }
166         else if (bank == 5)
167         {
168            /* 0x8000-0x9fff */
169            if (memory_region(machine, "eim"))
170            {
171               /* expansion interface ROM */
172               memory_install_rom(program, bank, bank_start, bank_end);
173               memory_configure_bank(machine, bank, 0, 1, memory_region(machine, "eim") + 0x4000, 0);
174            }
175            else
176            {
177               /* mirror of 0xa000-0xbfff */
178               if (memory_region(machine, Z80_TAG)[0xa001] == 0)
179               {
180                  /* unmapped on the M model */
181                  memory_install_unmapped(program, bank, bank_start, bank_end);
182               }
183               else
184               {
185                  /* bank is ROM on the A model */
186                  memory_install_rom(program, bank, bank_start, bank_end);
187               }
188
189               memory_configure_bank(machine, bank, 0, 1, memory_region(machine, Z80_TAG) + 0xa000, 0);
190            }
191         }
192         else if (bank == 6)
193         {
194            /* 0xa000-0xbfff */
195            if (memory_region(machine, Z80_TAG)[0xa001] == 0)
196            {
197               /* unmapped on the M model */
198               memory_install_unmapped(program, bank, bank_start, bank_end);
199            }
200            else
201            {
202               /* bank is ROM on the A model */
203               memory_install_rom(program, bank, bank_start, bank_end);
204            }
205         }
206         else
207         {
208            /* bank is ROM */
209            memory_install_rom(program, bank, bank_start, bank_end);
210         }
211      }
212
213      memory_set_bank(machine, bank, 0);
214   }
215}
216
85217/* Enable/Status */
86218
87219static WRITE8_HANDLER( enrg1_w )
r4186r4187
103235
104236   newbrain_state *state = space->machine->driver_data;
105237
106   //logerror("ENRG1: %02x\n", data);
107
108238   state->enrg1 = data;
109239}
110240
r4186r4187
117247      0      _CLK      Clock Enable
118248      1
119249      2      TVP         TV Enable
120      3
250      3      IOPOWER
121251      4      _CTS      Clear to Send V24
122252      5      DO         Transmit Data V24
123253      6
r4186r4187
149279
150280   newbrain_state *state = space->machine->driver_data;
151281
152   UINT8 data = (state->copint << 7) | (state->aciaint << 6) | (state->clkint << 5) | (state->userint << 4);
282   UINT8 data = (state->copint << 7) | (state->aciaint << 6) | (state->clkint << 5) | (state->userint << 4) | 0x04;
153283
154284   switch ((state->enrg1 & NEWBRAIN_ENRG1_UST_BIT_0_MASK) >> 6)
155285   {
r4186r4187
428558
429559   newbrain_state *state = space->machine->driver_data;
430560
431   return (state->cop_rd << 3) | (state->cop_access << 2) | (state->cop_rd << 1) | BIT(state->keydata, 2);
561   return (state->cop_wr << 3) | (state->cop_access << 2) | (state->cop_rd << 1) | BIT(state->keydata, 2);
432562}
433563
434564static WRITE8_HANDLER( newbrain_cop_so_w )
r4186r4187
461591   return state->cop_tdi;
462592}
463593
464/* Paging */
465
466static WRITE8_HANDLER( m_pr_w )
467{
468   /*
469
470      bit      description
471
472      0      memory module identifier
473      1      memory module identifier
474      2      memory module identifier
475      3      memory module identifier
476      4      memory module identifier
477      5      memory module identifier
478      6      memory module identifier
479      7      ROM/RAM identifier
480
481   */
482
483//   int page = (offset >> 13) & 0x07;
484//   int bank = data & 0x7f;
485
486   if (BIT(data, 7))
487   {
488      // RAM
489   }
490   else
491   {
492      // ROM
493   }
494}
495
496594/* Video */
497595
498596static void newbrain_tvram_w(running_machine *machine, UINT8 data, int a6)
r4186r4187
616714   return 0;
617715}
618716
619static READ8_HANDLER( cop_r )
717#define NEWBRAIN_COPCMD_NULLCOM      0xd0
718#define NEWBRAIN_COPCMD_DISPCOM      0xa0
719//#define NEWBRAIN_COPCMD_TIMCOM      0x
720#define NEWBRAIN_COPCMD_PDNCOM      0xb8
721#define NEWBRAIN_COPCMD_TAPECOM      0x80
722
723#define NEWBRAIN_COP_TAPE_RECORD   0x00
724#define NEWBRAIN_COP_TAPE_PLAYBK   0x04
725#define NEWBRAIN_COP_TAPE_MOTOR1   0x08
726#define NEWBRAIN_COP_TAPE_MOTOR2   0x02
727
728#define NEWBRAIN_COP_TIMER0         0x01
729
730#define NEWBRAIN_COP_NO_DATA      0x01
731#define NEWBRAIN_COP_BREAK_PRESSED   0x02
732
733#define NEWBRAIN_COP_REGINT         0x00
734/*#define NEWBRAIN_COP_CASSERR      0x
735#define NEWBRAIN_COP_CASSIN         0x
736#define NEWBRAIN_COP_KBD         0x
737#define NEWBRAIN_COP_CASSOUT      0x*/
738
739enum
620740{
621/*   newbrain_state *state = space->machine->driver_data; */
622   UINT8 data = 0; // REGINT
741   NEWBRAIN_COP_STATE_COMMAND = 0,
742   NEWBRAIN_COP_STATE_DATA
743};
623744
624/*   state->cop_rd = 0;
625   state->cop_wr = 1;
626   state->cop_access = 0;
745static UINT8 copdata;
746static int copstate, copbytes, copregint = 1;
627747
628   data = state->cop_bus;
748static READ8_HANDLER( cop_r )
749{
750   newbrain_state *state = space->machine->driver_data;
629751
630   state->cop_rd = 1;
631   state->cop_wr = 1;
632   state->cop_access = 1;*/
752   state->copint = 1;
753   check_interrupt(space->machine);
633754
634   return data;
755   return copdata;
635756}
636757
637758static WRITE8_HANDLER( cop_w )
638759{
639760   newbrain_state *state = space->machine->driver_data;
640761
641/*   state->cop_rd = 1;
642   state->cop_wr = 0;
643   state->cop_access = 0;
762   copdata = data;
644763
645   state->cop_bus = data;
764   switch (copstate)
765   {
766   case NEWBRAIN_COP_STATE_COMMAND:
767      logerror("COP command %02x\n", data);
646768
647   state->cop_rd = 1;
648   state->cop_wr = 1;
649   state->cop_access = 1;*/
769      switch (data)
770      {
771      case NEWBRAIN_COPCMD_NULLCOM:
772         break;
650773
651   state->copint = 1;
652   check_interrupt(space->machine);
774      case NEWBRAIN_COPCMD_DISPCOM:
775         copregint = 0;
776         copbytes = 18;
777         copstate = NEWBRAIN_COP_STATE_DATA;
778
779         copdata = NEWBRAIN_COP_NO_DATA;
780         state->copint = 0;
781         check_interrupt(space->machine);
782
783         break;
784
785/*      case NEWBRAIN_COPCMD_TIMCOM:
786         copregint = 0;
787         copbytes = 6;
788         copstate = NEWBRAIN_COP_STATE_DATA;
789         break;
790*/
791      case NEWBRAIN_COPCMD_PDNCOM:
792         /* power down */
793         copregint = 0;
794         break;
795
796      default:
797         if (data & NEWBRAIN_COPCMD_TAPECOM)
798         {
799            copregint = 0;
800         }
801      }
802      break;
803
804   case NEWBRAIN_COP_STATE_DATA:
805      logerror("COP data %02x\n", data);
806      copbytes--;
807
808      if (copbytes == 0)
809      {
810         copstate = NEWBRAIN_COP_STATE_COMMAND;
811         copregint = 1;
812      }
813
814      copdata = NEWBRAIN_COP_NO_DATA;
815      state->copint = 0;
816      check_interrupt(space->machine);
817   
818      break;
819   }
653820}
654821
655822static TIMER_DEVICE_CALLBACK( cop_regint_tick )
656823{
657824   newbrain_state *state = timer->machine->driver_data;
658825
659   state->copint = 0;
660   check_interrupt(timer->machine);
826   if (copregint)
827   {
828      logerror("COP REGINT\n");
829      state->copint = 0;
830      check_interrupt(timer->machine);
831   }
661832}
662833
663834/* Expansion Interface Module */
r4186r4187
686857
687858static WRITE8_HANDLER( ei_pr_w )
688859{
689//   newbrain_state *state = machine->driver_data;
860   /*
690861
691//   int page = (BIT(offset, 12) >> 9) | (BIT(offset, 15) >> 13) | (BIT(offset, 14) >> 13) | (BIT(offset, 13) >> 13);
692//   int bank = (BIT(offset, 11) >> 3) | (data & 0x7f);
862      bit      signal      description
863
864      0      HP0
865      1      HP1
866      2      HP2
867      3      HP3
868      4      HP4
869      5      HP5
870      6      HP6
871      7      HP11
872
873      HP0-HP2 are decoded to _ROM0..._ROM7 signals
874      HP3-HP4 are decoded to _CH0..._CH3 signals
875
876   */
877
878   newbrain_state *state = space->machine->driver_data;
879
880   int page = (BIT(offset, 12) >> 9) | (BIT(offset, 15) >> 13) | (BIT(offset, 14) >> 13) | (BIT(offset, 13) >> 13);
881   int bank = (BIT(offset, 11) >> 3) | (data & 0x7f);
882
883   state->pr[page] = bank;
884
885   newbrain_a_bankswitch(space->machine);
693886}
694887
695888static READ8_HANDLER( ei_user_r )
r4186r4187
806999{
8071000   newbrain_state *state = space->machine->driver_data;
8081001
809   state->paging = data;
810
8111002   if (BIT(offset, 8))
8121003   {
8131004      // expansion interface module
r4186r4187
8161007
8171008         bit      signal      description
8181009
819         0      PG         
820         1      WPL         
821         2      A16         address line 16
822         3      _MPM     
823         4      HISLT     
1010         0      PG         1 enables paging circuits
1011         1      WPL         unused
1012         2      A16         1 sets local A16 to 1 (ie. causes second set of 8 page registers to select addressed memory)
1013         3      _MPM      0 selects multi-processing mode. among other effects this extends the page registers from 8 to 12 bits in length
1014         4      HISLT      1 isolates the local machine. this is used in multi-processing mode
8241015         5
8251016         6
8261017         7
8271018
8281019      */
8291020
1021      state->paging = BIT(data, 0);
8301022      state->a16 = BIT(data, 2);
1023      state->mpm = BIT(data, 3);
8311024   }
8321025   else if (BIT(offset, 9))
8331026   {
r4186r4187
8371030
8381031         bit      signal      description
8391032
840         0      PAGING     
1033         0      PAGING      1 enables paging circuits
8411034         1
842         2      HA16      address line 16
843         3      MPM         
1035         2      HA16      1 sets local A16 to 1 (ie. causes second set of 8 page registers to select addressed memory)
1036         3      MPM         0 selects multi-processing mode. among other effects this extends the page registers from 8 to 12 bits in length
8441037         4
8451038         5      _FDC RESET
8461039         6
r4186r4187
8501043
8511044      cpu_set_input_line(space->machine->cpu[2], INPUT_LINE_RESET, BIT(data, 5) ? HOLD_LINE : CLEAR_LINE);
8521045
1046      state->paging = BIT(data, 0);
1047      state->a16 = BIT(data, 2);
1048      state->mpm = BIT(data, 3);
8531049      state->fdc_att = BIT(data, 7);
8541050   }
8551051   else if (BIT(offset, 10))
r4186r4187
9271123   AM_RANGE(0xff, 0xff) AM_MIRROR(0xff00) AM_MASK(0xff00) AM_WRITE(ei_paging_w)
9281124ADDRESS_MAP_END
9291125
930static ADDRESS_MAP_START( newbrain_m_io_map, ADDRESS_SPACE_IO, 8 )
931   ADDRESS_MAP_UNMAP_HIGH
932   AM_RANGE(0x00, 0x00) AM_MIRROR(0xffc0) AM_READWRITE(clusr_r, clusr_w)
933   AM_RANGE(0x02, 0x02) AM_MIRROR(0xffc0) AM_MASK(0xff00) AM_WRITE(m_pr_w)
934   AM_RANGE(0x03, 0x03) AM_MIRROR(0xffc0) AM_WRITE(user_w)
935   AM_RANGE(0x04, 0x04) AM_MIRROR(0xffc0) AM_READWRITE(clclk_r, clclk_w)
936   AM_RANGE(0x06, 0x06) AM_MIRROR(0xffc0) AM_READWRITE(cop_r, cop_w)
937   AM_RANGE(0x07, 0x07) AM_MIRROR(0xffc0) AM_WRITE(enrg1_w)
938   AM_RANGE(0x08, 0x09) AM_MIRROR(0xffc2) AM_READWRITE(tvl_r, tvl_w)
939   AM_RANGE(0x0c, 0x0c) AM_MIRROR(0xffc3) AM_WRITE(tvctl_w)
940   AM_RANGE(0x14, 0x14) AM_MIRROR(0xffc0) AM_READ(ust_r)
941   AM_RANGE(0x15, 0x15) AM_MIRROR(0xffc2) AM_READ(user_r)
942   AM_RANGE(0x16, 0x16) AM_MIRROR(0xffc0) AM_READ(ust2_r)
943ADDRESS_MAP_END
944
9451126static ADDRESS_MAP_START( newbrain_a_io_map, ADDRESS_SPACE_IO, 8 )
9461127   ADDRESS_MAP_UNMAP_HIGH
9471128   AM_RANGE(0x00, 0x00) AM_MIRROR(0xffc0) AM_READWRITE(clusr_r, clusr_w)
r4186r4187
9511132   AM_RANGE(0x07, 0x07) AM_MIRROR(0xffc0) AM_WRITE(a_enrg1_w)
9521133   AM_RANGE(0x08, 0x09) AM_MIRROR(0xffc2) AM_READWRITE(tvl_r, tvl_w)
9531134   AM_RANGE(0x0c, 0x0c) AM_MIRROR(0xffc3) AM_WRITE(tvctl_w)
954   AM_RANGE(0x14, 0x14) AM_MIRROR(0xffc0) AM_READ(a_ust_r)
955   AM_RANGE(0x16, 0x16) AM_MIRROR(0xffc0) AM_READ(ust2_r)
1135   AM_RANGE(0x14, 0x14) AM_MIRROR(0xffc3) AM_READ(a_ust_r)
1136   AM_RANGE(0x16, 0x16) AM_MIRROR(0xffc0) AM_READ(user_r)
9561137ADDRESS_MAP_END
9571138
9581139static ADDRESS_MAP_START( newbrain_cop_io_map, ADDRESS_SPACE_IO, 8 )
r4186r4187
11761357static TIMER_CALLBACK( pwrup_tick )
11771358{
11781359   newbrain_state *state = machine->driver_data;
1179   const address_space *program = cputag_get_address_space(machine, Z80_TAG, ADDRESS_SPACE_PROGRAM);
11801360
1181   int bank;
1182
11831361   state->pwrup = 0;
1184
1185   for (bank = 1; bank < 9; bank++)
1186   {
1187      UINT16 bank_start = (bank - 1) * 0x2000;
1188      UINT16 bank_end = bank_start + 0x1fff;
1189
1190      if (bank < 6)
1191      {
1192         /* RAM */
1193         memory_install_readwrite8_handler(program, bank_start, bank_end, 0, 0, SMH_BANK((FPTR)bank), SMH_BANK((FPTR)bank));
1194      }
1195      else if (bank == 6)
1196      {
1197         /* unmapped on the M model */
1198         memory_install_readwrite8_handler(program, bank_start, bank_end, 0, 0, SMH_BANK((FPTR)bank), SMH_UNMAP);
1199      }
1200      else
1201      {
1202         /* ROM */
1203         memory_install_readwrite8_handler(program, bank_start, bank_end, 0, 0, SMH_BANK((FPTR)bank), SMH_UNMAP);
1204      }
1205
1206      memory_configure_bank(machine, bank, 0, 1, memory_region(machine, Z80_TAG) + bank_start, 0);
1207      memory_set_bank(machine, bank, 0);
1208   }
1362   newbrain_a_bankswitch(machine);
12091363}
12101364
12111365static MACHINE_START( newbrain )
12121366{
12131367   newbrain_state *state = machine->driver_data;
1214   int bank;
1215
1216   /* memory banking */
1217
1218   for (bank = 1; bank < 9; bank++)
1219   {
1220      UINT16 bank_start = (bank - 1) * 0x2000;
1221      UINT16 bank_end = bank_start + 0x1fff;
1222
1223      memory_install_readwrite8_handler(cputag_get_address_space(machine, Z80_TAG, ADDRESS_SPACE_PROGRAM), bank_start, bank_end, 0, 0, SMH_BANK((FPTR)bank), SMH_UNMAP);
1224      memory_configure_bank(machine, bank, 0, 1, memory_region(machine, Z80_TAG) + 0xe000, 0);
1225      memory_set_bank(machine, bank, 0);
1226   }
1227
1368   
12281369   /* allocate reset timer */
1229
12301370   state->reset_timer = timer_alloc(machine, reset_tick, NULL);
12311371   timer_adjust_oneshot(state->reset_timer, ATTOTIME_IN_USEC(get_reset_t()), 0);
12321372
12331373   /* allocate power up timer */
1234
12351374   state->pwrup_timer = timer_alloc(machine, pwrup_tick, NULL);
12361375   timer_adjust_oneshot(state->pwrup_timer, ATTOTIME_IN_USEC(get_pwrup_t()), 0);
1237   state->pwrup = 1;
12381376
12391377   /* initialize variables */
1240
1378   state->pwrup = 1;
12411379   state->userint = 1;
12421380   state->userint0 = 1;
12431381   state->clkint = 1;
r4186r4187
12461384   state->bee = 1;
12471385   state->tvcnsl = 1;
12481386
1387   /* set up memory banking */
1388   newbrain_a_bankswitch(machine);
1389
12491390   /* register for state saving */
1250
1391   state_save_register_global(machine, state->pwrup);
1392   state_save_register_global(machine, state->userint);
1393   state_save_register_global(machine, state->userint0);
1394   state_save_register_global(machine, state->clkint);
1395   state_save_register_global(machine, state->aciaint);
1396   state_save_register_global(machine, state->copint);
1397   state_save_register_global(machine, state->anint);
1398   state_save_register_global(machine, state->bee);
1399   state_save_register_global(machine, state->enrg1);
1400   state_save_register_global(machine, state->enrg2);
1401   state_save_register_global(machine, state->cop_bus);
1402   state_save_register_global(machine, state->cop_so);
1403   state_save_register_global(machine, state->cop_tdo);
1404   state_save_register_global(machine, state->cop_tdi);
1405   state_save_register_global(machine, state->cop_rd);
1406   state_save_register_global(machine, state->cop_wr);
1407   state_save_register_global(machine, state->cop_access);
1408   state_save_register_global(machine, state->keylatch);
1409   state_save_register_global(machine, state->keydata);
1410   state_save_register_global(machine, state->paging);
1411   state_save_register_global(machine, state->mpm);
1412   state_save_register_global(machine, state->a16);
1413   state_save_register_global_array(machine, state->pr);
1414   state_save_register_global(machine, state->fdc_int);
1415   state_save_register_global(machine, state->fdc_att);
1416   state_save_register_global(machine, state->user);
12511417}
12521418
12531419static MACHINE_START( newbrain_eim )
r4186r4187
12561422
12571423   MACHINE_START_CALL(newbrain);
12581424
1425   /* allocate expansion RAM */
1426   state->eim_ram = auto_malloc(NEWBRAIN_EIM_RAM_SIZE);
1427
12591428   /* find devices */
1260
12611429   state->z80ctc = devtag_get_device(machine, Z80CTC, Z80CTC_TAG);
12621430   state->mc6850 = devtag_get_device(machine, ACIA6850, MC6850_TAG);
12631431   state->nec765 = devtag_get_device(machine, NEC765A, NEC765_TAG);
1432
1433   /* register for state saving */
1434   state_save_register_global_pointer(machine, state->eim_ram, NEWBRAIN_EIM_RAM_SIZE);
12641435}
12651436
12661437static MACHINE_RESET( newbrain )
r4186r4187
13531524   MDRV_NEC765A_ADD(NEC765_TAG, newbrain_nec765_interface)
13541525MACHINE_DRIVER_END
13551526
1356static MACHINE_DRIVER_START( newbrain_m )
1357   MDRV_IMPORT_FROM(newbrain_a)
1358   
1359   /* basic system hardware */
1360   MDRV_CPU_MODIFY(Z80_TAG)
1361   MDRV_CPU_IO_MAP(newbrain_m_io_map, 0)
1362MACHINE_DRIVER_END
1363
13641527/* ROMs */
13651528
13661529ROM_START( newbrain )
r4186r4187
14411604   ROM_LOAD( "e417-2.rom", 0x8000, 0x2000, CRC(6a7afa20) SHA1(f90db4f8318777313a862b3d5bab83c2fd260010) )
14421605
14431606   ROM_REGION( 0x10000, FDC_Z80_TAG, 0 ) // Floppy Disk Controller
1607   ROM_LOAD( "d413-2.rom", 0x0000, 0x2000, CRC(097591f1) SHA1(c2aa1d27d4f3a24ab0c8135df746a4a44201a7f4) )
14441608   ROM_LOAD( "d417-1.rom", 0x0000, 0x2000, CRC(40fad31c) SHA1(5137be4cc026972c0ffd4fa6990e8583bdfce163) )
14451609   ROM_LOAD( "d417-2.rom", 0x0000, 0x2000, CRC(e8bda8b9) SHA1(c85a76a5ff7054f4ef4a472ce99ebaed1abd269c) )
14461610ROM_END
r4186r4187
15451709COMP( 1981, newbrain,   0,         0,      newbrain_a,      newbrain,   0,       newbrain_a,      "Grundy Business Systems Ltd.",   "NewBrain AD",   GAME_NOT_WORKING | GAME_NO_SOUND )
15461710COMP( 1981, newbraie,   newbrain,   0,      newbrain_eim,   newbrain,   0,       newbrain_eim,   "Grundy Business Systems Ltd.",   "NewBrain AD with Expansion Interface",   GAME_NOT_WORKING | GAME_NO_SOUND )
15471711COMP( 1981, newbraia,   newbrain,   0,      newbrain_a,      newbrain,   0,       newbrain_a,      "Grundy Business Systems Ltd.",   "NewBrain A",   GAME_NOT_WORKING | GAME_NO_SOUND )
1548COMP( 1981, newbraim,   newbrain,   0,      newbrain_m,      newbrain,   0,       newbrain_a,      "Grundy Business Systems Ltd.",   "NewBrain MD",   GAME_NOT_WORKING | GAME_NO_SOUND )
1712COMP( 1981, newbraim,   newbrain,   0,      newbrain_a,      newbrain,   0,       newbrain_a,      "Grundy Business Systems Ltd.",   "NewBrain MD",   GAME_NOT_WORKING | GAME_NO_SOUND )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team