src/mess/machine/hec2hrp.c
| r6399 | r6400 | |
| 32 | 32 | |
| 33 | 33 | #include "driver.h" |
| 34 | 34 | #include "devices/cassette.h" |
| 35 | #include "devices/printer.h" |
| 35 | 36 | #include "sound/sn76477.h" // for sn sound |
| 36 | 37 | #include "sound/wave.h" // for K7 sound |
| 37 | 38 | #include "sound/discrete.h" // for 1 Bit sound |
| r6399 | r6400 | |
| 195 | 196 | } |
| 196 | 197 | } |
| 197 | 198 | |
| 199 | WRITE8_HANDLER( hector_keyboard_w ) |
| 200 | { |
| 201 | //nothing to do => Key() function manage the value |
| 202 | } |
| 203 | |
| 198 | 204 | READ8_HANDLER( hector_keyboard_r ) |
| 199 | 205 | { |
| 200 | 206 | return touches[offset]; //send the pre calculated value |
| r6399 | r6400 | |
| 258 | 264 | return value; |
| 259 | 265 | } |
| 260 | 266 | WRITE8_HANDLER( hector_sn_3000_w ) |
| 261 | | { // int i; |
| 267 | { |
| 262 | 268 | state3000 = data & 0xf8; // except bit 0 to 2 |
| 263 | | //printf( "\n Etat registre 3000 =\"%x\"",data); |
| 264 | 269 | if ((data & 7) != oldstate3000 ) |
| 265 | 270 | { |
| 266 | 271 | // Update sn76477 only when necessary! |
| r6399 | r6400 | |
| 268 | 273 | Update_Sound(space, data & 7); |
| 269 | 274 | } |
| 270 | 275 | oldstate3000 = data & 7; |
| 271 | | // affichage des valeurs saisies |
| 272 | | /* for(i=0; i<24 ;i++ ) |
| 273 | | { |
| 274 | | printf( "\n Etat 0 de la PIN %d DU SN76477 =\"%E\"",i,Pin_Value[i][0]); |
| 275 | | printf( "\n Etat 1 de la PIN %d DU SN76477 =\"%E\"",i,Pin_Value[i][1]); |
| 276 | | } |
| 277 | | for(i=0; i<16 ;i++ ) |
| 278 | | { |
| 279 | | printf( "\n Etat Au%d du SN76477 =\"%d\"",i,AU[i]); |
| 280 | | }*/ |
| 281 | 276 | } |
| 277 | |
| 282 | 278 | /* Color Interface */ |
| 283 | 279 | WRITE8_HANDLER( hector_color_a_w ) |
| 284 | 280 | { |
| r6399 | r6400 | |
| 345 | 341 | } |
| 346 | 342 | |
| 347 | 343 | |
| 348 | | |
| 349 | 344 | /******************************************************************************** |
| 350 | 345 | Port Handling |
| 351 | 346 | ********************************************************************************/ |
| r6399 | r6400 | |
| 357 | 352 | WRITE8_HANDLER( hector_mx40_io_port_w) |
| 358 | 353 | { |
| 359 | 354 | if ((offset &0x0ff) == 0xf0) // Port A => to printer |
| 360 | | { |
| 361 | | printf("%c",data); |
| 362 | | if (data==0x0d) |
| 363 | | printf("%c",0x0A); // Add a CR to the LF (against printer). |
| 364 | | } |
| 355 | printer_output(devtag_get_device(space->machine, "printer"), data); |
| 365 | 356 | if ((offset &0x0ff) == 0x40) // Port page 0 |
| 366 | 357 | memory_set_bank(space->machine, 2, HECTORMX_BANK_PAGE0); |
| 367 | 358 | if ((offset &0x0ff) == 0x41) // Port page 1 |
| r6399 | r6400 | |
| 378 | 369 | WRITE8_HANDLER( hector_mx80_io_port_w) |
| 379 | 370 | { |
| 380 | 371 | if ((offset &0x0ff) == 0xf0) // Port A => to printer |
| 381 | | { |
| 382 | | printf("%c",data); |
| 383 | | if (data==0x0d) |
| 384 | | printf("%c",0x0A); // Add a CR to the LF (against printer). |
| 385 | | } |
| 372 | printer_output(devtag_get_device(space->machine, "printer"), data); |
| 386 | 373 | if ((offset &0x0ff) == 0x40) // Port page 0 |
| 387 | 374 | memory_set_bank(space->machine, 2, HECTORMX_BANK_PAGE0); |
| 388 | 375 | if ((offset &0x0ff) == 0x41) // Port page 1 |
| r6399 | r6400 | |
| 488 | 475 | // SetEnvelopControl( R10 , R7, C8 ) : Attack/Decay |
| 489 | 476 | // Decay R |
| 490 | 477 | Pin_Value[7][1] = RES_K(680.0); //680 vu |
| 491 | | Pin_Value[7][0] = RES_K(222.325); // 142.325 (680 // 180KOhm) |
| 478 | Pin_Value[7][0] = RES_K(252.325); // 142.325 (680 // 180KOhm) |
| 492 | 479 | |
| 493 | 480 | // Capa A/D |
| 494 | 481 | Pin_Value[8][0] = CAP_U(0.47); // 0.47uf |
src/mess/drivers/interact.c
| r6399 | r6400 | |
| 46 | 46 | ****************************************************************************/ |
| 47 | 47 | |
| 48 | 48 | #include "driver.h" |
| 49 | | #include "cpu/z80/z80.h" //i8085/i8085.h" |
| 49 | #include "cpu/z80/z80.h" |
| 50 | #include "cpu/i8085/i8085.h" |
| 50 | 51 | #include "machine/pckeybrd.h" |
| 51 | 52 | #include "devices/cassette.h" |
| 53 | #include "devices/printer.h" |
| 52 | 54 | #include "sound/wave.h" // for K7 sound |
| 53 | 55 | #include "sound/sn76477.h" // for sn sound |
| 54 | 56 | #include "sound/discrete.h" // for 1 Bit sound |
| r6399 | r6400 | |
| 64 | 66 | AM_RANGE(0x2000,0x2003) AM_WRITE( hector_sn_2000_w) // Sound |
| 65 | 67 | AM_RANGE(0x2800,0x2803) AM_WRITE( hector_sn_2800_w) // Sound |
| 66 | 68 | AM_RANGE(0x3000,0x3000) AM_READWRITE( hector_cassette_r, hector_sn_3000_w)// Write necessary |
| 67 | | AM_RANGE(0x3800,0x3807) AM_READ( hector_keyboard_r) // Keyboard |
| 69 | AM_RANGE(0x3800,0x3807) AM_READWRITE( hector_keyboard_r, hector_keyboard_w) // Keyboard |
| 68 | 70 | |
| 69 | 71 | // Main ROM page |
| 70 | 72 | AM_RANGE(0x0000,0x3fff) AM_ROM //BANK(2) |
| r6399 | r6400 | |
| 144 | 146 | static MACHINE_DRIVER_START( interact ) |
| 145 | 147 | |
| 146 | 148 | /* basic machine hardware */ |
| 149 | MDRV_CPU_ADD("maincpu", 8080, XTAL_2MHz) |
| 150 | MDRV_CPU_PROGRAM_MAP(interact_mem) |
| 151 | MDRV_CPU_PERIODIC_INT(irq0_line_hold,50) // put on the 8080 irq in Hz |
| 152 | |
| 153 | MDRV_MACHINE_RESET(interact) |
| 154 | MDRV_MACHINE_START(interact) |
| 155 | |
| 156 | /* video hardware */ |
| 157 | MDRV_SCREEN_ADD("screen", RASTER) |
| 158 | MDRV_SCREEN_REFRESH_RATE(60) |
| 159 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 160 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 161 | MDRV_SCREEN_SIZE(256, 79) |
| 162 | MDRV_SCREEN_VISIBLE_AREA(0, 112, 0, 77) |
| 163 | MDRV_PALETTE_LENGTH(16) // 8 colours, but only 4 at a time |
| 164 | MDRV_PALETTE_INIT(black_and_white) |
| 165 | |
| 166 | MDRV_VIDEO_START(interact) |
| 167 | MDRV_VIDEO_UPDATE(interact) |
| 168 | /* sound hardware */ |
| 169 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 170 | MDRV_SOUND_WAVE_ADD("wave", "cassette") |
| 171 | MDRV_SOUND_ROUTE(0, "mono", 0.1)// Sound level for cassette, as it is in mono => output channel=0 |
| 172 | |
| 173 | MDRV_SOUND_ADD("sn76477", SN76477, 0) |
| 174 | MDRV_SOUND_CONFIG(hector_sn76477_interface) |
| 175 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.1) |
| 176 | |
| 177 | MDRV_SOUND_ADD("discrete", DISCRETE, 0) // Son 1bit |
| 178 | MDRV_SOUND_CONFIG_DISCRETE( hec2hrp ) |
| 179 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) |
| 180 | |
| 181 | // Gestion cassette |
| 182 | MDRV_CASSETTE_ADD( "cassette", interact_cassette_config ) |
| 183 | |
| 184 | /* printer */ |
| 185 | MDRV_PRINTER_ADD("printer") |
| 186 | |
| 187 | MACHINE_DRIVER_END |
| 188 | |
| 189 | static MACHINE_DRIVER_START( hector1 ) |
| 190 | |
| 191 | /* basic machine hardware */ |
| 147 | 192 | MDRV_CPU_ADD("maincpu", Z80, XTAL_1_75MHz) |
| 148 | 193 | MDRV_CPU_PROGRAM_MAP(interact_mem) |
| 149 | 194 | MDRV_CPU_PERIODIC_INT(irq0_line_hold,50) // put on the 8080 irq in Hz |
| r6399 | r6400 | |
| 158 | 203 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 159 | 204 | MDRV_SCREEN_SIZE(256, 79) |
| 160 | 205 | MDRV_SCREEN_VISIBLE_AREA(0, 112, 0, 77) |
| 161 | | MDRV_PALETTE_LENGTH(256) // 8 colours, but only 4 at a time |
| 206 | MDRV_PALETTE_LENGTH(16) // 8 colours, but only 4 at a time |
| 162 | 207 | MDRV_PALETTE_INIT(black_and_white) |
| 163 | 208 | |
| 164 | 209 | MDRV_VIDEO_START(interact) |
| r6399 | r6400 | |
| 179 | 224 | // Gestion cassette |
| 180 | 225 | MDRV_CASSETTE_ADD( "cassette", interact_cassette_config ) |
| 181 | 226 | |
| 227 | /* printer */ |
| 228 | MDRV_PRINTER_ADD("printer") |
| 229 | |
| 182 | 230 | MACHINE_DRIVER_END |
| 183 | 231 | |
| 184 | 232 | /* Input ports */ |
| r6399 | r6400 | |
| 205 | 253 | |
| 206 | 254 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 207 | 255 | COMP(1979, interact, 0, 0, interact, interact, 0, interact, "Interact", "Interact Family Computer", GAME_IMPERFECT_SOUND) |
| 208 | | COMP(????, hector1, interact, 0, interact, interact, 0, interact, "Micronique", "Hector 1", GAME_IMPERFECT_SOUND) |
| 256 | COMP(????, hector1, interact, 0, hector1, interact, 0, interact, "Micronique", "Hector 1", GAME_IMPERFECT_SOUND) |
src/mess/drivers/hec2hrp.c
| r6399 | r6400 | |
| 43 | 43 | // (left)7 (right)9 |
| 44 | 44 | // (down)8 |
| 45 | 45 | // |
| 46 | | // Fire <-> or <²> |
| 46 | // Fire <-> or <²> |
| 47 | 47 | // Pot => INS /SUPPR |
| 48 | 48 | // Cassete : wav file (1 way, 16 bits, 44100hz) |
| 49 | 49 | |
| 50 | 50 | #include "driver.h" |
| 51 | 51 | #include "machine/pckeybrd.h" |
| 52 | 52 | #include "devices/cassette.h" |
| 53 | #include "devices/printer.h" |
| 53 | 54 | #include "sound/wave.h" // for K7 sound |
| 54 | 55 | #include "sound/sn76477.h" // for sn sound |
| 55 | 56 | #include "sound/discrete.h" // for 1 Bit sound |
| r6399 | r6400 | |
| 82 | 83 | AM_RANGE(0x2000,0x2003) AM_WRITE( hector_sn_2000_w) // Sound |
| 83 | 84 | AM_RANGE(0x2800,0x2803) AM_WRITE( hector_sn_2800_w) // Sound |
| 84 | 85 | AM_RANGE(0x3000,0x3000) AM_READWRITE( hector_cassette_r, hector_sn_3000_w)// Write necessary |
| 85 | | AM_RANGE(0x3800,0x3807) AM_READ( hector_keyboard_r) // Keyboard |
| 86 | AM_RANGE(0x3800,0x3807) AM_READWRITE( hector_keyboard_r, hector_keyboard_w) // Keyboard |
| 86 | 87 | |
| 87 | 88 | // Main ROM page |
| 88 | 89 | AM_RANGE(0x0000,0x3fff) AM_ROMBANK(2) |
| r6399 | r6400 | |
| 237 | 238 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 238 | 239 | MDRV_SCREEN_SIZE(512, 230) |
| 239 | 240 | MDRV_SCREEN_VISIBLE_AREA(0, 243, 0, 227) |
| 240 | | MDRV_PALETTE_LENGTH(256) |
| 241 | MDRV_PALETTE_LENGTH(16) |
| 241 | 242 | MDRV_PALETTE_INIT(black_and_white) |
| 242 | 243 | MDRV_VIDEO_START(hec2hrp) |
| 243 | 244 | MDRV_VIDEO_UPDATE(hec2hrp) |
| r6399 | r6400 | |
| 258 | 259 | // Gestion cassette |
| 259 | 260 | MDRV_CASSETTE_ADD( "cassette", hector_cassette_config ) |
| 260 | 261 | |
| 262 | /* printer */ |
| 263 | MDRV_PRINTER_ADD("printer") |
| 264 | |
| 261 | 265 | MACHINE_DRIVER_END |
| 262 | 266 | |
| 263 | 267 | /////////////////////////////////////////////////////////////////////////////// |
| r6399 | r6400 | |
| 278 | 282 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 279 | 283 | MDRV_SCREEN_SIZE(512, 230) |
| 280 | 284 | MDRV_SCREEN_VISIBLE_AREA(0, 243, 0, 227) |
| 281 | | MDRV_PALETTE_LENGTH(256) |
| 285 | MDRV_PALETTE_LENGTH(16) |
| 282 | 286 | MDRV_PALETTE_INIT(black_and_white) |
| 283 | 287 | MDRV_VIDEO_START(hec2hrp) |
| 284 | 288 | MDRV_VIDEO_UPDATE(hec2hrp) |
| r6399 | r6400 | |
| 299 | 303 | // Gestion cassette |
| 300 | 304 | MDRV_CASSETTE_ADD( "cassette", hector_cassette_config ) |
| 301 | 305 | |
| 306 | /* printer */ |
| 307 | MDRV_PRINTER_ADD("printer") |
| 308 | |
| 302 | 309 | MACHINE_DRIVER_END |
| 303 | 310 | |
| 304 | 311 | /////////////////////////////////////////////////////////////////////////////// |
| r6399 | r6400 | |
| 319 | 326 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 320 | 327 | MDRV_SCREEN_SIZE(512, 230) |
| 321 | 328 | MDRV_SCREEN_VISIBLE_AREA(0, 243, 0, 227) |
| 322 | | MDRV_PALETTE_LENGTH(256) |
| 329 | MDRV_PALETTE_LENGTH(16) |
| 323 | 330 | MDRV_PALETTE_INIT(black_and_white) |
| 324 | 331 | MDRV_VIDEO_START(hec2hrp) |
| 325 | 332 | MDRV_VIDEO_UPDATE(hec2hrp) |
| r6399 | r6400 | |
| 340 | 347 | // Gestion cassette |
| 341 | 348 | MDRV_CASSETTE_ADD( "cassette", hector_cassette_config ) |
| 342 | 349 | |
| 350 | /* printer */ |
| 351 | MDRV_PRINTER_ADD("printer") |
| 352 | |
| 343 | 353 | MACHINE_DRIVER_END |
| 344 | 354 | |
| 345 | 355 | /////////////////////////////////////////////////////////////////////////////// |
| r6399 | r6400 | |
| 360 | 370 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 361 | 371 | MDRV_SCREEN_SIZE(512, 230) |
| 362 | 372 | MDRV_SCREEN_VISIBLE_AREA(0, 243, 0, 227) |
| 363 | | MDRV_PALETTE_LENGTH(256) |
| 373 | MDRV_PALETTE_LENGTH(16) |
| 364 | 374 | MDRV_PALETTE_INIT(black_and_white) |
| 365 | 375 | MDRV_VIDEO_START(hec2hrp) |
| 366 | 376 | MDRV_VIDEO_UPDATE(hec2hrp) |
| r6399 | r6400 | |
| 381 | 391 | // Gestion cassette |
| 382 | 392 | MDRV_CASSETTE_ADD( "cassette", hector_cassette_config ) |
| 383 | 393 | |
| 394 | /* printer */ |
| 395 | MDRV_PRINTER_ADD("printer") |
| 396 | |
| 384 | 397 | MACHINE_DRIVER_END |
| 385 | 398 | |
| 386 | 399 | /* ROM definition */ |