Previous 15994 Revisions Next

r6400 Monday 16th November, 2009 at 07:39:49 UTC by Miodrag Milanović
[hec2hrp][interact] Added more features to Micronique machines [JJ Stacino]
[src/mess/drivers]hec2hrp.c interact.c
[src/mess/includes]hec2hrp.h
[src/mess/machine]hec2hrp.c

src/mess/includes/hec2hrp.h
r6399r6400
3636extern WRITE8_HANDLER( hector_switch_bank_w );
3737extern void Key(int pccode, int state, running_machine *machine);
3838extern READ8_HANDLER( hector_keyboard_r );
39extern WRITE8_HANDLER( hector_keyboard_w );
3940extern WRITE8_HANDLER( hector_sn_2000_w );
4041extern WRITE8_HANDLER( hector_sn_2800_w );
4142extern WRITE8_HANDLER( hector_sn_3000_w );
src/mess/machine/hec2hrp.c
r6399r6400
3232
3333#include "driver.h"
3434#include "devices/cassette.h"
35#include "devices/printer.h"
3536#include "sound/sn76477.h"   // for sn sound
3637#include "sound/wave.h"      // for K7 sound
3738#include "sound/discrete.h"  // for 1 Bit sound
r6399r6400
195196                  } 
196197}
197198
199WRITE8_HANDLER( hector_keyboard_w )
200{
201                //nothing to do => Key() function manage the value
202}
203
198204READ8_HANDLER( hector_keyboard_r )
199205{
200206   return touches[offset]; //send the pre calculated value
r6399r6400
258264return value;
259265}
260266WRITE8_HANDLER( hector_sn_3000_w )
261{ // int i;
267{
262268    state3000 = data & 0xf8; // except bit 0 to 2
263//printf( "\n Etat registre 3000 =\"%x\"",data);
264269   if ((data & 7) != oldstate3000 )
265270       {
266271           // Update sn76477 only when necessary!
r6399r6400
268273          Update_Sound(space, data & 7);
269274        }
270275        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   }*/
281276}
277
282278/* Color Interface */
283279WRITE8_HANDLER( hector_color_a_w )
284280{
r6399r6400
345341}
346342
347343
348
349344/********************************************************************************
350345 Port Handling
351346********************************************************************************/
r6399r6400
357352WRITE8_HANDLER( hector_mx40_io_port_w)
358353{
359354   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);
365356   if ((offset &0x0ff) == 0x40) // Port page 0
366357      memory_set_bank(space->machine, 2, HECTORMX_BANK_PAGE0);
367358   if ((offset &0x0ff) == 0x41) // Port page 1
r6399r6400
378369WRITE8_HANDLER( hector_mx80_io_port_w)
379370{
380371   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);
386373   if ((offset &0x0ff) == 0x40) // Port page 0
387374      memory_set_bank(space->machine, 2, HECTORMX_BANK_PAGE0);
388375   if ((offset &0x0ff) == 0x41) // Port page 1
r6399r6400
488475     // SetEnvelopControl( R10 , R7, C8 ) : Attack/Decay
489476     // Decay R
490477     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)
492479     
493480     // Capa A/D
494481     Pin_Value[8][0] = CAP_U(0.47); // 0.47uf
src/mess/drivers/interact.c
r6399r6400
4646****************************************************************************/
4747
4848#include "driver.h"
49#include "cpu/z80/z80.h"   //i8085/i8085.h"
49#include "cpu/z80/z80.h"
50#include "cpu/i8085/i8085.h"
5051#include "machine/pckeybrd.h"
5152#include "devices/cassette.h"
53#include "devices/printer.h"
5254#include "sound/wave.h"      // for K7 sound
5355#include "sound/sn76477.h"   // for sn sound
5456#include "sound/discrete.h"  // for 1 Bit sound
r6399r6400
6466   AM_RANGE(0x2000,0x2003) AM_WRITE( hector_sn_2000_w)  // Sound
6567   AM_RANGE(0x2800,0x2803) AM_WRITE( hector_sn_2800_w)  // Sound
6668   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
6870
6971    // Main ROM page
7072   AM_RANGE(0x0000,0x3fff) AM_ROM  //BANK(2)
r6399r6400
144146static MACHINE_DRIVER_START( interact )
145147
146148   /* 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
187MACHINE_DRIVER_END
188
189static MACHINE_DRIVER_START( hector1 )
190
191   /* basic machine hardware */
147192   MDRV_CPU_ADD("maincpu", Z80, XTAL_1_75MHz)
148193   MDRV_CPU_PROGRAM_MAP(interact_mem)
149194    MDRV_CPU_PERIODIC_INT(irq0_line_hold,50) //  put on the 8080 irq in Hz
r6399r6400
158203   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
159204   MDRV_SCREEN_SIZE(256, 79)
160205   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
162207   MDRV_PALETTE_INIT(black_and_white)
163208
164209   MDRV_VIDEO_START(interact)
r6399r6400
179224    // Gestion cassette
180225    MDRV_CASSETTE_ADD( "cassette", interact_cassette_config )
181226
227   /* printer */
228   MDRV_PRINTER_ADD("printer")
229
182230MACHINE_DRIVER_END
183231
184232/* Input ports */
r6399r6400
205253
206254/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT    INIT    CONFIG       COMPANY   FULLNAME       FLAGS */
207255COMP(1979, interact,        0, 0,   interact, interact,     0,   interact,      "Interact",   "Interact Family Computer", GAME_IMPERFECT_SOUND)
208COMP(????, hector1,  interact, 0,    interact, interact,     0,  interact,      "Micronique", "Hector 1",   GAME_IMPERFECT_SOUND)
256COMP(????, hector1,  interact, 0,    hector1, interact,     0,  interact,      "Micronique", "Hector 1",   GAME_IMPERFECT_SOUND)
src/mess/drivers/hec2hrp.c
r6399r6400
4343//  (left)7                     (right)9
4444//               (down)8
4545//
46// Fire <-> or <²>
46// Fire <-> or <²>
4747// Pot => INS /SUPPR
4848// Cassete : wav file (1 way, 16 bits, 44100hz)
4949
5050#include "driver.h"
5151#include "machine/pckeybrd.h"
5252#include "devices/cassette.h"
53#include "devices/printer.h"
5354#include "sound/wave.h"      // for K7 sound
5455#include "sound/sn76477.h"   // for sn sound
5556#include "sound/discrete.h"  // for 1 Bit sound
r6399r6400
8283   AM_RANGE(0x2000,0x2003) AM_WRITE( hector_sn_2000_w)  // Sound
8384   AM_RANGE(0x2800,0x2803) AM_WRITE( hector_sn_2800_w)  // Sound
8485   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
8687
8788    // Main ROM page
8889   AM_RANGE(0x0000,0x3fff) AM_ROMBANK(2)
r6399r6400
237238   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
238239   MDRV_SCREEN_SIZE(512, 230) 
239240   MDRV_SCREEN_VISIBLE_AREA(0, 243, 0, 227) 
240    MDRV_PALETTE_LENGTH(256)
241    MDRV_PALETTE_LENGTH(16)
241242   MDRV_PALETTE_INIT(black_and_white)
242243   MDRV_VIDEO_START(hec2hrp)
243244   MDRV_VIDEO_UPDATE(hec2hrp)
r6399r6400
258259    // Gestion cassette
259260    MDRV_CASSETTE_ADD( "cassette", hector_cassette_config )
260261
262   /* printer */
263   MDRV_PRINTER_ADD("printer")
264
261265MACHINE_DRIVER_END
262266
263267///////////////////////////////////////////////////////////////////////////////
r6399r6400
278282   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
279283   MDRV_SCREEN_SIZE(512, 230) 
280284   MDRV_SCREEN_VISIBLE_AREA(0, 243, 0, 227) 
281    MDRV_PALETTE_LENGTH(256)
285    MDRV_PALETTE_LENGTH(16)
282286   MDRV_PALETTE_INIT(black_and_white)
283287   MDRV_VIDEO_START(hec2hrp)
284288   MDRV_VIDEO_UPDATE(hec2hrp)
r6399r6400
299303    // Gestion cassette
300304    MDRV_CASSETTE_ADD( "cassette", hector_cassette_config )
301305
306   /* printer */
307   MDRV_PRINTER_ADD("printer")
308
302309MACHINE_DRIVER_END
303310
304311///////////////////////////////////////////////////////////////////////////////
r6399r6400
319326   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
320327   MDRV_SCREEN_SIZE(512, 230) 
321328   MDRV_SCREEN_VISIBLE_AREA(0, 243, 0, 227) 
322    MDRV_PALETTE_LENGTH(256)
329    MDRV_PALETTE_LENGTH(16)
323330   MDRV_PALETTE_INIT(black_and_white)
324331   MDRV_VIDEO_START(hec2hrp)
325332   MDRV_VIDEO_UPDATE(hec2hrp)
r6399r6400
340347    // Gestion cassette
341348    MDRV_CASSETTE_ADD( "cassette", hector_cassette_config )
342349
350   /* printer */
351   MDRV_PRINTER_ADD("printer")
352
343353MACHINE_DRIVER_END
344354
345355///////////////////////////////////////////////////////////////////////////////
r6399r6400
360370   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
361371   MDRV_SCREEN_SIZE(512, 230) 
362372   MDRV_SCREEN_VISIBLE_AREA(0, 243, 0, 227) 
363    MDRV_PALETTE_LENGTH(256)
373    MDRV_PALETTE_LENGTH(16)
364374   MDRV_PALETTE_INIT(black_and_white)
365375   MDRV_VIDEO_START(hec2hrp)
366376   MDRV_VIDEO_UPDATE(hec2hrp)
r6399r6400
381391    // Gestion cassette
382392    MDRV_CASSETTE_ADD( "cassette", hector_cassette_config )
383393
394   /* printer */
395   MDRV_PRINTER_ADD("printer")
396
384397MACHINE_DRIVER_END
385398
386399/* ROM definition */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team