src/mess/video/trs80.c
| r4442 | r4443 | |
| 44 | 44 | } |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | | /*************************************************************************** |
| 48 | | Statics for this module |
| 49 | | ***************************************************************************/ |
| 50 | | static int width_store = 10; // bodgy value to force an initial resize |
| 51 | 47 | |
| 48 | /* 7 or 8-bit video, 32/64 characters per line = trs80, trs80l2, sys80 */ |
| 52 | 49 | VIDEO_UPDATE( trs80 ) |
| 53 | 50 | { |
| 54 | | int width = 64 - ((trs80_mode & 1) << 5); |
| 55 | | int skip = 3 - (width >> 5); |
| 56 | | int i=0,x,y,chr; |
| 57 | | int adj=input_port_read(screen->machine, "CONFIG")&0x40; |
| 51 | UINT8 y,ra,chr,gfx; |
| 52 | UINT16 sy=0,ma=0,x; |
| 53 | UINT8 *FNT = memory_region(screen->machine, "gfx1"); |
| 54 | UINT8 seven_bit = screen->machine->gamedrv->flags >> 24; |
| 55 | static UINT8 size_store=0; |
| 56 | static UINT8 cols=64,skip=1; |
| 57 | UINT8 lores1,lores2; |
| 58 | 58 | |
| 59 | | if (width != width_store) |
| 59 | if ((trs80_mode & 0x7f) != size_store) |
| 60 | 60 | { |
| 61 | | width_store = width; |
| 62 | | video_screen_set_visarea(screen, 0, width*FW-1, 0, 16*FH-1); |
| 61 | size_store = trs80_mode & 0x7f; |
| 62 | cols = (trs80_mode & 1) ? 32 : 64; |
| 63 | skip = (trs80_mode & 1) ? 2 : 1; |
| 64 | video_screen_set_visarea(screen, 0, cols*FW-1, 0, 16*FH-1); |
| 63 | 65 | } |
| 64 | 66 | |
| 65 | 67 | for (y = 0; y < 16; y++) |
| 66 | 68 | { |
| 67 | | for (x = 0; x < 64; x+=skip) |
| 69 | for (ra = 0; ra < FH; ra++) |
| 68 | 70 | { |
| 69 | | i = (y << 6) + x; |
| 70 | | chr=videoram[i]; |
| 71 | | if ((adj) && (chr < 32)) chr+=64; // 7-bit video handler |
| 72 | | drawgfx( bitmap,screen->machine->gfx[0],chr,0,0,0,x/skip*FW,y*FH, |
| 73 | | NULL,TRANSPARENCY_NONE,0); |
| 71 | UINT16 *p = BITMAP_ADDR16(bitmap, sy++, 0); |
| 72 | |
| 73 | for (x = ma; x < ma + 64; x+=skip) |
| 74 | { |
| 75 | chr = videoram[x]; |
| 76 | |
| 77 | if (chr & 0x80) |
| 78 | { |
| 79 | lores1 = 1<<((ra & 0x0c)>>1); |
| 80 | lores2 = lores1<<1; |
| 81 | /* Display one line of a lores character (6 pixels) */ |
| 82 | *p = ( chr & lores1 ) ? 1 : 0; p++; |
| 83 | *p = ( chr & lores1 ) ? 1 : 0; p++; |
| 84 | *p = ( chr & lores1 ) ? 1 : 0; p++; |
| 85 | *p = ( chr & lores2 ) ? 1 : 0; p++; |
| 86 | *p = ( chr & lores2 ) ? 1 : 0; p++; |
| 87 | *p = ( chr & lores2 ) ? 1 : 0; p++; |
| 88 | } |
| 89 | else |
| 90 | { |
| 91 | if ((seven_bit) && (chr < 32)) chr+=64; |
| 92 | |
| 93 | /* get pattern of pixels for that character scanline */ |
| 94 | if (ra < 8) |
| 95 | gfx = FNT[(chr<<3) | ra ]; |
| 96 | else |
| 97 | gfx = 0; |
| 98 | |
| 99 | /* Display a scanline of a character (6 pixels) */ |
| 100 | *p = ( gfx & 0x20 ) ? 1 : 0; p++; |
| 101 | *p = ( gfx & 0x10 ) ? 1 : 0; p++; |
| 102 | *p = ( gfx & 0x08 ) ? 1 : 0; p++; |
| 103 | *p = ( gfx & 0x04 ) ? 1 : 0; p++; |
| 104 | *p = ( gfx & 0x02 ) ? 1 : 0; p++; |
| 105 | *p = ( gfx & 0x01 ) ? 1 : 0; p++; |
| 106 | } |
| 107 | } |
| 74 | 108 | } |
| 109 | ma+=64; |
| 75 | 110 | } |
| 76 | 111 | return 0; |
| 77 | 112 | } |
| 78 | 113 | |
| 114 | |
| 115 | /* 7 or 8-bit video, 64/32 characters per line = ht1080z, ht1080z2, ht108064 */ |
| 116 | VIDEO_UPDATE( ht1080z ) |
| 117 | { |
| 118 | UINT8 y,ra,chr,gfx; |
| 119 | UINT16 sy=0,ma=0,x; |
| 120 | UINT8 *FNT = memory_region(screen->machine, "gfx1"); |
| 121 | UINT8 seven_bit = screen->machine->gamedrv->flags >> 24; |
| 122 | static UINT8 size_store=0; |
| 123 | static UINT8 cols=64,skip=1; |
| 124 | UINT8 lores1,lores2; |
| 125 | |
| 126 | if ((trs80_mode & 0x7f) != size_store) |
| 127 | { |
| 128 | size_store = trs80_mode & 0x7f; |
| 129 | cols = (trs80_mode & 1) ? 32 : 64; |
| 130 | skip = (trs80_mode & 1) ? 2 : 1; |
| 131 | video_screen_set_visarea(screen, 0, cols*FW-1, 0, 16*FH-1); |
| 132 | } |
| 133 | |
| 134 | for (y = 0; y < 16; y++) |
| 135 | { |
| 136 | for (ra = 0; ra < FH; ra++) |
| 137 | { |
| 138 | UINT16 *p = BITMAP_ADDR16(bitmap, sy++, 0); |
| 139 | |
| 140 | for (x = ma; x < ma + 64; x+=skip) |
| 141 | { |
| 142 | chr = videoram[x]; |
| 143 | |
| 144 | if (chr & 0x80) |
| 145 | { |
| 146 | lores1 = 1<<((ra & 0x0c)>>1); |
| 147 | lores2 = lores1<<1; |
| 148 | /* Display one line of a lores character (6 pixels) */ |
| 149 | *p = ( chr & lores1 ) ? 1 : 0; p++; |
| 150 | *p = ( chr & lores1 ) ? 1 : 0; p++; |
| 151 | *p = ( chr & lores1 ) ? 1 : 0; p++; |
| 152 | *p = ( chr & lores2 ) ? 1 : 0; p++; |
| 153 | *p = ( chr & lores2 ) ? 1 : 0; p++; |
| 154 | *p = ( chr & lores2 ) ? 1 : 0; p++; |
| 155 | } |
| 156 | else |
| 157 | { |
| 158 | if ((seven_bit) && (chr < 32)) chr+=64; |
| 159 | |
| 160 | /* get pattern of pixels for that character scanline */ |
| 161 | gfx = FNT[(chr<<4) | ra ]; |
| 162 | |
| 163 | /* Display a scanline of a character (6 pixels) */ |
| 164 | *p = ( gfx & 0x80 ) ? 1 : 0; p++; |
| 165 | *p = ( gfx & 0x40 ) ? 1 : 0; p++; |
| 166 | *p = ( gfx & 0x20 ) ? 1 : 0; p++; |
| 167 | *p = ( gfx & 0x10 ) ? 1 : 0; p++; |
| 168 | *p = ( gfx & 0x08 ) ? 1 : 0; p++; |
| 169 | *p = ( gfx & 0x04 ) ? 1 : 0; p++; |
| 170 | } |
| 171 | } |
| 172 | } |
| 173 | ma+=64; |
| 174 | } |
| 175 | return 0; |
| 176 | } |
| 177 | |
| 178 | VIDEO_UPDATE( lnw80 ) |
| 179 | { |
| 180 | const UINT16 rows[] = { 0, 0x200, 0x100, 0x300, 1, 0x201, 0x101, 0x301 }; |
| 181 | UINT8 y,ra,chr,gfx; |
| 182 | UINT16 sy=0,ma=0,x; |
| 183 | UINT8 *FNT = memory_region(screen->machine, "gfx1"); |
| 184 | static UINT8 size_store=0; |
| 185 | static UINT8 cols=64,skip=1; |
| 186 | UINT8 lores1,lores2; |
| 187 | |
| 188 | if ((trs80_mode & 0x7f) != size_store) |
| 189 | { |
| 190 | size_store = trs80_mode & 0x7f; |
| 191 | cols = (trs80_mode & 1) ? 32 : 64; |
| 192 | skip = (trs80_mode & 1) ? 2 : 1; |
| 193 | video_screen_set_visarea(screen, 0, cols*FW-1, 0, 16*FH-1); |
| 194 | } |
| 195 | |
| 196 | for (y = 0; y < 16; y++) |
| 197 | { |
| 198 | for (ra = 0; ra < FH; ra++) |
| 199 | { |
| 200 | UINT16 *p = BITMAP_ADDR16(bitmap, sy++, 0); |
| 201 | |
| 202 | for (x = ma; x < ma + 64; x+=skip) |
| 203 | { |
| 204 | chr = videoram[x]; |
| 205 | |
| 206 | if (chr & 0x80) |
| 207 | { |
| 208 | lores1 = 1<<((ra & 0x0c)>>1); |
| 209 | lores2 = lores1<<1; |
| 210 | /* Display one line of a lores character (6 pixels) */ |
| 211 | *p = ( chr & lores1 ) ? 1 : 0; p++; |
| 212 | *p = ( chr & lores1 ) ? 1 : 0; p++; |
| 213 | *p = ( chr & lores1 ) ? 1 : 0; p++; |
| 214 | *p = ( chr & lores2 ) ? 1 : 0; p++; |
| 215 | *p = ( chr & lores2 ) ? 1 : 0; p++; |
| 216 | *p = ( chr & lores2 ) ? 1 : 0; p++; |
| 217 | } |
| 218 | else |
| 219 | { |
| 220 | /* get pattern of pixels for that character scanline */ |
| 221 | if (ra < 8) |
| 222 | gfx = FNT[(chr<<1) | rows[ra] ]; |
| 223 | else |
| 224 | gfx = 0; |
| 225 | |
| 226 | /* Display a scanline of a character (6 pixels) */ |
| 227 | *p = ( gfx & 0x04 ) ? 1 : 0; p++; |
| 228 | *p = ( gfx & 0x02 ) ? 1 : 0; p++; |
| 229 | *p = ( gfx & 0x40 ) ? 1 : 0; p++; |
| 230 | *p = ( gfx & 0x80 ) ? 1 : 0; p++; |
| 231 | *p = ( gfx & 0x20 ) ? 1 : 0; p++; |
| 232 | *p = ( gfx & 0x08 ) ? 1 : 0; p++; |
| 233 | } |
| 234 | } |
| 235 | } |
| 236 | ma+=64; |
| 237 | } |
| 238 | return 0; |
| 239 | } |
| 240 | |
| 241 | |
| 242 | VIDEO_UPDATE( radionic ) |
| 243 | { |
| 244 | UINT8 y,ra,chr,gfx; |
| 245 | UINT16 sy=0,ma=0,x; |
| 246 | UINT8 *FNT = memory_region(screen->machine, "gfx1"); |
| 247 | static UINT8 size_store=0; |
| 248 | static UINT8 cols=64,skip=1; |
| 249 | UINT8 lores1,lores2; |
| 250 | |
| 251 | if ((trs80_mode & 0x7f) != size_store) |
| 252 | { |
| 253 | size_store = trs80_mode & 0x7f; |
| 254 | cols = (trs80_mode & 1) ? 32 : 64; |
| 255 | skip = (trs80_mode & 1) ? 2 : 1; |
| 256 | video_screen_set_visarea(screen, 0, cols*FW-1, 0, 16*FH-1); |
| 257 | } |
| 258 | |
| 259 | for (y = 0; y < 16; y++) |
| 260 | { |
| 261 | for (ra = 0; ra < FH; ra++) |
| 262 | { |
| 263 | UINT16 *p = BITMAP_ADDR16(bitmap, sy++, 0); |
| 264 | |
| 265 | for (x = ma; x < ma + 64; x+=skip) |
| 266 | { |
| 267 | chr = videoram[x]; |
| 268 | |
| 269 | if ((chr & 0xc0) == 0x80) |
| 270 | { |
| 271 | lores1 = 1<<((ra & 0x0c)>>1); |
| 272 | lores2 = lores1<<1; |
| 273 | /* Display one line of a lores character (6 pixels) */ |
| 274 | *p = ( chr & lores1 ) ? 1 : 0; p++; |
| 275 | *p = ( chr & lores1 ) ? 1 : 0; p++; |
| 276 | *p = ( chr & lores1 ) ? 1 : 0; p++; |
| 277 | *p = ( chr & lores2 ) ? 1 : 0; p++; |
| 278 | *p = ( chr & lores2 ) ? 1 : 0; p++; |
| 279 | *p = ( chr & lores2 ) ? 1 : 0; p++; |
| 280 | } |
| 281 | else |
| 282 | { |
| 283 | /* get pattern of pixels for that character scanline */ |
| 284 | if (ra < 8) |
| 285 | gfx = FNT[(chr<<3) | ra ]; |
| 286 | else |
| 287 | gfx = FNT[(chr<<3) | (ra & 7) | 0x800]; |
| 288 | |
| 289 | /* Display a scanline of a character (6 pixels) */ |
| 290 | *p = ( gfx & 0x01 ) ? 1 : 0; p++; |
| 291 | *p = ( gfx & 0x02 ) ? 1 : 0; p++; |
| 292 | *p = ( gfx & 0x04 ) ? 1 : 0; p++; |
| 293 | *p = ( gfx & 0x08 ) ? 1 : 0; p++; |
| 294 | *p = ( gfx & 0x10 ) ? 1 : 0; p++; |
| 295 | *p = ( gfx & 0x20 ) ? 1 : 0; p++; |
| 296 | } |
| 297 | } |
| 298 | } |
| 299 | ma+=64; |
| 300 | } |
| 301 | return 0; |
| 302 | } |
| 303 | |
| 304 | |
| 79 | 305 | /*************************************************************************** |
| 80 | 306 | Write to video ram |
| 81 | 307 | ***************************************************************************/ |
src/mess/machine/trs80.c
| r4442 | r4443 | |
| 230 | 230 | } |
| 231 | 231 | |
| 232 | 232 | |
| 233 | | DRIVER_INIT( trs80 ) |
| 234 | | { |
| 235 | | UINT8 *FNT = memory_region(machine, "gfx1"); |
| 236 | | int i, y; |
| 237 | | |
| 238 | | for( i = 0; i < 0x80; i++ ) |
| 239 | | { |
| 240 | | /* copy eight lines from the character generator */ |
| 241 | | for (y = 0; y < 8; y++) |
| 242 | | FNT[i*FH+y] = FNT[0x800+i*8+y] << 3; |
| 243 | | /* wipe out the lower lines (no descenders!) */ |
| 244 | | for (y = 8; y < FH; y++) |
| 245 | | FNT[i*FH+y] = 0; |
| 246 | | } |
| 247 | | /* setup the 2x3 chunky block graphics (two times 64 characters) */ |
| 248 | | for( i = 0x80; i < 0x100; i++ ) |
| 249 | | { |
| 250 | | UINT8 b0, b1, b2, b3, b4, b5; |
| 251 | | b0 = (i & 0x01) ? 0xe0 : 0x00; |
| 252 | | b1 = (i & 0x02) ? 0x1c : 0x00; |
| 253 | | b2 = (i & 0x04) ? 0xe0 : 0x00; |
| 254 | | b3 = (i & 0x08) ? 0x1c : 0x00; |
| 255 | | b4 = (i & 0x10) ? 0xe0 : 0x00; |
| 256 | | b5 = (i & 0x20) ? 0x1c : 0x00; |
| 257 | | |
| 258 | | FNT[i*FH+ 0] = FNT[i*FH+ 1] = FNT[i*FH+ 2] = FNT[i*FH+ 3] = b0 | b1; |
| 259 | | FNT[i*FH+ 4] = FNT[i*FH+ 5] = FNT[i*FH+ 6] = FNT[i*FH+ 7] = b2 | b3; |
| 260 | | FNT[i*FH+ 8] = FNT[i*FH+ 9] = FNT[i*FH+10] = FNT[i*FH+11] = b4 | b5; |
| 261 | | } |
| 262 | | } |
| 263 | | |
| 264 | | DRIVER_INIT( radionic ) |
| 265 | | { |
| 266 | | UINT8 *FNT = memory_region(machine, "gfx1"); |
| 267 | | int i, y; |
| 268 | | |
| 269 | | for( i = 0; i < 0x80; i++ ) |
| 270 | | { |
| 271 | | /* copy eight lines from the character generator, reversing the order of the dots */ |
| 272 | | for (y = 0; y < 8; y++) |
| 273 | | FNT[i*FH+y] = BITSWAP8(FNT[0x800+i*8+y], 0, 1, 2, 3, 4, 5, 6, 7); |
| 274 | | |
| 275 | | /* now add descenders */ |
| 276 | | for (y = 0; y < 4; y++) |
| 277 | | FNT[i*FH+y+8] = BITSWAP8(FNT[0x1000+i*8+y], 0, 1, 2, 3, 4, 5, 6, 7); |
| 278 | | } |
| 279 | | /* setup the 2x3 chunky block graphics (two times 64 characters) */ |
| 280 | | for( i = 0x80; i < 0x100; i++ ) |
| 281 | | { |
| 282 | | UINT8 b0, b1, b2, b3, b4, b5; |
| 283 | | b0 = (i & 0x01) ? 0xe0 : 0x00; |
| 284 | | b1 = (i & 0x02) ? 0x1c : 0x00; |
| 285 | | b2 = (i & 0x04) ? 0xe0 : 0x00; |
| 286 | | b3 = (i & 0x08) ? 0x1c : 0x00; |
| 287 | | b4 = (i & 0x10) ? 0xe0 : 0x00; |
| 288 | | b5 = (i & 0x20) ? 0x1c : 0x00; |
| 289 | | |
| 290 | | FNT[i*FH+ 0] = FNT[i*FH+ 1] = FNT[i*FH+ 2] = FNT[i*FH+ 3] = b0 | b1; |
| 291 | | FNT[i*FH+ 4] = FNT[i*FH+ 5] = FNT[i*FH+ 6] = FNT[i*FH+ 7] = b2 | b3; |
| 292 | | FNT[i*FH+ 8] = FNT[i*FH+ 9] = FNT[i*FH+10] = FNT[i*FH+11] = b4 | b5; |
| 293 | | } |
| 294 | | } |
| 295 | | |
| 296 | | DRIVER_INIT( lnw80 ) |
| 297 | | { |
| 298 | | UINT8 y, *FNT = memory_region(machine, "gfx1"); |
| 299 | | UINT16 i, rows[] = { 0, 0x200, 0x100, 0x300, 1, 0x201, 0x101, 0x301 }; |
| 300 | | |
| 301 | | for( i = 0; i < 0x80; i++ ) |
| 302 | | { |
| 303 | | /* copy eight lines from the character generator */ |
| 304 | | for (y = 0; y < 8; y++) |
| 305 | | FNT[i*FH+y] = BITSWAP8(FNT[0x800+(i<<1)+rows[y]], 2, 1, 6, 7, 5, 3, 4, 0); /* bits 0,3,4 are blank */ |
| 306 | | } |
| 307 | | /* setup the 2x3 chunky block graphics (two times 64 characters) */ |
| 308 | | for( i = 0x80; i < 0x100; i++ ) |
| 309 | | { |
| 310 | | UINT8 b0, b1, b2, b3, b4, b5; |
| 311 | | b0 = (i & 0x01) ? 0xe0 : 0x00; |
| 312 | | b1 = (i & 0x02) ? 0x1c : 0x00; |
| 313 | | b2 = (i & 0x04) ? 0xe0 : 0x00; |
| 314 | | b3 = (i & 0x08) ? 0x1c : 0x00; |
| 315 | | b4 = (i & 0x10) ? 0xe0 : 0x00; |
| 316 | | b5 = (i & 0x20) ? 0x1c : 0x00; |
| 317 | | |
| 318 | | FNT[i*FH+ 0] = FNT[i*FH+ 1] = FNT[i*FH+ 2] = FNT[i*FH+ 3] = b0 | b1; |
| 319 | | FNT[i*FH+ 4] = FNT[i*FH+ 5] = FNT[i*FH+ 6] = FNT[i*FH+ 7] = b2 | b3; |
| 320 | | FNT[i*FH+ 8] = FNT[i*FH+ 9] = FNT[i*FH+10] = FNT[i*FH+11] = b4 | b5; |
| 321 | | } |
| 322 | | } |
| 323 | | |
| 324 | | DRIVER_INIT( ht1080z ) |
| 325 | | { |
| 326 | | } |
| 327 | | |
| 328 | | |
| 329 | | DRIVER_INIT( ht108064 ) |
| 330 | | { |
| 331 | | UINT8 *FNT = memory_region(machine, "gfx1"); |
| 332 | | int i; |
| 333 | | for( i=0;i<0x800;i++) { |
| 334 | | FNT[i] &= 0xf8; |
| 335 | | } |
| 336 | | } |
| 337 | | |
| 338 | 233 | /************************************* |
| 339 | 234 | * |
| 340 | 235 | * Port handlers. |
src/mess/drivers/trs80.c
| r4442 | r4443 | |
| 116 | 116 | |
| 117 | 117 | /* Core includes */ |
| 118 | 118 | #include "driver.h" |
| 119 | | #include "deprecat.h" |
| 120 | 119 | #include "cpu/z80/z80.h" |
| 121 | 120 | #include "sound/wave.h" |
| 122 | 121 | #include "machine/ctronics.h" |
| r4442 | r4443 | |
| 173 | 172 | AM_RANGE(0x37ee, 0x37ee) AM_DEVREADWRITE("wd179x", wd17xx_sector_r, wd17xx_sector_w) |
| 174 | 173 | AM_RANGE(0x37ef, 0x37ef) AM_DEVREADWRITE("wd179x", wd17xx_data_r, wd17xx_data_w) |
| 175 | 174 | AM_RANGE(0x3800, 0x38ff) AM_MIRROR(0x300) AM_READ(trs80_keyboard_r) |
| 176 | | AM_RANGE(0x3c00, 0x3fff) AM_READWRITE(trs80_videoram_r, trs80_videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) |
| 175 | AM_RANGE(0x3c00, 0x3fff) AM_READWRITE(trs80_videoram_r, trs80_videoram_w) AM_BASE(&videoram) |
| 177 | 176 | AM_RANGE(0x4000, 0xffff) AM_RAM |
| 178 | 177 | ADDRESS_MAP_END |
| 179 | 178 | |
| r4442 | r4443 | |
| 194 | 193 | static ADDRESS_MAP_START( model3_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 195 | 194 | AM_RANGE(0x0000, 0x37ff) AM_ROM |
| 196 | 195 | AM_RANGE(0x3800, 0x38ff) AM_MIRROR(0x300) AM_READ(trs80_keyboard_r) |
| 197 | | AM_RANGE(0x3c00, 0x3fff) AM_READWRITE(trs80_videoram_r, trs80_videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size) |
| 196 | AM_RANGE(0x3c00, 0x3fff) AM_READWRITE(trs80_videoram_r, trs80_videoram_w) AM_BASE(&videoram) |
| 198 | 197 | AM_RANGE(0x4000, 0xffff) AM_RAM |
| 199 | 198 | ADDRESS_MAP_END |
| 200 | 199 | |
| r4442 | r4443 | |
| 394 | 393 | PORT_DIPSETTING( 0x60, "8") |
| 395 | 394 | INPUT_PORTS_END |
| 396 | 395 | |
| 397 | | static const gfx_layout trs80_charlayout = |
| 398 | | { |
| 399 | | FW,FH, /* 6 x 12 characters */ |
| 400 | | 256, /* 256 characters */ |
| 401 | | 1, /* 1 bits per pixel */ |
| 402 | | { 0 }, /* no bitplanes; 1 bit per pixel */ |
| 403 | | /* x offsets */ |
| 404 | | { 0, 1, 2, 3, 4, 5 }, |
| 405 | | /* y offsets */ |
| 406 | | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, |
| 407 | | 6*8, 7*8, 8*8, 9*8,10*8,11*8 }, |
| 408 | | 8*FH /* every char takes FH bytes */ |
| 409 | | }; |
| 410 | 396 | |
| 411 | | static GFXDECODE_START( trs80 ) |
| 412 | | GFXDECODE_ENTRY( "gfx1", 0, trs80_charlayout, 0, 1 ) |
| 413 | | GFXDECODE_END |
| 414 | | |
| 415 | | static const gfx_layout ht1080z_charlayout = |
| 416 | | { |
| 417 | | 6,12, /* 6 x 12 characters */ |
| 418 | | 128, /* 128 characters */ |
| 419 | | 1, /* 1 bits per pixel */ |
| 420 | | { 0 }, /* no bitplanes; 1 bit per pixel */ |
| 421 | | /* x offsets */ |
| 422 | | { 0, 1, 2, 3, 4, 5 }, |
| 423 | | /* y offsets */ |
| 424 | | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, |
| 425 | | 6*8, 7*8, 8*8, 9*8,10*8,11*8 }, |
| 426 | | 8*16 /* every char takes FH bytes */ |
| 427 | | }; |
| 428 | | |
| 429 | | static GFXDECODE_START( ht1080z ) |
| 430 | | GFXDECODE_ENTRY( "gfx1", 0, ht1080z_charlayout, 0, 1 ) |
| 431 | | GFXDECODE_END |
| 432 | | |
| 433 | | |
| 434 | 397 | static const cassette_config trs80l2_cassette_config = |
| 435 | 398 | { |
| 436 | 399 | trs80l2_cassette_formats, |
| r4442 | r4443 | |
| 463 | 426 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 464 | 427 | MDRV_SCREEN_SIZE(64*FW, 16*FH) |
| 465 | 428 | MDRV_SCREEN_VISIBLE_AREA(0*FW,64*FW-1,0*FH,16*FH-1) |
| 466 | | MDRV_GFXDECODE( trs80 ) |
| 467 | 429 | MDRV_PALETTE_LENGTH(2) |
| 468 | 430 | MDRV_PALETTE_INIT(black_and_white) |
| 469 | 431 | |
| r4442 | r4443 | |
| 511 | 473 | |
| 512 | 474 | static MACHINE_DRIVER_START( ht1080z ) |
| 513 | 475 | MDRV_IMPORT_FROM( sys80 ) |
| 514 | | MDRV_GFXDECODE( ht1080z ) |
| 476 | MDRV_VIDEO_UPDATE( ht1080z ) |
| 515 | 477 | MACHINE_DRIVER_END |
| 516 | 478 | |
| 479 | static MACHINE_DRIVER_START( lnw80 ) |
| 480 | MDRV_IMPORT_FROM( model1 ) |
| 481 | MDRV_VIDEO_UPDATE( lnw80 ) |
| 482 | MACHINE_DRIVER_END |
| 517 | 483 | |
| 484 | static MACHINE_DRIVER_START( radionic ) |
| 485 | MDRV_IMPORT_FROM( model1 ) |
| 486 | MDRV_VIDEO_UPDATE( radionic ) |
| 487 | MACHINE_DRIVER_END |
| 488 | |
| 489 | |
| 518 | 490 | /*************************************************************************** |
| 519 | 491 | |
| 520 | 492 | Game driver(s) |
| r4442 | r4443 | |
| 525 | 497 | ROM_REGION(0x10000, "maincpu",0) |
| 526 | 498 | ROM_LOAD("level1.rom", 0x0000, 0x1000, CRC(70d06dff) SHA1(20d75478fbf42214381e05b14f57072f3970f765)) |
| 527 | 499 | |
| 528 | | ROM_REGION(0x00c00, "gfx1",0) |
| 529 | | ROM_LOAD("trs80m1.chr", 0x0800, 0x0400, CRC(0033f2b9) SHA1(0d2cd4197d54e2e872b515bbfdaa98efe502eda7)) |
| 500 | ROM_REGION(0x00400, "gfx1",0) |
| 501 | ROM_LOAD("trs80m1.chr", 0x0000, 0x0400, CRC(0033f2b9) SHA1(0d2cd4197d54e2e872b515bbfdaa98efe502eda7)) |
| 530 | 502 | ROM_END |
| 531 | 503 | |
| 532 | 504 | ROM_START(trs80l2) |
| r4442 | r4443 | |
| 540 | 512 | ROMX_LOAD("trs80alt.z34",0x1000, 0x1000, CRC(6c791c2d) SHA1(2a38e0a248f6619d38f1a108eea7b95761cf2aee), ROM_BIOS(2)) |
| 541 | 513 | ROMX_LOAD("trs80alt.zl2",0x2000, 0x1000, CRC(55b3ad13) SHA1(6279f6a68f927ea8628458b278616736f0b3c339), ROM_BIOS(2)) |
| 542 | 514 | |
| 543 | | ROM_REGION(0x00c00, "gfx1",0) |
| 544 | | ROM_LOAD("trs80m1.chr", 0x0800, 0x0400, CRC(0033f2b9) SHA1(0d2cd4197d54e2e872b515bbfdaa98efe502eda7)) |
| 515 | ROM_REGION(0x00400, "gfx1",0) |
| 516 | ROM_LOAD("trs80m1.chr", 0x0000, 0x0400, CRC(0033f2b9) SHA1(0d2cd4197d54e2e872b515bbfdaa98efe502eda7)) |
| 545 | 517 | ROM_END |
| 546 | 518 | |
| 547 | 519 | ROM_START(radionic) |
| r4442 | r4443 | |
| 551 | 523 | ROM_LOAD("ep3.bin",0x2000, 0x1000, CRC(306e5d66) SHA1(1e1abcfb5b02d4567cf6a81ffc35318723442369)) |
| 552 | 524 | ROM_LOAD("ep4.bin",0x3000, 0x0400, CRC(70f90f26) SHA1(cbee70da04a3efac08e50b8e3a270262c2440120)) |
| 553 | 525 | ROM_CONTINUE(0x3000, 0x400) |
| 554 | | ROM_CONTINUE(0x3000, 0x7e0) |
| 555 | | ROM_IGNORE(0x20) |
| 526 | ROM_CONTINUE(0x3000, 0x600) |
| 527 | ROM_IGNORE(0x200) |
| 556 | 528 | |
| 557 | | ROM_REGION(0x01800, "gfx1",0) |
| 558 | | ROM_LOAD("trschar.bin", 0x0800, 0x1000, CRC(02e767b6) SHA1(c431fcc6bd04ce2800ca8c36f6f8aeb2f91ce9f7)) |
| 529 | ROM_REGION(0x01000, "gfx1",0) |
| 530 | ROM_LOAD("trschar.bin", 0x0000, 0x1000, CRC(02e767b6) SHA1(c431fcc6bd04ce2800ca8c36f6f8aeb2f91ce9f7)) |
| 559 | 531 | ROM_END |
| 560 | 532 | |
| 561 | 533 | ROM_START(sys80) |
| 562 | 534 | ROM_REGION(0x10000, "maincpu",0) |
| 563 | | ROM_LOAD("sys80rom.1", 0x0000, 0x1000, CRC(8f5214de) SHA1(d8c052be5a2d0ec74433043684791d0554bf203b)) |
| 564 | | ROM_LOAD("sys80rom.2", 0x1000, 0x1000, CRC(46e88fbf) SHA1(a3ca32757f269e09316e1e91ba1502774e2f5155)) |
| 535 | ROM_LOAD("sys80rom.1", 0x0000, 0x1000, CRC(8f5214de) SHA1(d8c052be5a2d0ec74433043684791d0554bf203b)) |
| 536 | ROM_LOAD("sys80rom.2", 0x1000, 0x1000, CRC(46e88fbf) SHA1(a3ca32757f269e09316e1e91ba1502774e2f5155)) |
| 565 | 537 | ROM_LOAD("trs80.zl2", 0x2000, 0x1000, CRC(306e5d66) SHA1(1e1abcfb5b02d4567cf6a81ffc35318723442369)) |
| 566 | 538 | |
| 567 | | ROM_REGION(0x00c00, "gfx1",0) |
| 568 | | ROM_LOAD("trs80m1.chr", 0x0800, 0x0400, CRC(0033f2b9) SHA1(0d2cd4197d54e2e872b515bbfdaa98efe502eda7)) |
| 539 | ROM_REGION(0x00400, "gfx1",0) |
| 540 | ROM_LOAD("trs80m1.chr", 0x0000, 0x0400, CRC(0033f2b9) SHA1(0d2cd4197d54e2e872b515bbfdaa98efe502eda7)) |
| 569 | 541 | ROM_END |
| 570 | 542 | |
| 571 | 543 | ROM_START(lnw80) |
| r4442 | r4443 | |
| 577 | 549 | ROM_LOAD("lnw_c.bin", 0x2000, 0x0800, CRC(2ba025d7) SHA1(232efbe23c3f5c2c6655466ebc0a51cf3697be9b)) |
| 578 | 550 | ROM_LOAD("lnw_c1.bin", 0x2800, 0x0800, CRC(ed547445) SHA1(20102de89a3ee4a65366bc2d62be94da984a156b)) |
| 579 | 551 | |
| 580 | | ROM_REGION(0x01000, "gfx1",0) |
| 581 | | ROM_LOAD("lnw_chr.bin",0x0800, 0x0400, CRC(c89b27df) SHA1(be2a009a07e4378d070002a558705e9a0de59389)) |
| 582 | | ROM_IGNORE( 0x400 ) /* leave out unused ff's */ |
| 552 | ROM_REGION(0x00800, "gfx1",0) |
| 553 | ROM_LOAD("lnw_chr.bin",0x0000, 0x0800, CRC(c89b27df) SHA1(be2a009a07e4378d070002a558705e9a0de59389)) |
| 583 | 554 | ROM_END |
| 584 | 555 | |
| 585 | 556 | ROM_START(trs80m3) |
| 586 | 557 | ROM_REGION(0x10000, "maincpu",0) |
| 587 | 558 | ROM_LOAD("trs80m3.rom", 0x0000, 0x3800, CRC(bddbf843) SHA1(04a1f062cf73c3931c038434e3f299482b6bf613)) |
| 588 | 559 | |
| 589 | | ROM_REGION(0x00c00, "gfx1",0) |
| 590 | | ROM_LOAD("trs80m1.chr", 0x0800, 0x0400, CRC(0033f2b9) SHA1(0d2cd4197d54e2e872b515bbfdaa98efe502eda7)) |
| 560 | ROM_REGION(0x00400, "gfx1",0) /* incorrect rom */ |
| 561 | ROM_LOAD("trs80m1.chr", 0x0000, 0x0400, CRC(0033f2b9) SHA1(0d2cd4197d54e2e872b515bbfdaa98efe502eda7)) |
| 591 | 562 | ROM_END |
| 592 | 563 | |
| 593 | 564 | ROM_START(trs80m4) |
| 594 | 565 | ROM_REGION(0x10000, "maincpu",0) |
| 595 | 566 | ROM_LOAD("trs80m4.rom", 0x0000, 0x3800, CRC(1a92d54d) SHA1(752555fdd0ff23abc9f35c6e03d9d9b4c0e9677b)) |
| 596 | 567 | |
| 597 | | ROM_REGION(0x00c00, "gfx1",0) |
| 568 | ROM_REGION(0x00400, "gfx1",0) |
| 598 | 569 | /* this rom unlikely to be the correct one, but it will do for now */ |
| 599 | | ROM_LOAD("trs80m1.chr", 0x0800, 0x0400, CRC(0033f2b9) SHA1(0d2cd4197d54e2e872b515bbfdaa98efe502eda7)) |
| 570 | ROM_LOAD("trs80m1.chr", 0x0000, 0x0400, CRC(0033f2b9) SHA1(0d2cd4197d54e2e872b515bbfdaa98efe502eda7)) |
| 600 | 571 | ROM_END |
| 601 | 572 | |
| 602 | 573 | ROM_START(ht1080z) |
| 603 | 574 | ROM_REGION(0x10000, "maincpu",0) |
| 604 | 575 | ROM_LOAD("ht1080z.rom", 0x0000, 0x3000, CRC(2bfef8f7) SHA1(7a350925fd05c20a3c95118c1ae56040c621be8f)) |
| 576 | |
| 605 | 577 | ROM_REGION(0x00800, "gfx1",0) |
| 606 | 578 | ROM_LOAD("ht1080-1.chr", 0x0000, 0x0800, CRC(e8c59d4f) SHA1(a15f30a543e53d3e30927a2e5b766fcf80f0ae31)) |
| 607 | 579 | ROM_END |
| r4442 | r4443 | |
| 609 | 581 | ROM_START(ht1080z2) |
| 610 | 582 | ROM_REGION(0x10000, "maincpu",0) |
| 611 | 583 | ROM_LOAD("ht1080z.rom", 0x0000, 0x3000, CRC(2bfef8f7) SHA1(7a350925fd05c20a3c95118c1ae56040c621be8f)) |
| 584 | |
| 612 | 585 | ROM_REGION(0x00800, "gfx1",0) |
| 613 | 586 | ROM_LOAD("ht1080-2.chr", 0x0000, 0x0800, CRC(6728f0ab) SHA1(1ba949f8596f1976546f99a3fdcd3beb7aded2c5)) |
| 614 | 587 | ROM_END |
| r4442 | r4443 | |
| 617 | 590 | ROM_REGION(0x10000, "maincpu",0) |
| 618 | 591 | ROM_LOAD("ht1080z.64", 0x0000, 0x3000, CRC(48985a30) SHA1(e84cf3121f9e0bb9e1b01b095f7a9581dcfaaae4)) |
| 619 | 592 | ROM_LOAD("ht1080z.ext", 0x3000, 0x0800, CRC(fc12bd28) SHA1(0da93a311f99ec7a1e77486afe800a937778e73b)) |
| 593 | |
| 620 | 594 | ROM_REGION(0x00800, "gfx1",0) |
| 621 | 595 | ROM_LOAD("ht1080-3.chr", 0x0000, 0x0800, CRC(e76b73a4) SHA1(6361ee9667bf59d50059d09b0baf8672fdb2e8af)) |
| 622 | 596 | ROM_END |
| r4442 | r4443 | |
| 646 | 620 | |
| 647 | 621 | |
| 648 | 622 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
| 649 | | COMP( 1977, trs80, 0, 0, trs80, trs80, trs80, 0, "Tandy Radio Shack", "TRS-80 Model I (Level I Basic)" , 0) |
| 650 | | COMP( 1978, trs80l2, trs80, 0, model1, trs80, trs80, trs8012, "Tandy Radio Shack", "TRS-80 Model I (Level II Basic)" , 0) |
| 651 | | COMP( 1983, radionic, trs80, 0, model1, trs80, radionic, trs8012, "Komtek", "Radionic" , 0) |
| 652 | | COMP( 1980, sys80, trs80, 0, sys80, trs80, trs80, trs8012, "EACA Computers Ltd.","System-80" , 0) |
| 653 | | COMP( 1981, lnw80, trs80, 0, model1, trs80m3, lnw80, trs8012, "LNW Research","LNW-80", 0 ) |
| 654 | | COMP( 1980, trs80m3, trs80, 0, model3, trs80m3, trs80, trs8012, "Tandy Radio Shack", "TRS-80 Model III", 0 ) |
| 655 | | COMP( 1980, trs80m4, trs80, 0, model3, trs80m3, trs80, trs8012, "Tandy Radio Shack", "TRS-80 Model 4", 0 ) |
| 656 | | COMP( 1983, ht1080z, trs80, 0, ht1080z, trs80, ht1080z, trs8012, "Hiradastechnika Szovetkezet", "HT-1080Z Series I" , 0) |
| 657 | | COMP( 1984, ht1080z2, trs80, 0, ht1080z, trs80, ht1080z, trs8012, "Hiradastechnika Szovetkezet", "HT-1080Z Series II" , 0) |
| 658 | | COMP( 1985, ht108064, trs80, 0, ht1080z, trs80, ht108064, trs8012, "Hiradastechnika Szovetkezet", "HT-1080Z/64" , 0) |
| 623 | COMP( 1977, trs80, 0, 0, trs80, trs80, 0, 0, "Tandy Radio Shack", "TRS-80 Model I (Level I Basic)" , 0) |
| 624 | COMP( 1978, trs80l2, trs80, 0, model1, trs80, 0, trs8012, "Tandy Radio Shack", "TRS-80 Model I (Level II Basic)" , 1<<24) |
| 625 | COMP( 1983, radionic, trs80, 0, radionic, trs80, 0, trs8012, "Komtek", "Radionic" , 0) |
| 626 | COMP( 1980, sys80, trs80, 0, sys80, trs80, 0, trs8012, "EACA Computers Ltd.","System-80" , 1<<24) |
| 627 | COMP( 1981, lnw80, trs80, 0, lnw80, trs80m3, 0, trs8012, "LNW Research","LNW-80", 0 ) |
| 628 | COMP( 1980, trs80m3, trs80, 0, model3, trs80m3, 0, trs8012, "Tandy Radio Shack", "TRS-80 Model III", 0 ) |
| 629 | COMP( 1980, trs80m4, trs80, 0, model3, trs80m3, 0, trs8012, "Tandy Radio Shack", "TRS-80 Model 4", 0 ) |
| 630 | COMP( 1983, ht1080z, trs80, 0, ht1080z, trs80, 0, trs8012, "Hiradastechnika Szovetkezet", "HT-1080Z Series I" , 1<<24) |
| 631 | COMP( 1984, ht1080z2, trs80, 0, ht1080z, trs80, 0, trs8012, "Hiradastechnika Szovetkezet", "HT-1080Z Series II" , 1<<24) |
| 632 | COMP( 1985, ht108064, trs80, 0, ht1080z, trs80, 0, trs8012, "Hiradastechnika Szovetkezet", "HT-1080Z/64" , 0) |