src/mess/video/mikro80.c
| r2055 | r2056 | |
| 9 | 9 | |
| 10 | 10 | #include "driver.h"
|
| 11 | 11 | |
| 12 | | #define MIKRO80_VIDEO_MEMORY 0xE800 |
| 13 | | #define MIKRO80_CURSOR_MEMORY 0xE000 |
| 12 | UINT8 *mikro80_video_ram;
|
| 13 | UINT8 *mikro80_cursor_ram;
|
| 14 | 14 | |
| 15 | 15 | const gfx_layout mikro80_charlayout =
|
| 16 | 16 | {
|
| r2055 | r2056 | |
| 35 | 35 | {
|
| 36 | 36 | for(x = 0; x < 64; x++ )
|
| 37 | 37 | {
|
| 38 | | int code = program_read_byte(MIKRO80_VIDEO_MEMORY + x + y*64); |
| 38 | int code = mikro80_video_ram[x + y*64]; |
| 39 | 39 | drawgfx(bitmap, screen->machine->gfx[0], code , 0, 0,0, x*8,y*8,
|
| 40 | 40 | NULL, TRANSPARENCY_NONE, 0);
|
| 41 | 41 | }
|
| r2055 | r2056 | |
| 45 | 45 | {
|
| 46 | 46 | for(x = 0; x < 64; x++ )
|
| 47 | 47 | {
|
| 48 | | int code = program_read_byte(MIKRO80_CURSOR_MEMORY + x + y*64); |
| 48 | int code = mikro80_cursor_ram[x + y*64]; |
| 49 | 49 | if (code == 0x80 ) {
|
| 50 | 50 | drawgfx(bitmap, screen->machine->gfx[0], 0xff , 0, 0,0, x*8,y*8,
|
| 51 | 51 | NULL, TRANSPARENCY_NONE, 0);
|
src/mess/video/ut88.c
| r2055 | r2056 | |
| 9 | 9 | |
| 10 | 10 | #include "driver.h"
|
| 11 | 11 | |
| 12 | | #define UT88_VIDEO_MEMORY 0xE800
|
| 12 | UINT8 *ut88_video_ram;
|
| 13 | 13 | |
| 14 | 14 | const gfx_layout ut88_charlayout =
|
| 15 | 15 | {
|
| r2055 | r2056 | |
| 34 | 34 | {
|
| 35 | 35 | for(x = 0; x < 64; x++ )
|
| 36 | 36 | {
|
| 37 | | int code = program_read_byte(UT88_VIDEO_MEMORY + x + y*64); |
| 37 | int code = ut88_video_ram[ x + y*64 ]; |
| 38 | 38 | drawgfx(bitmap, screen->machine->gfx[0], code , 0, 0,0, x*8,y*8,
|
| 39 | 39 | NULL, TRANSPARENCY_NONE, 0);
|
| 40 | 40 | }
|
src/mess/machine/special.c
| r2055 | r2056 | |
| 22 | 22 | /* Driver initialization */
|
| 23 | 23 | DRIVER_INIT(special)
|
| 24 | 24 | {
|
| 25 | | |
| 25 | /* set initialy ROM to be visible on first bank */
|
| 26 | UINT8 *RAM = memory_region(REGION_CPU1);
|
| 27 | memset(RAM,0x0000,0x3000); // make frist page empty by default
|
| 28 | memory_configure_bank(1, 1, 2, RAM, 0x0000);
|
| 29 | memory_configure_bank(1, 0, 2, RAM, 0xc000);
|
| 26 | 30 | }
|
| 27 | 31 | |
| 28 | 32 | READ8_HANDLER (specialist_8255_porta_r )
|
| r2055 | r2056 | |
| 86 | 90 | specialist_8255_portb = data;
|
| 87 | 91 | }
|
| 88 | 92 | WRITE8_HANDLER (specialist_8255_portc_w )
|
| 89 | | {
|
| 93 | {
|
| 90 | 94 | specialist_8255_portc = data;
|
| 95 |
|
| 96 | cassette_output(image_from_devtype_and_index(IO_CASSETTE, 0),data & 0x80 ? 1 : -1);
|
| 97 | |
| 98 | DAC_data_w(0,data & 0x20); //beeper
|
| 99 |
|
| 91 | 100 | }
|
| 92 | 101 | |
| 93 | 102 | static const ppi8255_interface specialist_ppi8255_interface =
|
| r2055 | r2056 | |
| 101 | 110 | {specialist_8255_portc_w}
|
| 102 | 111 | };
|
| 103 | 112 | |
| 113 | static TIMER_CALLBACK( special_reset )
|
| 114 | {
|
| 115 | memory_set_bank(1, 0);
|
| 116 | }
|
| 117 | |
| 118 | |
| 104 | 119 | MACHINE_RESET( special )
|
| 105 | 120 | {
|
| 121 | timer_set(ATTOTIME_IN_USEC(10), NULL, 0, special_reset);
|
| 122 | memory_set_bank(1, 1);
|
| 123 | |
| 106 | 124 | ppi8255_init(&specialist_ppi8255_interface);
|
| 107 | 125 | }
|
| 108 | 126 | |
src/mess/machine/mikro80.c
| r2055 | r2056 | |
| 17 | 17 | /* Driver initialization */
|
| 18 | 18 | DRIVER_INIT(mikro80)
|
| 19 | 19 | {
|
| 20 | /* set initialy ROM to be visible on first bank */
|
| 21 | UINT8 *RAM = memory_region(REGION_CPU1);
|
| 22 | memset(RAM,0x0000,0x0800); // make frist page empty by default
|
| 23 | memory_configure_bank(1, 1, 2, RAM, 0x0000);
|
| 24 | memory_configure_bank(1, 0, 2, RAM, 0xf800);
|
| 20 | 25 | }
|
| 21 | 26 | |
| 22 | 27 | READ8_HANDLER (mikro80_8255_portb_r )
|
| r2055 | r2056 | |
| 54 | 59 | {NULL},
|
| 55 | 60 | };
|
| 56 | 61 | |
| 62 | static TIMER_CALLBACK( mikro80_reset )
|
| 63 | {
|
| 64 | memory_set_bank(1, 0);
|
| 65 | }
|
| 66 | |
| 57 | 67 | MACHINE_RESET( mikro80 )
|
| 58 | 68 | {
|
| 69 | timer_set(ATTOTIME_IN_USEC(10), NULL, 0, mikro80_reset);
|
| 70 | memory_set_bank(1, 1);
|
| 59 | 71 | ppi8255_init(&mikro80_ppi8255_interface);
|
| 60 | 72 | mikro80_keyboard_line = 0;
|
| 61 | 73 | }
|
src/mess/machine/ut88.c
| r2055 | r2056 | |
| 13 | 13 | #include "devices/cassette.h"
|
| 14 | 14 | #include "machine/8255ppi.h"
|
| 15 | 15 | |
| 16 | | |
| 17 | 16 | static int ut88_8255_porta;
|
| 18 | 17 | |
| 19 | | |
| 20 | 18 | /* Driver initialization */
|
| 21 | 19 | DRIVER_INIT(ut88)
|
| 22 | 20 | {
|
| 23 | | |
| 21 | /* set initialy ROM to be visible on first bank */
|
| 22 | UINT8 *RAM = memory_region(REGION_CPU1);
|
| 23 | memset(RAM,0x0000,0x0800); // make frist page empty by default
|
| 24 | memory_configure_bank(1, 1, 2, RAM, 0x0000);
|
| 25 | memory_configure_bank(1, 0, 2, RAM, 0xf800);
|
| 24 | 26 | }
|
| 25 | 27 | |
| 26 | | |
| 27 | 28 | READ8_HANDLER (ut88_8255_portb_r )
|
| 28 | 29 | {
|
| 29 | 30 | switch (ut88_8255_porta ^ 0xff) {
|
| r2055 | r2056 | |
| 60 | 61 | {NULL},
|
| 61 | 62 | };
|
| 62 | 63 | |
| 64 | static TIMER_CALLBACK( ut88_reset )
|
| 65 | {
|
| 66 | memory_set_bank(1, 0);
|
| 67 | }
|
| 68 | |
| 63 | 69 | MACHINE_RESET( ut88 )
|
| 64 | 70 | {
|
| 71 | timer_set(ATTOTIME_IN_USEC(10), NULL, 0, ut88_reset);
|
| 72 | memory_set_bank(1, 1);
|
| 65 | 73 | ppi8255_init(&ut88_ppi8255_interface);
|
| 66 | 74 | ut88_8255_porta = 0;
|
| 67 | 75 | }
|
| r2055 | r2056 | |
| 116 | 124 | }
|
| 117 | 125 | }
|
| 118 | 126 | |
| 119 | | static int bcd_to_7seg[16] = |
| 127 | static int hex_to_7seg[16] = |
| 120 | 128 | {0x3F, 0x06, 0x5B, 0x4F, |
| 121 | 129 | 0x66, 0x6D, 0x7D, 0x07, |
| 122 | 130 | 0x7F, 0x6F, 0x77, 0x7c, |
| r2055 | r2056 | |
| 126 | 134 | {
|
| 127 | 135 | int i;
|
| 128 | 136 | for (i=0;i<6;i++) {
|
| 129 | | output_set_digit_value(i, bcd_to_7seg[lcd_digit[i]]);
|
| 137 | output_set_digit_value(i, hex_to_7seg[lcd_digit[i]]);
|
| 130 | 138 | }
|
| 131 | 139 | }
|
| 132 | 140 | |
src/mess/drivers/special.c
| r2055 | r2056 | |
| 12 | 12 | #include "cpu/i8085/i8085.h"
|
| 13 | 13 | #include "includes/special.h"
|
| 14 | 14 | #include "machine/8255ppi.h"
|
| 15 | #include "sound/dac.h"
|
| 15 | 16 | #include "devices/cassette.h"
|
| 16 | 17 | #include "formats/rk_cas.h"
|
| 17 | 18 | |
| 18 | 19 | /* Address maps */
|
| 19 | 20 | static ADDRESS_MAP_START(specialist_mem, ADDRESS_SPACE_PROGRAM, 8)
|
| 20 | | AM_RANGE( 0x0000, 0x8fff ) AM_RAM // RAM
|
| 21 | | AM_RANGE( 0x9000, 0xbfff ) AM_RAM // Video RAM
|
| 21 | AM_RANGE( 0x0000, 0x2fff ) AM_RAMBANK(1) // First bank
|
| 22 | AM_RANGE( 0x3000, 0x8fff ) AM_RAM // RAM |
| 23 | AM_RANGE( 0x9000, 0xbfff ) AM_RAM AM_BASE(&specialist_video_ram) // Video RAM
|
| 22 | 24 | AM_RANGE( 0xc000, 0xf000 ) AM_ROM // System ROM
|
| 23 | 25 | AM_RANGE( 0xf000, 0xf700 ) AM_NOP
|
| 24 | 26 | AM_RANGE( 0xf800, 0xffff ) AM_READWRITE(specialist_keyboard_r,specialist_keyboard_w) // 8255 for keyboard
|
| r2055 | r2056 | |
| 161 | 163 | |
| 162 | 164 | MDRV_VIDEO_START(special)
|
| 163 | 165 | MDRV_VIDEO_UPDATE(special)
|
| 164 | | MACHINE_DRIVER_END
|
| 165 | 166 | |
| 167 | /* audio hardware */
|
| 168 | MDRV_SPEAKER_STANDARD_MONO("mono")
|
| 169 | MDRV_SOUND_ADD(DAC, 0)
|
| 170 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
|
| 171 | MDRV_SOUND_ADD(WAVE, 0)
|
| 172 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) |
| 173 | MACHINE_DRIVER_END
|
| 174 | |
| 166 | 175 |
|
| 167 | 176 | /* ROM definition */
|
| 168 | 177 | ROM_START( special )
|
src/mess/drivers/mikro80.c
| r2055 | r2056 | |
| 20 | 20 | |
| 21 | 21 | /* Address maps */
|
| 22 | 22 | static ADDRESS_MAP_START(mikro80_mem, ADDRESS_SPACE_PROGRAM, 8)
|
| 23 | | AM_RANGE( 0x0000, 0xf7ff ) AM_RAM // RAM
|
| 23 | AM_RANGE( 0x0000, 0x07ff ) AM_RAMBANK(1) // First bank
|
| 24 | AM_RANGE( 0x0800, 0xdfff ) AM_RAM // RAM
|
| 25 | AM_RANGE( 0xe000, 0xe7ff ) AM_RAM AM_BASE(&mikro80_cursor_ram)// Video RAM
|
| 26 | AM_RANGE( 0xe800, 0xefff ) AM_RAM AM_BASE(&mikro80_video_ram) // Video RAM
|
| 27 | AM_RANGE( 0xd000, 0xf7ff ) AM_RAM // RAM
|
| 24 | 28 | AM_RANGE( 0xf800, 0xffff ) AM_ROM // System ROM
|
| 25 | 29 | ADDRESS_MAP_END
|
| 26 | 30 | |
src/mess/drivers/ut88.c
| r2055 | r2056 | |
| 28 | 28 | AM_RANGE( 0x9000, 0x9fff ) AM_WRITE(ut88mini_write_led) // 7seg LED |
| 29 | 29 | ADDRESS_MAP_END
|
| 30 | 30 | |
| 31 | | static ADDRESS_MAP_START(ut88_mem, ADDRESS_SPACE_PROGRAM, 8)
|
| 32 | | AM_RANGE( 0x0000, 0xf7ff ) AM_RAM // RAM
|
| 31 | static ADDRESS_MAP_START(ut88_mem, ADDRESS_SPACE_PROGRAM, 8) |
| 32 | AM_RANGE( 0x0000, 0x07ff ) AM_RAMBANK(1) // First bank
|
| 33 | AM_RANGE( 0x0800, 0xdfff ) AM_RAM // RAM
|
| 34 | AM_RANGE( 0xe000, 0xe7ff ) AM_RAM // Video RAM (not used)
|
| 35 | AM_RANGE( 0xe800, 0xefff ) AM_RAM AM_BASE(&ut88_video_ram) // Video RAM
|
| 36 | AM_RANGE( 0xf400, 0xf7ff ) AM_RAM // System RAM
|
| 33 | 37 | AM_RANGE( 0xf800, 0xffff ) AM_ROM // System ROM
|
| 34 | 38 | ADDRESS_MAP_END
|
| 35 | 39 | |