Previous 15994 Revisions Next

r5212 Monday 13th July, 2009 at 06:37:50 UTC by Miodrag Milanović
[TI85] Initial work on TI-83+ emulation. [Xander]
[docs]messnew.txt
[src/mess/drivers]ti85.c
[src/mess/includes]ti85.h
[src/mess/machine]ti85.c
[src/mess/video]ti85.c

src/mess/video/ti85.c
r5211r5212
149149      ti_screen_y_size = TI82_SCREEN_Y_SIZE;
150150      ti_number_of_frames = TI82_NUMBER_OF_FRAMES;
151151   }
152   else if (!strncmp(machine->gamedrv->name, "ti83p", 5))
153   {
154      ti_video_memory_size = TI83_VIDEO_MEMORY_SIZE;
155      ti_screen_x_size = TI83_SCREEN_X_SIZE;
156      ti_screen_y_size = TI83_SCREEN_Y_SIZE;
157      ti_number_of_frames = TI83_NUMBER_OF_FRAMES;
158   }
152159   else if (!strncmp(machine->gamedrv->name, "ti83", 4))
153160   {
154161      ti_video_memory_size = TI83_VIDEO_MEMORY_SIZE;
r5211r5212
255262}
256263
257264
265
src/mess/includes/ti85.h
r5211r5212
2222MACHINE_START( ti82 );
2323MACHINE_START( ti83 );
2424MACHINE_START( ti85 );
25MACHINE_START( ti83p );
2526MACHINE_START( ti86 );
2627
28NVRAM_HANDLER( ti83p );
2729NVRAM_HANDLER( ti86 );
2830
2931SNAPSHOT_LOAD( ti8x );
r5211r5212
4345 READ8_HANDLER( ti85_port_0007_r);
4446 READ8_HANDLER( ti86_port_0005_r);
4547 READ8_HANDLER( ti86_port_0006_r);
48 READ8_HANDLER( ti82_port_0000_r);
4649 READ8_HANDLER( ti82_port_0002_r);
4750 READ8_HANDLER( ti82_port_0010_r);
4851 READ8_HANDLER( ti82_port_0011_r);
4952 READ8_HANDLER( ti83_port_0000_r);
5053 READ8_HANDLER( ti83_port_0002_r);
5154 READ8_HANDLER( ti83_port_0003_r);
55 READ8_HANDLER( ti83p_port_0002_r);
5256WRITE8_HANDLER( ti85_port_0000_w);
5357WRITE8_HANDLER( ti8x_keypad_w);
5458WRITE8_HANDLER( ti85_port_0002_w);
r5211r5212
5963WRITE8_HANDLER( ti85_port_0007_w);
6064WRITE8_HANDLER( ti86_port_0005_w);
6165WRITE8_HANDLER( ti86_port_0006_w);
66WRITE8_HANDLER( ti82_port_0000_w);
6267WRITE8_HANDLER( ti82_port_0002_w);
6368WRITE8_HANDLER( ti82_port_0010_w);
6469WRITE8_HANDLER( ti82_port_0011_w);
6570WRITE8_HANDLER( ti83_port_0000_w);
6671WRITE8_HANDLER( ti83_port_0002_w);
6772WRITE8_HANDLER( ti83_port_0003_w);
73WRITE8_HANDLER( ti83p_port_0002_w);
74WRITE8_HANDLER( ti83p_port_0003_w);
75WRITE8_HANDLER( ti83p_port_0004_w);
76WRITE8_HANDLER( ti83p_port_0006_w);
77WRITE8_HANDLER( ti83p_port_0007_w);
78WRITE8_HANDLER( ti83p_port_0010_w);
6879
6980/*----------- defined in video/ti85.c -----------*/
7081
src/mess/machine/ti85.c
r5211r5212
2121   TI_NOT_INITIALIZED,
2222   TI_81,
2323   TI_82,
24   TI_83,
25   TI_83p,
2426   TI_85,
2527   TI_86
2628};
r5211r5212
3436static UINT8 ti85_ON_interrupt_status;
3537static UINT8 ti85_ON_pressed;
3638
37static UINT8 ti85_memory_page_0x4000;
38static UINT8 ti86_memory_page_0x8000;
39static UINT8 ti8x_memory_page_1;
40static UINT8 ti8x_memory_page_2;
3941
4042UINT8 ti85_LCD_memory_base;
4143UINT8 ti85_LCD_contrast;
r5211r5212
5153
5254static UINT8 ti81_port_7_data;
5355
54static UINT8 *ti86_ram = NULL;
56static UINT8 *ti8x_ram = NULL;
5557
5658static ti85_serial_data ti85_serial_stream;
5759
r5211r5212
7173static UINT8 ti82_video_bit;
7274static UINT8 ti82_video_col;
7375static UINT8 ti8x_port2;
76static UINT8 ti83p_port4;
7477UINT8 ti82_video_buffer[0x300];
7578
7679enum
r5211r5212
143146
144147static void update_ti85_memory (running_machine *machine)
145148{
146   memory_set_bankptr(machine, 2,memory_region(machine, "maincpu") + 0x010000 + 0x004000*ti85_memory_page_0x4000);
149   memory_set_bankptr(machine, 2,memory_region(machine, "maincpu") + 0x010000 + 0x004000*ti8x_memory_page_1);
147150}
148151
152static void update_ti83p_memory (running_machine *machine)
153{
154   const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
155
156   if (ti8x_memory_page_1 & 0x40)
157   {
158      if (ti83p_port4 & 1)
159      {
160
161         memory_set_bankptr(machine, 3, ti8x_ram + 0x004000*(ti8x_memory_page_1&0x01));
162         memory_install_write8_handler(space, 0x8000, 0xbfff, 0, 0, SMH_BANK(3));
163      }
164      else
165      {
166         memory_set_bankptr(machine, 2, ti8x_ram + 0x004000*(ti8x_memory_page_1&0x01));
167         memory_install_write8_handler(space, 0x4000, 0x7fff, 0, 0, SMH_BANK(2));
168      }
169   }
170   else
171   {
172      if (ti83p_port4 & 1)
173      {
174         memory_set_bankptr(machine, 3, memory_region(machine, "maincpu") + 0x010000 + 0x004000*(ti8x_memory_page_1&0x1f));
175         memory_install_write8_handler(space, 0x8000, 0xbfff, 0, 0, SMH_UNMAP);
176      }
177      else
178      {
179         memory_set_bankptr(machine, 2, memory_region(machine, "maincpu") + 0x010000 + 0x004000*(ti8x_memory_page_1&0x1f));
180         memory_install_write8_handler(space, 0x4000, 0x7fff, 0, 0, SMH_UNMAP);
181      }
182   }
183
184   if (ti8x_memory_page_2 & 0x40)
185   {
186      if (ti83p_port4 & 1)
187      {
188         memory_set_bankptr(machine, 4, ti8x_ram + 0x004000*(ti8x_memory_page_2&0x01));
189         memory_install_write8_handler(space, 0xc000, 0xffff, 0, 0, SMH_BANK(4));
190      }
191      else
192      {
193         memory_set_bankptr(machine, 3, ti8x_ram + 0x004000*(ti8x_memory_page_2&0x01));
194         memory_install_write8_handler(space, 0x8000, 0xbfff, 0, 0, SMH_BANK(3));
195      }
196     
197   }
198   else
199   {
200      if (ti83p_port4 & 1)
201      {
202         memory_set_bankptr(machine, 4, memory_region(machine, "maincpu") + 0x010000 + 0x004000*(ti8x_memory_page_2&0x1f));
203         memory_install_write8_handler(space, 0xc000, 0xffff, 0, 0, SMH_UNMAP);
204      }
205      else
206      {
207         memory_set_bankptr(machine, 3, memory_region(machine, "maincpu") + 0x010000 + 0x004000*(ti8x_memory_page_2&0x1f));
208         memory_install_write8_handler(space, 0x8000, 0xbfff, 0, 0, SMH_UNMAP);
209      }
210   }
211}
212
149213static void update_ti86_memory (running_machine *machine)
150214{
151215   const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
152216   write8_space_func wh;
153217
154   if (ti85_memory_page_0x4000 & 0x40)
218   if (ti8x_memory_page_1 & 0x40)
155219   {
156      memory_set_bankptr(machine, 2, ti86_ram + 0x004000*(ti85_memory_page_0x4000&0x07));
157      memory_set_bankptr(machine, 6, ti86_ram + 0x004000*(ti85_memory_page_0x4000&0x07));
158      wh = SMH_BANK(6);
220      memory_set_bankptr(machine, 2, ti8x_ram + 0x004000*(ti8x_memory_page_1&0x07));
221      wh = SMH_BANK(2);
159222   }
160223   else
161224   {
162      memory_set_bankptr(machine, 2, memory_region(machine, "maincpu") + 0x010000 + 0x004000*(ti85_memory_page_0x4000&0x0f));
225      memory_set_bankptr(machine, 2, memory_region(machine, "maincpu") + 0x010000 + 0x004000*(ti8x_memory_page_1&0x0f));
163226      wh = SMH_UNMAP;
164227   }
165228   memory_install_write8_handler(space, 0x4000, 0x7fff, 0, 0, wh);
166229
167   if (ti86_memory_page_0x8000 & 0x40)
230   if (ti8x_memory_page_2 & 0x40)
168231   {
169      memory_set_bankptr(machine, 3, ti86_ram + 0x004000*(ti86_memory_page_0x8000&0x07));
170      memory_set_bankptr(machine, 7, ti86_ram + 0x004000*(ti86_memory_page_0x8000&0x07));
171      wh = SMH_BANK(7);
232      memory_set_bankptr(machine, 3, ti8x_ram + 0x004000*(ti8x_memory_page_2&0x07));
233      wh = SMH_BANK(3);
172234   }
173235   else
174236   {
175      memory_set_bankptr(machine, 3, memory_region(machine, "maincpu") + 0x010000 + 0x004000*(ti86_memory_page_0x8000&0x0f));
237      memory_set_bankptr(machine, 3, memory_region(machine, "maincpu") + 0x010000 + 0x004000*(ti8x_memory_page_2&0x0f));
176238      wh = SMH_UNMAP;
177239   }
178240   memory_install_write8_handler(space, 0x8000, 0xbfff, 0, 0, wh);
r5211r5212
194256   ti85_ON_pressed = 0;
195257   ti85_power_mode = 0;
196258   ti85_keypad_mask = 0;
197   ti85_memory_page_0x4000 = 0;
259   ti8x_memory_page_1 = 0;
198260   ti85_LCD_memory_base = 0;
199261   ti85_LCD_status = 0;
200262   ti85_LCD_mask = 0;
r5211r5212
226288   ti85_ON_interrupt_mask = 0;
227289   ti85_ON_interrupt_status = 0;
228290   ti85_ON_pressed = 0;
229   ti85_memory_page_0x4000 = 0;
291   ti8x_memory_page_1 = 0;
230292   ti85_LCD_status = 0;
231293   ti85_LCD_mask = 0;
232294   ti85_power_mode = 0;
r5211r5212
269331   ti85_ON_interrupt_mask = 0;
270332   ti85_ON_interrupt_status = 0;
271333   ti85_ON_pressed = 0;
272   ti85_memory_page_0x4000 = 0;
334   ti8x_memory_page_1 = 0;
273335   ti85_LCD_memory_base = 0;
274336   ti85_LCD_status = 0;
275337   ti85_LCD_mask = 0;
r5211r5212
295357   add_exit_callback(machine, ti85_free_serial_data_memory);
296358}
297359
360MACHINE_START( ti83p )
361{
362   const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
363   UINT8 *mem = memory_region(machine, "maincpu");
364
365   ti85_timer_interrupt_mask = 0;
366   ti85_timer_interrupt_status = 0;
367   ti85_ON_interrupt_mask = 0;
368   ti85_ON_interrupt_status = 0;
369   ti85_ON_pressed = 0;
370   ti8x_memory_page_1 = 0;
371   ti8x_memory_page_2 = 0;
372   ti85_LCD_memory_base = 0;
373   ti85_LCD_status = 0;
374   ti85_LCD_mask = 0;
375   ti85_power_mode = 0;
376   ti85_keypad_mask = 0;
377   ti85_video_buffer_width = 0;
378   ti85_interrupt_speed = 0;
379   ti85_port4_bit0 = 0;
380   ti82_video_mode = 0;
381   ti82_video_x = 0;
382   ti82_video_y = 0;
383   ti82_video_dir = 0;
384   ti82_video_scroll = 0;
385   ti82_video_bit = 0;
386   ti82_video_col = 0;
387   memset(ti82_video_buffer, 0x00, 0x300);
388
389   ti8x_ram = auto_alloc_array(machine, UINT8, 32*1024);
390   {
391      memory_install_write8_handler(space, 0x0000, 0x3fff, 0, 0, SMH_UNMAP);
392      memory_install_write8_handler(space, 0x4000, 0x7fff, 0, 0, SMH_UNMAP);
393      memory_install_write8_handler(space, 0x8000, 0xbfff, 0, 0, SMH_UNMAP);
394
395      memory_set_bankptr(machine, 1, mem + 0x010000);
396      memory_set_bankptr(machine, 2, mem + 0x010000);
397      memory_set_bankptr(machine, 3, mem + 0x010000);
398      memory_set_bankptr(machine, 4, ti8x_ram);
399
400      if (ti_calculator_model == TI_83p)
401         memset(ti8x_ram, 0, sizeof(unsigned char)*32*1024);
402     
403//      memset(mem + 0x83000, 0xff, 0x1000);
404     
405      ti_calculator_model = TI_83p;
406
407      timer_pulse(machine, ATTOTIME_IN_HZ(200), NULL, 0, ti85_timer_callback);
408   }
409
410   add_reset_callback(machine, ti85_reset_serial);
411   add_exit_callback(machine, ti85_free_serial_data_memory);
412}
413
414
298415MACHINE_START( ti86 )
299416{
300417   const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
r5211r5212
305422   ti85_ON_interrupt_mask = 0;
306423   ti85_ON_interrupt_status = 0;
307424   ti85_ON_pressed = 0;
308   ti85_memory_page_0x4000 = 0;
309   ti86_memory_page_0x8000 = 0;
425   ti8x_memory_page_1 = 0;
426   ti8x_memory_page_2 = 0;
310427   ti85_LCD_memory_base = 0;
311428   ti85_LCD_status = 0;
312429   ti85_LCD_mask = 0;
r5211r5212
316433   ti85_interrupt_speed = 0;
317434   ti85_port4_bit0 = 0;
318435
319   ti86_ram = auto_alloc_array(machine, UINT8, 128*1024);
436   ti8x_ram = auto_alloc_array(machine, UINT8, 128*1024);
320437   {
321438      memory_install_write8_handler(space, 0x0000, 0x3fff, 0, 0, SMH_UNMAP);
322439
323440      memory_set_bankptr(machine, 1, mem + 0x010000);
324441      memory_set_bankptr(machine, 2, mem + 0x014000);
325442
326      memory_set_bankptr(machine, 4, ti86_ram);
327      memory_set_bankptr(machine, 8, ti86_ram);
443      memory_set_bankptr(machine, 4, ti8x_ram);
328444
329445      if (ti_calculator_model == TI_86)
330         memset(ti86_ram, 0, sizeof(unsigned char)*128*1024);
446         memset(ti8x_ram, 0, sizeof(unsigned char)*128*1024);
331447
332448      ti_calculator_model = TI_86;
333449
r5211r5212
396512
397513 READ8_HANDLER ( ti85_port_0005_r )
398514{
399   return ti85_memory_page_0x4000;
515   return ti8x_memory_page_1;
400516}
401517
402518READ8_HANDLER ( ti85_port_0006_r )
r5211r5212
414530      | ti85_PCR;
415531}
416532
533READ8_HANDLER ( ti82_port_0000_r )
534{
535   return 0xff; // TODO
536}
537
417538 READ8_HANDLER ( ti82_port_0002_r )
418539{
419540   return ti8x_port2;
r5211r5212
465586
466587READ8_HANDLER ( ti86_port_0005_r )
467588{
468   return ti85_memory_page_0x4000;
589   return ti8x_memory_page_1;
469590}
470591
471592 READ8_HANDLER ( ti86_port_0006_r )
472593{
473   return ti86_memory_page_0x8000;
594   return ti8x_memory_page_2;
474595}
475596
476597READ8_HANDLER ( ti83_port_0000_r )
477598{
478   return ((ti85_memory_page_0x4000 & 0x08) << 1) | 0x0C;
599   return ((ti8x_memory_page_1 & 0x08) << 1) | 0x0C;
479600}
480601
481602 READ8_HANDLER ( ti83_port_0002_r )
r5211r5212
498619   return data;
499620}
500621
622 READ8_HANDLER ( ti83p_port_0002_r )
623{
624   return ti8x_port2|3;
625}
626
501627WRITE8_HANDLER ( ti81_port_0007_w )
502628{
503629   ti81_port_7_data = data;
r5211r5212
536662
537663WRITE8_HANDLER ( ti85_port_0005_w )
538664{
539   ti85_memory_page_0x4000 = data;
665   ti8x_memory_page_1 = data;
540666   update_ti85_memory(space->machine);
541667}
542668
r5211r5212
557683
558684WRITE8_HANDLER ( ti86_port_0005_w )
559685{
560   ti85_memory_page_0x4000 = data&((data&0x40)?0x47:0x4f);
686   ti8x_memory_page_1 = data&((data&0x40)?0x47:0x4f);
561687   update_ti86_memory(space->machine);
562688}
563689
564690WRITE8_HANDLER ( ti86_port_0006_w )
565691{
566   ti86_memory_page_0x8000 = data&((data&0x40)?0x47:0x4f);
692   ti8x_memory_page_2 = data&((data&0x40)?0x47:0x4f);
567693   update_ti86_memory(space->machine);
568694}
569695
696WRITE8_HANDLER ( ti82_port_0000_w )
697{
698   // TODO
699}
700
570701WRITE8_HANDLER ( ti82_port_0002_w )
571702{
572   ti85_memory_page_0x4000 = (data & 0x07);
703   ti8x_memory_page_1 = (data & 0x07);
573704   update_ti85_memory(space->machine);
574705   ti8x_port2 = data;
575706}
r5211r5212
622753
623754WRITE8_HANDLER ( ti83_port_0000_w )
624755{
625   ti85_memory_page_0x4000 = (ti85_memory_page_0x4000 & 7) | ((data & 16) >> 1);
756   ti8x_memory_page_1 = (ti8x_memory_page_1 & 7) | ((data & 16) >> 1);
626757   update_ti85_memory(space->machine);   
627758}
628759
629760WRITE8_HANDLER ( ti83_port_0002_w )
630761{
631   ti85_memory_page_0x4000 = (ti85_memory_page_0x4000 & 8) | (data & 7);
762   ti8x_memory_page_1 = (ti8x_memory_page_1 & 8) | (data & 7);
632763   update_ti85_memory(space->machine);
633764   ti8x_port2 = data;
634765}
r5211r5212
642773      ti85_LCD_status = data&0x08;
643774}
644775
776WRITE8_HANDLER ( ti83p_port_0002_w )
777{
778   ti8x_port2 = data;
779}
780
781WRITE8_HANDLER ( ti83p_port_0003_w )
782{
783   ti85_LCD_mask = (data&0x08) >> 2;
784   ti85_ON_interrupt_mask = data & 0x01;
785}
786
787WRITE8_HANDLER ( ti83p_port_0004_w )
788{
789   if ((data & 1) && !(ti83p_port4 & 1))
790   {
791      ti8x_memory_page_1 = 0x1f;
792      ti8x_memory_page_2 = 0x1f;
793   }
794   else if (!(data & 1) && (ti83p_port4 & 1))
795   {
796      ti8x_memory_page_1 = 0x1f;
797      ti8x_memory_page_2 = 0x40;
798   }
799   update_ti83p_memory(space->machine);
800   ti83p_port4 = data;
801}
802
803WRITE8_HANDLER ( ti83p_port_0006_w )
804{
805   ti8x_memory_page_1 = data & ((data&0x40) ? 0x41 : 0x5f);
806   update_ti83p_memory(space->machine);
807}
808
809WRITE8_HANDLER ( ti83p_port_0007_w )
810{
811   ti8x_memory_page_2 = data & ((data&0x40) ? 0x41 : 0x5f);
812   update_ti83p_memory(space->machine);
813}
814
815WRITE8_HANDLER ( ti83p_port_0010_w)
816 {   
817   if (data == 0x00 || data == 0x01)
818      ti82_video_mode = data;
819   if (data == 0x02 || data == 0x03)
820      ti85_LCD_status = data - 0x02;
821   if (data >= 0x04 && data <= 0x07)
822      ti82_video_dir = data;
823   if (data >= 0x20 && data <= 0x30)
824      ti82_video_x = data - 0x20;
825   if (data >= 0x40 && data <= 0x7F)
826      ti82_video_scroll = data - 0x40;
827   if (data >= 0x80 && data <= 0xBF)
828      ti82_video_y = data - 0x80;
829   if (data >= 0xc8)
830      ti85_LCD_contrast = data - 0xc8;
831     
832}
833
645834/* NVRAM functions */
835NVRAM_HANDLER( ti83p )
836{
837   if (read_or_write)
838   {
839      mame_fwrite(file, ti8x_ram, sizeof(unsigned char)*32*1024);
840   }
841   else
842   {
843         if (file)
844         {
845            mame_fread(file, ti8x_ram, sizeof(unsigned char)*32*1024);
846            cpu_set_reg(cputag_get_cpu(machine, "maincpu"), Z80_PC,0x0c59);
847         }
848         else
849            memset(ti8x_ram, 0, sizeof(unsigned char)*32*1024);
850   }
851}
852
646853NVRAM_HANDLER( ti86 )
647854{
648855   if (read_or_write)
649856   {
650      mame_fwrite(file, ti86_ram, sizeof(unsigned char)*128*1024);
857      mame_fwrite(file, ti8x_ram, sizeof(unsigned char)*128*1024);
651858   }
652859   else
653860   {
654861         if (file)
655862         {
656            mame_fread(file, ti86_ram, sizeof(unsigned char)*128*1024);
863            mame_fread(file, ti8x_ram, sizeof(unsigned char)*128*1024);
657864            cpu_set_reg(cputag_get_cpu(machine, "maincpu"), Z80_PC,0x0c59);
658865         }
659866         else
660            memset(ti86_ram, 0, sizeof(unsigned char)*128*1024);
867            memset(ti8x_ram, 0, sizeof(unsigned char)*128*1024);
661868   }
662869}
663870
r5211r5212
735942
736943   ti85_keypad_mask = hdw[0x00]&0x7f;
737944
738   ti85_memory_page_0x4000 = hdw[0x08]&0xff;
945   ti8x_memory_page_1 = hdw[0x08]&0xff;
739946   update_ti85_memory(machine);
740947
741948   ti85_power_mode = hdw[0x14]&0xff;
r5211r5212
768975   ti8x_snapshot_setup_registers (machine, data);
769976
770977   /* Memory dump */
771   memcpy(ti86_ram, data+0x94, 0x20000);
978   memcpy(ti8x_ram, data+0x94, 0x20000);
772979
773980   ti85_keypad_mask = hdw[0x00]&0x7f;
774981
775   ti85_memory_page_0x4000 = hdw[0x04]&0xff ? 0x40 : 0x00;
776   ti85_memory_page_0x4000 |= hdw[0x08]&0x0f;
982   ti8x_memory_page_1 = hdw[0x04]&0xff ? 0x40 : 0x00;
983   ti8x_memory_page_1 |= hdw[0x08]&0x0f;
777984
778   ti86_memory_page_0x8000 = hdw[0x0c]&0xff ? 0x40 : 0x00;
779   ti86_memory_page_0x8000 |= hdw[0x10]&0x0f;
985   ti8x_memory_page_2 = hdw[0x0c]&0xff ? 0x40 : 0x00;
986   ti8x_memory_page_2 |= hdw[0x10]&0x0f;
780987
781988   update_ti86_memory(machine);
782989
src/mess/drivers/ti85.c
r5211r5212
9292
9393    CPU: Z80 6MHz
9494        0000-3fff ROM 0
95        4000-7fff ROM 1-7 (switched)
95        4000-7fff ROM 1-15 (switched)
9696        8000-ffff RAM
9797
98TI-83Plus memory map
99
100    CPU: Z80 8MHz (running at 6 MHz)
101        0000-3fff ROM 0
102        4000-7fff ROM 0-31 or RAM 0-1 (switched)
103        7000-bfff ROM 0-31 or RAM 0-1 (switched)
104        c000-ffff RAM 0-31 or RAM 0-1 (switched)
105
98106TI-85 memory map
99107
100108    CPU: Z80 6MHz
r5211r5212
142150    4: Video buffer width, interrupt control (write only)
143151    10: Controll port for the display controller
144152    11: Data port for the display controller
153    14: Battery Status
145154
155TI-83Plus ports:
156    0: Link
157    1: Keypad
158    2: ?
159    3: ON status, LCD power
160    4: Interrupt status
161    6: Memory page 1
162    7: Memory page 2
163    10: Controll port for the display controller
164    11: Data port for the display controller
165   
146166TI-85 ports:
147167    0: Video buffer offset (write only)
148168    1: Keypad
r5211r5212
198218
199219static ADDRESS_MAP_START( ti82_io, ADDRESS_SPACE_IO, 8)
200220   ADDRESS_MAP_GLOBAL_MASK(0xff)
201   AM_RANGE(0x0000, 0x0000) AM_READWRITE( ti85_port_0000_r, ti85_port_0000_w )
221   AM_RANGE(0x0000, 0x0000) AM_READWRITE( ti82_port_0000_r, ti82_port_0000_w )   //TODO
202222   AM_RANGE(0x0001, 0x0001) AM_READWRITE( ti8x_keypad_r, ti8x_keypad_w )
203223   AM_RANGE(0x0002, 0x0002) AM_READWRITE( ti82_port_0002_r, ti82_port_0002_w )
204224   AM_RANGE(0x0003, 0x0003) AM_READWRITE( ti85_port_0003_r, ti85_port_0003_w )
r5211r5212
209229
210230static ADDRESS_MAP_START( ti83_io, ADDRESS_SPACE_IO, 8)
211231   ADDRESS_MAP_GLOBAL_MASK(0xff)
212   AM_RANGE(0x0000, 0x0000) AM_READWRITE( ti83_port_0000_r, ti83_port_0000_w )
232   AM_RANGE(0x0000, 0x0000) AM_READWRITE( ti83_port_0000_r, ti83_port_0000_w )   //TODO
213233   AM_RANGE(0x0001, 0x0001) AM_READWRITE( ti8x_keypad_r, ti8x_keypad_w )
214234   AM_RANGE(0x0002, 0x0002) AM_READWRITE( ti83_port_0002_r, ti83_port_0002_w )
215235   AM_RANGE(0x0003, 0x0003) AM_READWRITE( ti83_port_0003_r, ti83_port_0003_w )
r5211r5212
219239   AM_RANGE(0x0014, 0x0014) AM_READ_PORT( "BATTERY" )
220240ADDRESS_MAP_END
221241
242static ADDRESS_MAP_START( ti83p_io, ADDRESS_SPACE_IO, 8)
243   ADDRESS_MAP_GLOBAL_MASK(0xff)
244   AM_RANGE(0x0000, 0x0000) AM_READWRITE( ti82_port_0000_r, ti82_port_0000_w)   //TODO
245   AM_RANGE(0x0001, 0x0001) AM_READWRITE( ti8x_keypad_r, ti8x_keypad_w )
246   AM_RANGE(0x0002, 0x0002) AM_READWRITE( ti83p_port_0002_r, ti83p_port_0002_w )
247   AM_RANGE(0x0003, 0x0003) AM_READWRITE( ti83_port_0003_r, ti83p_port_0003_w )
248   AM_RANGE(0x0004, 0x0004) AM_READWRITE( ti83_port_0003_r, ti83p_port_0004_w )
249   AM_RANGE(0x0006, 0x0006) AM_READWRITE( ti86_port_0005_r, ti83p_port_0006_w )
250   AM_RANGE(0x0007, 0x0007) AM_READWRITE( ti86_port_0006_r, ti83p_port_0007_w )
251   AM_RANGE(0x0010, 0x0010) AM_READWRITE( ti82_port_0010_r, ti83p_port_0010_w )
252   AM_RANGE(0x0011, 0x0011) AM_READWRITE( ti82_port_0011_r, ti82_port_0011_w )
253ADDRESS_MAP_END
254
222255static ADDRESS_MAP_START( ti86_io, ADDRESS_SPACE_IO, 8)
223256   ADDRESS_MAP_GLOBAL_MASK(0xff)
224257   AM_RANGE(0x0000, 0x0000) AM_READWRITE( ti85_port_0000_r, ti85_port_0000_w )
r5211r5212
234267/* memory w/r functions */
235268
236269static ADDRESS_MAP_START( ti81_mem , ADDRESS_SPACE_PROGRAM, 8)
237   AM_RANGE(0x0000, 0x3fff) AM_READWRITE( SMH_BANK(1), SMH_BANK(3) )
238   AM_RANGE(0x4000, 0x7fff) AM_READWRITE( SMH_BANK(2), SMH_BANK(4) )
270   AM_RANGE(0x0000, 0x3fff) AM_ROMBANK(1)
271   AM_RANGE(0x4000, 0x7fff) AM_ROMBANK(2)
239272   AM_RANGE(0x8000, 0xffff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)
240273ADDRESS_MAP_END
241274
242static ADDRESS_MAP_START( ti85_mem , ADDRESS_SPACE_PROGRAM, 8)
243   AM_RANGE(0x0000, 0x3fff) AM_READWRITE( SMH_BANK(1), SMH_BANK(3) )
244   AM_RANGE(0x4000, 0x7fff) AM_READWRITE( SMH_BANK(2), SMH_BANK(4) )
245   AM_RANGE(0x8000, 0xffff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)
246ADDRESS_MAP_END
247
248275static ADDRESS_MAP_START( ti86_mem , ADDRESS_SPACE_PROGRAM, 8)
249   AM_RANGE(0x0000, 0x3fff) AM_READWRITE( SMH_BANK(1), SMH_BANK(5) )
250   AM_RANGE(0x4000, 0x7fff) AM_READWRITE( SMH_BANK(2), SMH_BANK(6) )
251   AM_RANGE(0x8000, 0xbfff) AM_READWRITE( SMH_BANK(3), SMH_BANK(7) )
252   AM_RANGE(0xc000, 0xffff) AM_READWRITE( SMH_BANK(4), SMH_BANK(8) )
276   AM_RANGE(0x0000, 0x3fff) AM_ROMBANK(1)
277   AM_RANGE(0x4000, 0x7fff) AM_RAMBANK(2)
278   AM_RANGE(0x8000, 0xbfff) AM_RAMBANK(3)
279   AM_RANGE(0xc000, 0xffff) AM_RAMBANK(4)
253280ADDRESS_MAP_END
254281
255282/* keyboard input */
r5211r5212
487514static MACHINE_DRIVER_START( ti85 )
488515   MDRV_IMPORT_FROM( ti81 )
489516   MDRV_CPU_REPLACE("maincpu", Z80, 6000000)      /* 6 MHz */
490   MDRV_CPU_PROGRAM_MAP(ti85_mem)
491517   MDRV_CPU_IO_MAP(ti85_io)
492518
493519   MDRV_MACHINE_START( ti85 )
r5211r5212
512538static MACHINE_DRIVER_START( ti82 )
513539   MDRV_IMPORT_FROM( ti81 )
514540   MDRV_CPU_REPLACE("maincpu", Z80, 6000000)      /* 6 MHz */
515   MDRV_CPU_PROGRAM_MAP(ti85_mem)
516541   MDRV_CPU_IO_MAP(ti82_io)
517542
518543   MDRV_MACHINE_START( ti82 )
r5211r5212
522547static MACHINE_DRIVER_START( ti83 )
523548   MDRV_IMPORT_FROM( ti81 )
524549   MDRV_CPU_REPLACE("maincpu", Z80, 6000000)      /* 6 MHz */
525   MDRV_CPU_PROGRAM_MAP(ti85_mem)
526550   MDRV_CPU_IO_MAP(ti83_io)
527551
528552   MDRV_MACHINE_START( ti82 )
r5211r5212
540564   MDRV_NVRAM_HANDLER( ti86 )
541565MACHINE_DRIVER_END
542566
567static MACHINE_DRIVER_START( ti83p )
568   MDRV_IMPORT_FROM( ti81 )
569   MDRV_CPU_REPLACE("maincpu", Z80, 6000000)      /* 8 MHz running at 6 MHz */
543570
571   MDRV_CPU_MODIFY("maincpu")
572   MDRV_CPU_PROGRAM_MAP(ti86_mem)
573   MDRV_CPU_IO_MAP(ti83p_io)
574   
575   MDRV_MACHINE_START( ti83p )
576   MDRV_VIDEO_UPDATE( ti82 )
577
578   MDRV_NVRAM_HANDLER(ti83p)
579MACHINE_DRIVER_END
580
544581static MACHINE_DRIVER_START( ti86d )
545582   MDRV_IMPORT_FROM( ti86 )
546583   MDRV_SNAPSHOT_ADD("snapshot", ti8x, "sav", 0)
r5211r5212
599636
600637ROM_START (ti83p)
601638   ROM_REGION (0x90000, "maincpu",0)
602   ROM_DEFAULT_BIOS("v112")
639   ROM_DEFAULT_BIOS("v116")
603640   ROM_SYSTEM_BIOS( 0, "v103", "V 1.03" )
604641   ROMX_LOAD( "ti83pv103.bin", 0x10000, 0x80000, CRC(da466be0) SHA1(37eaeeb9fb5c18fb494e322b75070e80cc4d858e), ROM_BIOS(1) )
605642   ROM_SYSTEM_BIOS( 1, "v103m", "V 1.03 [m]" )
r5211r5212
728765SYSTEM_CONFIG_END
729766
730767/*    YEAR  NAME        PARENT  COMPAT  MACHINE INPUT   INIT    CONFIG  COMPANY                 FULLNAME                        FLAGS */
731COMP( 1998, ti73,       0,      0,      ti85,  ti85,   0,      NULL,   "Texas Instruments",    "TI-73",                        GAME_NOT_WORKING )
768COMP( 1998, ti73,       0,      0,      ti83p,  ti82,   0,      NULL,   "Texas Instruments",    "TI-73",                        GAME_NOT_WORKING )
732769COMP( 1990, ti81,       0,      0,      ti81,   ti81,   0,      NULL,   "Texas Instruments",    "TI-81",                        0 )
733770COMP( 1992, ti85,       0,      0,      ti85d,  ti85,   0,      ti85,   "Texas Instruments",    "TI-85",                        0 )
734771COMP( 1993, ti82,       0,      0,      ti82,   ti82,   0,      NULL,   "Texas Instruments",    "TI-82",                        0 )
735772COMP( 1996, ti83,       0,      0,      ti83,   ti83,   0,      NULL,   "Texas Instruments",    "TI-83",                        0 )
736773COMP( 1997, ti86,       0,      0,      ti86d,  ti85,   0,      ti86,   "Texas Instruments",    "TI-86",                        0 )
737COMP( 1999, ti83p,      0,      0,      ti83,  ti83,   0,      NULL,   "Texas Instruments",    "TI-83 Plus",                   GAME_NOT_WORKING )
774COMP( 1999, ti83p,      0,      0,      ti83p,  ti82,   0,      NULL,   "Texas Instruments",    "TI-83 Plus",                   0 )
738775COMP( 2001, ti83pse,    0,      0,      ti85,   ti85,   0,      NULL,   "Texas Instruments",    "TI-83 Plus Silver Edition",    GAME_NOT_WORKING )
739776//COMP( 2004, ti84p,      0,      0,      ti85,   ti85,   0,      NULL,   "Texas Instruments",    "TI-84 Plus",                   GAME_NOT_WORKING )
740777COMP( 2004, ti84pse,    0,      0,      ti85,   ti85,   0,      NULL,   "Texas Instruments",    "TI-84 Plus Silver Edition",    GAME_NOT_WORKING )
741778
742779
743780
781
docs/messnew.txt
r5211r5212
7575
7676- [TI85] Fixed TI-82/TI-83 on/off and NVRAM, added a DSW to TI-83 for the
7777  battery status [Xander]
78 
78
79- [TI85] Initial work on TI-83+ emulation.  [Xander]
80
7981- [TIKI100] System is now working, except for double sided disks. [Curt Coder]
8082
8183- [VCS80] System is now fully working. [Curt Coder]

Previous 15994 Revisions Next


© 1998-2018 The MESS Team