Previous 15994 Revisions Next

r6751 Friday 25th December, 2009 at 12:22:49 UTC by Robbbert
[TRS] Fixed timer allocation issue.
Added the F4 character display.
[src/mess/drivers]trs80.c
[src/mess/includes]trs80.h
[src/mess/machine]trs80.c

src/mess/includes/trs80.h
r6750r6751
2626
2727QUICKLOAD_LOAD( trs80_cmd );
2828
29MACHINE_START( trs80 );
2930MACHINE_RESET( trs80 );
3031MACHINE_RESET( trs80m4 );
3132MACHINE_RESET( lnw80 );
src/mess/machine/trs80.c
r6750r6751
941941 *  Machine              *
942942 *************************************/
943943
944MACHINE_RESET( trs80 )
944MACHINE_START( trs80 )
945945{
946   cassette_data = 0;
947946   cassette_data_timer = timer_alloc(machine,  cassette_data_callback, NULL );
948947   timer_adjust_periodic( cassette_data_timer, attotime_zero, 0, ATTOTIME_IN_HZ(11025) );
949948   trs80_printer = devtag_get_device(machine, "centronics");
r6750r6751
954953   machine->generic.videoram_size = 0x800;
955954}
956955
956MACHINE_RESET( trs80 )
957{
958   cassette_data = 0;
959}
960
957961MACHINE_RESET( trs80m4 )
958962{
959963   const address_space *mem = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
960   MACHINE_RESET_CALL(trs80);
964   cassette_data = 0;
965
961966   memory_install_read_bank (mem, 0x0000, 0x0fff, 0, 0, "bank1");
962967   memory_install_read_bank (mem, 0x1000, 0x37e7, 0, 0, "bank2");
963968   memory_install_read_bank (mem, 0x37e8, 0x37e9, 0, 0, "bank3");
r6750r6751
984989MACHINE_RESET( lnw80 )
985990{
986991   const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
987   MACHINE_RESET_CALL(trs80);
992   cassette_data = 0;
988993   trs80_reg_load = 1;
989994   lnw80_fe_w(space, 0, 0);
990995}
src/mess/drivers/trs80.c
r6750r6751
436436INPUT_PORTS_END
437437
438438
439/**************************** F4 CHARACTER DISPLAYER ***********************************************************/
440static const gfx_layout trs80_charlayout =
441{
442   8, 8,         /* 8 x 8 characters */
443   128,         /* 128 characters */
444   1,         /* 1 bits per pixel */
445   { 0 },         /* no bitplanes */
446   /* x offsets */
447   { 0, 1, 2, 3, 4, 5, 6, 7 },
448   /* y offsets */
449   {  0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
450   8*8         /* every char takes 8 bytes */
451};
452
453static const gfx_layout ht1080z_charlayout =
454{
455   5, 12,         /* 5 x 12 characters */
456   128,         /* 128 characters */
457   1,         /* 1 bits per pixel */
458   { 0 },         /* no bitplanes */
459   /* x offsets */
460   { 0, 1, 2, 3, 4, 5, 6, 7 },
461   /* y offsets */
462   {  0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
463   8*16         /* every char takes 16 bytes */
464};
465
466static const gfx_layout trs80m4_charlayout =
467{
468   8, 8,         /* 8 x 8 characters */
469   256,         /* 256 characters */
470   1,         /* 1 bits per pixel */
471   { 0 },         /* no bitplanes */
472   /* x offsets */
473   { 0, 1, 2, 3, 4, 5, 6, 7 },
474   /* y offsets */
475   {  0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
476   8*8         /* every char takes 8 bytes */
477};
478
479static const gfx_layout lnw80_charlayout =
480{
481   8, 8,         /* 8 x 8 characters */
482   128,         /* 128 characters */
483   1,         /* 1 bits per pixel */
484   { 0 },         /* no bitplanes */
485   /* x offsets */
486   { 7, 5, 6, 1, 0, 2, 4, 3 },
487   /* y offsets */
488   {  0*8, 512*8, 256*8, 768*8, 1*8, 513*8, 257*8, 769*8 },
489   8*2         /* every char takes 8 bytes */
490};
491
492static const gfx_layout radionic_charlayout =
493{
494   8, 16,         /* 8 x 16 characters */
495   256,         /* 256 characters */
496   1,         /* 1 bits per pixel */
497   { 0 },         /* no bitplanes */
498   /* x offsets */
499   { 7, 6, 5, 4, 3, 2, 1, 0 },
500   /* y offsets */
501   {  0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 2048*8, 2049*8, 2050*8, 2051*8, 2052*8, 2053*8, 2054*8, 2055*8 },
502   8*8         /* every char takes 16 bytes */
503};
504
505static GFXDECODE_START(trs80)
506   GFXDECODE_ENTRY( "gfx1", 0, trs80_charlayout, 0, 1 )
507GFXDECODE_END
508
509static GFXDECODE_START(ht1080z)
510   GFXDECODE_ENTRY( "gfx1", 0, ht1080z_charlayout, 0, 1 )
511GFXDECODE_END
512
513static GFXDECODE_START(trs80m4)
514   GFXDECODE_ENTRY( "gfx1", 0, trs80m4_charlayout, 0, 1 )
515GFXDECODE_END
516
517static GFXDECODE_START(lnw80)
518   GFXDECODE_ENTRY( "gfx1", 0, lnw80_charlayout, 0, 4 )
519GFXDECODE_END
520
521static GFXDECODE_START(radionic)
522   GFXDECODE_ENTRY( "gfx1", 0, radionic_charlayout, 0, 1 )
523GFXDECODE_END
524
525
439526static const cassette_config trs80l2_cassette_config =
440527{
441528   trs80l2_cassette_formats,
r6750r6751
471558   MDRV_CPU_PROGRAM_MAP(trs80_map)
472559   MDRV_CPU_IO_MAP(trs80_io)
473560
561   MDRV_MACHINE_START( trs80 )
474562   MDRV_MACHINE_RESET( trs80 )
475563
476564   /* video hardware */
r6750r6751
479567   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
480568   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
481569   MDRV_SCREEN_SIZE(64*FW, 16*FH)
482   MDRV_SCREEN_VISIBLE_AREA(0*FW,64*FW-1,0*FH,16*FH-1)
570   MDRV_SCREEN_VISIBLE_AREA(0,64*FW-1,0,16*FH-1)
571
572   MDRV_GFXDECODE(trs80)
483573   MDRV_PALETTE_LENGTH(2)
484574   MDRV_PALETTE_INIT(black_and_white)
485575
r6750r6751
523613
524614   MDRV_MACHINE_RESET( trs80m4 )
525615
616   MDRV_GFXDECODE(trs80m4)
526617   MDRV_VIDEO_UPDATE( trs80m4 )
527618   MDRV_SCREEN_MODIFY("screen")
528619   MDRV_SCREEN_SIZE(80*8, 240)
r6750r6751
550641static MACHINE_DRIVER_START( ht1080z )
551642   MDRV_IMPORT_FROM( sys80 )
552643   MDRV_VIDEO_UPDATE( ht1080z )
644   MDRV_GFXDECODE(ht1080z)
553645MACHINE_DRIVER_END
554646
555647static MACHINE_DRIVER_START( lnw80 )
r6750r6751
559651   MDRV_CPU_IO_MAP( lnw80_io)
560652   MDRV_MACHINE_RESET( lnw80 )
561653
654   MDRV_GFXDECODE(lnw80)
562655   MDRV_PALETTE_LENGTH(8)
563656   MDRV_PALETTE_INIT(lnw80)
564657   MDRV_VIDEO_UPDATE(lnw80)
r6750r6751
572665   MDRV_VIDEO_UPDATE( radionic )
573666   MDRV_SCREEN_MODIFY("screen")
574667   MDRV_SCREEN_SIZE(64*8, 16*16)
575   MDRV_SCREEN_VISIBLE_AREA(0*8,64*8-1,0*16,16*16-1)
668   MDRV_SCREEN_VISIBLE_AREA(0,64*8-1,0,16*16-1)
669   MDRV_GFXDECODE(radionic)
576670MACHINE_DRIVER_END
577671
578672

Previous 15994 Revisions Next


© 1998-2018 The MESS Team