Previous 15994 Revisions Next

r6461 Wednesday 25th November, 2009 at 20:48:37 UTC by Nathan Woods
More Atari Ace cleanups :-)
[docs]messnew.txt
[src/mess/audio]sblaster.c sblaster.h
[src/mess/drivers]apf.c elekscmp.c fm7.c fmtowns.c hec2hrp.c interact.c k1003.c mk14.c mod8.c pce220.c pdp1.c tvc.c
[src/mess/includes]adam.h cbmb.h dgn_beta.h fm7.h hec2hrp.h hectorkey.h lynx.h pdp1.h zx.h
[src/mess/machine]adam.c cbmb.c dgn_beta.c hec2hrp.c lynx.c pdp1.c rp5c15.c rp5c15.h x68k_hdc.c x68k_hdc.h
[src/mess/video]hec2video.c vic6567.c vic6567.h zx.c

src/mess/audio/sblaster.c
r6460r6461
7474   blaster.config = *config;
7575}
7676
77#ifdef UNUSED_FUNCTION
7778void soundblaster_reset(void)
7879{
7980   if (blaster.timer)
r6460r6461
8586   blaster.frequency=0;
8687}
8788
88#if 0
8989int soundblaster_start(void)
9090{
9191   channel = stream_init("PC speaker", 50, Machine->sample_rate, 0, pc_sh_update);
src/mess/audio/sblaster.h
r6460r6461
2828} SOUNDBLASTER_CONFIG;
2929
3030void soundblaster_config(const SOUNDBLASTER_CONFIG *config);
31void soundblaster_reset(void);
3231
3332
3433#endif /* SBLASTER_H_ */
src/mess/video/zx.c
r6460r6461
2323
2424emu_timer *ula_nmi = NULL;
2525//emu_timer *ula_irq = NULL;
26int ula_nmi_active, ula_irq_active;
26//int ula_nmi_active;
27int ula_irq_active;
2728int ula_frame_vsync = 0;
2829//int ula_scancode_count = 0;
2930int ula_scanline_count = 0;
src/mess/video/vic6567.c
r6460r6461
7171#include "vic4567.h"
7272#include "utils.h"
7373
74static TIMER_CALLBACK( line_timer_callback );
75static TIMER_CALLBACK( PAL_timer_callback );
76static TIMER_CALLBACK( NTSC_timer_callback );
77
78
7479/* lightpen values */
7580#include "includes/c64.h"
7681
r6460r6461
15021507
15031508#include "vic4567.c"
15041509
1505TIMER_CALLBACK( line_timer_callback )
1510static TIMER_CALLBACK( line_timer_callback )
15061511{
15071512   int i,j;
15081513
r6460r6461
21752180      } \
21762181   }
21772182
2178TIMER_CALLBACK( PAL_timer_callback )
2183static TIMER_CALLBACK( PAL_timer_callback )
21792184{
21802185   int i;
21812186   UINT8 mask;
r6460r6461
27332738   timer_set(machine, cputag_clocks_to_attotime(machine, "maincpu", 1), NULL, 0, PAL_timer_callback);
27342739}
27352740
2736TIMER_CALLBACK( NTSC_timer_callback )
2741static TIMER_CALLBACK( NTSC_timer_callback )
27372742{
27382743   int i;
27392744   UINT8 mask;
src/mess/video/vic6567.h
r6460r6461
150150
151151/* to be called each vertical retrace */
152152extern INTERRUPT_GEN( vic2_frame_interrupt );
153TIMER_CALLBACK( line_timer_callback );
154TIMER_CALLBACK( PAL_timer_callback );
155TIMER_CALLBACK( NTSC_timer_callback );
156153
157154/* private area */
158155
src/mess/video/hec2video.c
r6460r6461
3737#include "includes/hec2hrp.h"
3838
3939// Color status
40UINT8 Col0, Col1,Col2,Col3;  // For actual colors
40UINT8 hector_color[4];  // For actual colors
41// Ram video BR :
42UINT8 hector_videoram[0x04000];
43// Status for screen definition
44UINT8 hector_flag_hr;
45UINT8 hector_flag_80c;
4146
4247
4348
44void Init_Hector_Palette( running_machine  *machine)
49static void Init_Hector_Palette( running_machine  *machine)
4550{
4651   // basic colors !
47    Col0 = 0;  // fond (noir)
48    Col1 = 1;  // HECTOR HRX (rouge)
49    Col2 = 7; // Point interrogation (Blanc)
50    Col3 = 3; // Ecriture de choix (jaune)
52   hector_color[0] = 0;  // fond (noir)
53   hector_color[1] = 1;  // HECTOR HRX (rouge)
54   hector_color[2] = 7; // Point interrogation (Blanc)
55   hector_color[3] = 3; // Ecriture de choix (jaune)
5156
5257   // Color initialisation : full luminosité
5358   palette_set_color( machine, 0,MAKE_RGB(000,000,000));//Noir
r6460r6461
7984         gfx = *(page+x);
8085         /* Display a scanline of a character (4 pixels !) */
8186         switch (gfx & 0x03) {
82              case 0x00 : *p=Col0; break;
83              case 0x01 : *p=Col1; break;
84               case 0x02 : *p=Col2; break;
85              default   : *p=Col3; break;}
87              case 0x00 : *p=hector_color[0]; break;
88              case 0x01 : *p=hector_color[1]; break;
89               case 0x02 : *p=hector_color[2]; break;
90              default   : *p=hector_color[3]; break;}
8691         p++;   
8792
8893         switch (gfx & 0x0c)   {
89             case 0x00 : *p=Col0; break;
90              case 0x04 : *p=Col1; break;
91               case 0x08 : *p=Col2; break;
92              default   : *p=Col3; break;}
94              case 0x00 : *p=hector_color[0]; break;
95              case 0x04 : *p=hector_color[1]; break;
96               case 0x08 : *p=hector_color[2]; break;
97              default   : *p=hector_color[3]; break;}
9398         p++;   
9499
95100         switch (gfx & 0x30)   {
96              case 0x00 : *p=Col0; break;
97              case 0x10 : *p=Col1; break;
98               case 0x20 : *p=Col2; break;
99              default   : *p=Col3; break;}
101              case 0x00 : *p=hector_color[0]; break;
102              case 0x10 : *p=hector_color[1]; break;
103               case 0x20 : *p=hector_color[2]; break;
104              default   : *p=hector_color[3]; break;}
100105         p++;   
101106
102107         switch (gfx & 0xc0) {
103              case 0x00 : *p=Col0; break;
104              case 0x40 : *p=Col1; break;
105               case 0x80 : *p=Col2; break;
106              default   : *p=Col3; break;}
108              case 0x00 : *p=hector_color[0]; break;
109              case 0x40 : *p=hector_color[1]; break;
110               case 0x80 : *p=hector_color[2]; break;
111              default   : *p=hector_color[3]; break;}
107112         p++;
108113      }
109114      ma+=yram;
r6460r6461
139144      ma+=yram;
140145   }
141146}
147
148VIDEO_START( hec2hrp )
149{
150    Init_Hector_Palette(machine);
151}
152
153VIDEO_UPDATE( hec2hrp )
154{
155    if (hector_flag_hr==1)
156        {   
157           if (hector_flag_80c==0)
158           {
159              video_screen_set_visarea(screen, 0, 243, 0, 227);
160              hector_hr( bitmap , &hector_videoram[0], 227, 64);
161           }
162           else
163           {
164               video_screen_set_visarea(screen, 0, 243*2, 0, 227);
165               hector_80c( bitmap , &hector_videoram[0], 227, 64);
166           }
167        }
168   else
169        {
170            video_screen_set_visarea(screen, 0, 113, 0, 75);
171            hector_hr( bitmap, videoram,  77, 32);
172        }
173
174    return 0;
175}
176
src/mess/includes/fm7.h
r6460r6461
6767WRITE8_HANDLER( fm77av_key_encoder_w );
6868READ8_HANDLER( fm7_sub_beeper_r );
6969
70void fm7_mmr_refresh(const address_space*);
7170
72
7371/*----------- defined in video/fm7.c -----------*/
7472
7573extern struct fm7_video_flags fm7_video;
src/mess/includes/zx.h
r6460r6461
3333
3434extern emu_timer *ula_nmi;
3535extern int ula_irq_active;
36extern int ula_nmi_active;
36//extern int ula_nmi_active;
3737extern int ula_frame_vsync;
3838extern int ula_scanline_count;
3939//extern int ula_scancode_count;
src/mess/includes/dgn_beta.h
r6460r6461
7474READ8_HANDLER( dgn_beta_page_r );
7575WRITE8_HANDLER( dgn_beta_page_w );
7676
77// Ram banking handlers.
78WRITE8_HANDLER( dgnbeta_ram_b0_w );
79WRITE8_HANDLER( dgnbeta_ram_b1_w );
80WRITE8_HANDLER( dgnbeta_ram_b2_w );
81WRITE8_HANDLER( dgnbeta_ram_b3_w );
82WRITE8_HANDLER( dgnbeta_ram_b4_w );
83WRITE8_HANDLER( dgnbeta_ram_b5_w );
84WRITE8_HANDLER( dgnbeta_ram_b6_w );
85WRITE8_HANDLER( dgnbeta_ram_b7_w );
86WRITE8_HANDLER( dgnbeta_ram_b8_w );
87WRITE8_HANDLER( dgnbeta_ram_b9_w );
88WRITE8_HANDLER( dgnbeta_ram_bA_w );
89WRITE8_HANDLER( dgnbeta_ram_bB_w );
90WRITE8_HANDLER( dgnbeta_ram_bC_w );
91WRITE8_HANDLER( dgnbeta_ram_bD_w );
92WRITE8_HANDLER( dgnbeta_ram_bE_w );
93WRITE8_HANDLER( dgnbeta_ram_bF_w );
94WRITE8_HANDLER( dgnbeta_ram_bG_w );
95
9677/*  WD2797 FDC */
9778READ8_HANDLER(dgnbeta_wd2797_r);
9879WRITE8_HANDLER(dgnbeta_wd2797_w);
9980
100extern int dgnbeta_font;
10181void dgn_beta_frame_interrupt (running_machine *machine, int data);
102void dgn_beta_line_interrupt (int data);
10382
10483
10584/*----------- defined in video/dgn_beta.c -----------*/
src/mess/includes/pdp1.h
r6460r6461
1616#define MEMORY_WRITE_START18(name) MEMORY_WRITE32_START(name)
1717
1818
19/*----------- defined in drivers/pdp1.c -----------*/
20
2119/* defines for each bit and mask in input port "CSW" */
2220enum
2321{
r6460r6461
10199   pdp1_fontdata_size = 8 * pdp1_charnum
102100};
103101
104extern pdp1_reset_param_t pdp1_reset_param;
105102
106
107103/*----------- defined in machine/pdp1.c -----------*/
108104
109extern int *pdp1_memory;
105extern pdp1_reset_param_t pdp1_reset_param;
110106
111107MACHINE_START( pdp1 );
112108MACHINE_RESET( pdp1 );
r6460r6461
118114DEVICE_IMAGE_LOAD( pdp1_tape );
119115DEVICE_IMAGE_UNLOAD( pdp1_tape );
120116
121void pdp1_tape_read_binary(const device_config *device);
122void iot_rpa(const device_config *device, int op2, int nac, int mb, int *io, int ac);
123void iot_rpb(const device_config *device, int op2, int nac, int mb, int *io, int ac);
124void iot_rrb(const device_config *device, int op2, int nac, int mb, int *io, int ac);
125void iot_ppa(const device_config *device, int op2, int nac, int mb, int *io, int ac);
126void iot_ppb(const device_config *device, int op2, int nac, int mb, int *io, int ac);
127
128117DEVICE_IMAGE_LOAD(pdp1_typewriter);
129118DEVICE_IMAGE_UNLOAD(pdp1_typewriter);
130void iot_tyo(const device_config *device, int op2, int nac, int mb, int *io, int ac);
131void iot_tyi(const device_config *device, int op2, int nac, int mb, int *io, int ac);
132119
133void iot_dpy(const device_config *device, int op2, int nac, int mb, int *io, int ac);
134
135120DEVICE_IMAGE_LOAD(pdp1_drum);
136121DEVICE_IMAGE_UNLOAD(pdp1_drum);
137void iot_dia(const device_config *device, int op2, int nac, int mb, int *io, int ac);
138void iot_dba(const device_config *device, int op2, int nac, int mb, int *io, int ac);
139void iot_dcc(const device_config *device, int op2, int nac, int mb, int *io, int ac);
140void iot_dra(const device_config *device, int op2, int nac, int mb, int *io, int ac);
141122
142void iot_011(const device_config *device, int op2, int nac, int mb, int *io, int ac);
143
144void iot_cks(const device_config *device, int op2, int nac, int mb, int *io, int ac);
145void pdp1_io_sc_callback(const device_config *device);
146
147123INTERRUPT_GEN( pdp1_interrupt );
148124
149125void pdp1_get_open_mode(int id, unsigned int *readable, unsigned int *writeable, unsigned int *creatable);
src/mess/includes/adam.h
r6460r6461
2222extern int adam_net_data; /* Data on AdamNet Bus */
2323extern int adam_pcb;
2424
25int adam_cart_verify(const UINT8 *buf, size_t size);
25//int adam_cart_verify(const UINT8 *buf, size_t size);
2626
2727void adam_clear_keyboard_buffer(void);
2828void adam_explore_keyboard(running_machine *machine);
src/mess/includes/cbmb.h
r6460r6461
3333extern UINT8 *cbmb_basic;
3434extern UINT8 *cbmb_kernal;
3535//extern UINT8 *cbmb_chargen;
36extern UINT8 *cbmb_memory;
36//extern UINT8 *cbmb_memory;
3737extern UINT8 *cbmb_videoram;
3838extern UINT8 *cbmb_colorram;
3939
src/mess/includes/lynx.h
r6460r6461
2727
2828READ8_HANDLER( lynx_memory_config_r );
2929WRITE8_HANDLER( lynx_memory_config_w );
30WRITE8_HANDLER(mikey_write);
31READ8_HANDLER(mikey_read);
32WRITE8_HANDLER(suzy_write);
33READ8_HANDLER(suzy_read);
3430void lynx_timer_count_down(running_machine *machine, int nr);
3531
3632INTERRUPT_GEN( lynx_frame_int );
src/mess/includes/hectorkey.h
r6460r6461
2626    TODO : Add the cartridge function,
2727           Adjust the one shot and A/D timing (sn76477)
2828*/
29int hectorkey[0x100] = {
29static const UINT8 hectorkey[0x100] = {
3030
3131///////////////////////////////////////// 0x00-0x0f
32320xff, //0
src/mess/includes/hec2hrp.h
r6460r6461
3434
3535// Protoype of memory Handler
3636extern WRITE8_HANDLER( hector_switch_bank_w );
37extern void Key(int pccode, int state, running_machine *machine);
3837extern READ8_HANDLER( hector_keyboard_r );
3938extern WRITE8_HANDLER( hector_keyboard_w );
4039extern WRITE8_HANDLER( hector_sn_2000_w );
r6460r6461
4443extern WRITE8_HANDLER( hector_color_a_w );
4544extern WRITE8_HANDLER( hector_color_b_w );
4645
46extern void hector_init(running_machine *machine);
47extern void hector_reset(running_machine *machine, int hr);
4748
4849extern READ8_HANDLER( hector_mx_io_port_r);
4950extern WRITE8_HANDLER( hector_mx80_io_port_w);
r6460r6461
5152
5253
5354// Prototype of video function
54extern void Init_Hector_Palette( running_machine  *machine);
5555extern void hector_80c(bitmap_t *bitmap, UINT8 *page, int ymax, int yram) ;
5656extern void hector_hr(bitmap_t *bitmap, UINT8 *page, int ymax, int yram) ;
57VIDEO_START( hec2hrp );
58VIDEO_UPDATE( hec2hrp );
5759
5860// Global variables used in extern modules
5961
6062// Status for screen definition
61extern UINT8 flag_hr;
62extern UINT8 flag_80c;
63// Status for CPU clock
64extern UINT8 flag_clk;  // 0 5MHz (HR machine) - 1  1.75MHz (BR machine)
63extern UINT8 hector_flag_hr;
64extern UINT8 hector_flag_80c;
6565
6666// Ram video BR :
67extern UINT8 videoramhector[0x04000];
67extern UINT8 hector_videoram[0x04000];
6868
6969// Color status
70extern UINT8 Col0, Col1,Col2,Col3;  // For actual colors
70extern UINT8 hector_color[4];
7171
7272// Sound function
73extern void Mise_A_Jour_Etat(int Adresse, int Value );
74extern void Init_Value_SN76477_Hector(void);
75extern void Update_Sound(const address_space *space, UINT8 data);
76extern  sn76477_interface hector_sn76477_interface;
73extern sn76477_interface hector_sn76477_interface;
7774
7875
79//Keyboard / joystick / cassette
80extern UINT8 actions;
81extern UINT8 touches[8];
82extern UINT8 pot0, pot1;  // State for resistor
83extern UINT8 write_cassette;
84
85//TIMER definition
86extern TIMER_CALLBACK( Callback_CK );
87extern TIMER_CALLBACK( Callback_keyboard );
88extern  emu_timer *keyboard_timer;
89extern emu_timer *Cassette_timer;
90
91
9276// Enum status for high memory bank (c000 - ffff)
9377enum
9478{
src/mess/machine/dgn_beta.c
r6460r6461
7575
7676static UINT8 *system_rom;
7777
78// Ram banking handlers.
79static WRITE8_HANDLER( dgnbeta_ram_b0_w );
80static WRITE8_HANDLER( dgnbeta_ram_b1_w );
81static WRITE8_HANDLER( dgnbeta_ram_b2_w );
82static WRITE8_HANDLER( dgnbeta_ram_b3_w );
83static WRITE8_HANDLER( dgnbeta_ram_b4_w );
84static WRITE8_HANDLER( dgnbeta_ram_b5_w );
85static WRITE8_HANDLER( dgnbeta_ram_b6_w );
86static WRITE8_HANDLER( dgnbeta_ram_b7_w );
87static WRITE8_HANDLER( dgnbeta_ram_b8_w );
88static WRITE8_HANDLER( dgnbeta_ram_b9_w );
89static WRITE8_HANDLER( dgnbeta_ram_bA_w );
90static WRITE8_HANDLER( dgnbeta_ram_bB_w );
91static WRITE8_HANDLER( dgnbeta_ram_bC_w );
92static WRITE8_HANDLER( dgnbeta_ram_bD_w );
93static WRITE8_HANDLER( dgnbeta_ram_bE_w );
94static WRITE8_HANDLER( dgnbeta_ram_bF_w );
95static WRITE8_HANDLER( dgnbeta_ram_bG_w );
96
97
7898#define VERBOSE 0
7999
80100
r6460r6461
140160
141161static int SelectedKeyrow(int   Rows);
142162
143int dgnbeta_font=0;
144
145163const pia6821_interface dgnbeta_pia_intf[] =
146164{
147165   /* PIA 0 at $FC20-$FC23 I46 */
r6460r6461
403421   PageRegs[TaskReg][bank].memory[offset]=data;
404422}
405423
406WRITE8_HANDLER( dgnbeta_ram_b0_w )
424static WRITE8_HANDLER( dgnbeta_ram_b0_w )
407425{
408426   dgn_beta_bank_memory(offset,data,0);
409427}
410428
411WRITE8_HANDLER( dgnbeta_ram_b1_w )
429static WRITE8_HANDLER( dgnbeta_ram_b1_w )
412430{
413431   dgn_beta_bank_memory(offset,data,1);
414432}
415433
416WRITE8_HANDLER( dgnbeta_ram_b2_w )
434static WRITE8_HANDLER( dgnbeta_ram_b2_w )
417435{
418436   dgn_beta_bank_memory(offset,data,2);
419437}
420438
421WRITE8_HANDLER( dgnbeta_ram_b3_w )
439static WRITE8_HANDLER( dgnbeta_ram_b3_w )
422440{
423441   dgn_beta_bank_memory(offset,data,3);
424442}
425443
426WRITE8_HANDLER( dgnbeta_ram_b4_w )
444static WRITE8_HANDLER( dgnbeta_ram_b4_w )
427445{
428446   dgn_beta_bank_memory(offset,data,4);
429447}
430448
431WRITE8_HANDLER( dgnbeta_ram_b5_w )
449static WRITE8_HANDLER( dgnbeta_ram_b5_w )
432450{
433451   dgn_beta_bank_memory(offset,data,5);
434452}
435453
436WRITE8_HANDLER( dgnbeta_ram_b6_w )
454static WRITE8_HANDLER( dgnbeta_ram_b6_w )
437455{
438456   dgn_beta_bank_memory(offset,data,6);
439457}
440458
441WRITE8_HANDLER( dgnbeta_ram_b7_w )
459static WRITE8_HANDLER( dgnbeta_ram_b7_w )
442460{
443461   dgn_beta_bank_memory(offset,data,7);
444462}
445463
446WRITE8_HANDLER( dgnbeta_ram_b8_w )
464static WRITE8_HANDLER( dgnbeta_ram_b8_w )
447465{
448466   dgn_beta_bank_memory(offset,data,8);
449467}
450468
451WRITE8_HANDLER( dgnbeta_ram_b9_w )
469static WRITE8_HANDLER( dgnbeta_ram_b9_w )
452470{
453471   dgn_beta_bank_memory(offset,data,9);
454472}
455473
456WRITE8_HANDLER( dgnbeta_ram_bA_w )
474static WRITE8_HANDLER( dgnbeta_ram_bA_w )
457475{
458476   dgn_beta_bank_memory(offset,data,10);
459477}
460478
461WRITE8_HANDLER( dgnbeta_ram_bB_w )
479static WRITE8_HANDLER( dgnbeta_ram_bB_w )
462480{
463481   dgn_beta_bank_memory(offset,data,11);
464482}
465483
466WRITE8_HANDLER( dgnbeta_ram_bC_w )
484static WRITE8_HANDLER( dgnbeta_ram_bC_w )
467485{
468486   dgn_beta_bank_memory(offset,data,12);
469487}
470488
471WRITE8_HANDLER( dgnbeta_ram_bD_w )
489static WRITE8_HANDLER( dgnbeta_ram_bD_w )
472490{
473491   dgn_beta_bank_memory(offset,data,13);
474492}
475493
476WRITE8_HANDLER( dgnbeta_ram_bE_w )
494static WRITE8_HANDLER( dgnbeta_ram_bE_w )
477495{
478496   dgn_beta_bank_memory(offset,data,14);
479497}
480498
481WRITE8_HANDLER( dgnbeta_ram_bF_w )
499static WRITE8_HANDLER( dgnbeta_ram_bF_w )
482500{
483501   dgn_beta_bank_memory(offset,data,15);
484502}
485503
486WRITE8_HANDLER( dgnbeta_ram_bG_w )
504static WRITE8_HANDLER( dgnbeta_ram_bG_w )
487505{
488506   dgn_beta_bank_memory(offset,data,16);
489507}
r6460r6461
10481066   ScanInKeyboard();
10491067}
10501068
1069#ifdef UNUSED_FUNCTION
10511070void dgn_beta_line_interrupt (int data)
10521071{
10531072//  /* Set PIA line, so it recognises inturrupt */
r6460r6461
10601079//      pia_0_cb1_w(machine, 0,CLEAR_LINE);
10611080//  }
10621081}
1082#endif
10631083
10641084
10651085/********************************* Machine/Driver Initialization ****************************************/
src/mess/machine/pdp1.c
r6460r6461
4141static TIMER_CALLBACK(dpy_callback);
4242static void pdp1_machine_stop(running_machine *machine);
4343
44static void pdp1_tape_read_binary(const device_config *device);
45static void pdp1_io_sc_callback(const device_config *device);
4446
47static void iot_rpa(const device_config *device, int op2, int nac, int mb, int *io, int ac);
48static void iot_rpb(const device_config *device, int op2, int nac, int mb, int *io, int ac);
49static void iot_rrb(const device_config *device, int op2, int nac, int mb, int *io, int ac);
50static void iot_ppa(const device_config *device, int op2, int nac, int mb, int *io, int ac);
51static void iot_ppb(const device_config *device, int op2, int nac, int mb, int *io, int ac);
52
53static void iot_tyo(const device_config *device, int op2, int nac, int mb, int *io, int ac);
54static void iot_tyi(const device_config *device, int op2, int nac, int mb, int *io, int ac);
55
56static void iot_dpy(const device_config *device, int op2, int nac, int mb, int *io, int ac);
57
58static void iot_dia(const device_config *device, int op2, int nac, int mb, int *io, int ac);
59static void iot_dba(const device_config *device, int op2, int nac, int mb, int *io, int ac);
60static void iot_dcc(const device_config *device, int op2, int nac, int mb, int *io, int ac);
61static void iot_dra(const device_config *device, int op2, int nac, int mb, int *io, int ac);
62
63static void iot_011(const device_config *device, int op2, int nac, int mb, int *io, int ac);
64
65static void iot_cks(const device_config *device, int op2, int nac, int mb, int *io, int ac);
66
4567/* pointer to pdp-1 RAM */
46int *pdp1_memory;
68static int *pdp1_memory;
4769
4870
4971/*
r6460r6461
154176}
155177
156178
179pdp1_reset_param_t pdp1_reset_param =
180{
181   {   /* external iot handlers.  NULL means that the iot is unimplemented, unless there are
182        parentheses around the iot name, in which case the iot is internal to the cpu core. */
183      /* I put a ? when the source is the handbook, since a) I have used the maintainance manual
184        as the primary source (as it goes more into details) b) the handbook and the maintainance
185        manual occasionnally contradict each other. */
186      /* dia, dba, dcc, dra are documented in MIT PDP-1 COMPUTER MODIFICATION
187        BULLETIN no. 2 (drumInstrWriteup.bin/drumInstrWriteup.txt), and are
188        similar to IOT documented in Parallel Drum Type 23 Instruction Manual. */
189   /*  (iot)       rpa         rpb         tyo         tyi         ppa         ppb         dpy */
190      NULL,      iot_rpa,   iot_rpb,   iot_tyo,   iot_tyi,   iot_ppa,   iot_ppb,   iot_dpy,
191   /*              spacewar                                                                 */
192      NULL,      iot_011,   NULL,      NULL,      NULL,      NULL,      NULL,      NULL,
193   /*                          lag                                             glf?/jsp?   gpl?/gpr?/gcf? */
194      NULL,      NULL,      NULL,      NULL,      NULL,      NULL,      NULL,      NULL,
195   /*  rrb         rcb?        rcc?        cks         mcs         mes         mel          */
196      iot_rrb,   NULL,      NULL,      iot_cks,   NULL,      NULL,      NULL,      NULL,
197   /*  cad?        rac?        rbc?        pac                     lpr/lfb/lsp swc/sci/sdf?/shr?   scv? */
198      NULL,      NULL,      NULL,      NULL,      NULL,      NULL,      NULL,      NULL,
199   /*  (dsc)       (asc)       (isb)       (cac)       (lsm)       (esm)       (cbs)        */
200      NULL,      NULL,      NULL,      NULL,      NULL,      NULL,      NULL,      NULL,
201   /*  icv?        dia         dba         dcc         dra                     mri|rlc?    mrf/inr?/ccr? */
202      NULL,      iot_dia,   iot_dba,   iot_dcc,   iot_dra,   NULL,      NULL,      NULL,
203   /*  mcb|dur?    mwc|mtf?    mrc|sfc?... msm|cgo?    (eem/lem)   mic         muf          */
204      NULL,      NULL,      NULL,      NULL,      NULL,      NULL,      NULL,      NULL,
205   },
206   pdp1_tape_read_binary,
207   pdp1_io_sc_callback,
208   0,   /* extend mode support defined in input ports and pdp1_init_machine */
209   0,   /* hardware multiply/divide support defined in input ports and pdp1_init_machine */
210   0   /* type 20 sequence break system support defined in input ports and pdp1_init_machine */
211};
212
157213MACHINE_RESET( pdp1 )
158214{
159215   int config;
r6460r6461
591647 * IO Bits        10 11 12 13 14 15 16 17
592648 * TAPE CHANNELS  8  7  6  5  4  3  2  1
593649 */
594void iot_rpa(const device_config *device, int op2, int nac, int mb, int *io, int ac)
650static void iot_rpa(const device_config *device, int op2, int nac, int mb, int *io, int ac)
595651{
596652   if (LOG_IOT_EXTRA)
597653      logerror("Warning, RPA instruction not fully emulated: mb=0%06o, (%s)\n", (unsigned) mb, cpuexec_describe_context(device->machine));
r6460r6461
628684 * different (730002 or 724002) the 18-bit word read from tape is automatically
629685 * transferred to the IO Register via the Reader Buffer.
630686 */
631void iot_rpb(const device_config *device, int op2, int nac, int mb, int *io, int ac)
687static void iot_rpb(const device_config *device, int op2, int nac, int mb, int *io, int ac)
632688{
633689   if (LOG_IOT_EXTRA)
634690      logerror("Warning, RPB instruction not fully emulated: mb=0%06o, (%s)\n", (unsigned) mb, cpuexec_describe_context(device->machine));
r6460r6461
639695/*
640696    rrb iot callback
641697*/
642void iot_rrb(const device_config *device, int op2, int nac, int mb, int *io, int ac)
698static void iot_rrb(const device_config *device, int op2, int nac, int mb, int *io, int ac)
643699{
644700   if (LOG_IOT_EXTRA)
645701      logerror("RRB instruction: mb=0%06o, (%s)\n", (unsigned) mb, cpuexec_describe_context(device->machine));
r6460r6461
662718 * For each In-Out Transfer instruction one line of tape is punched. In-Out Register
663719 * Bit 17 conditions Hole 1. Bit 16 conditions Hole 2, etc. Bit 10 conditions Hole 8
664720 */
665void iot_ppa(const device_config *device, int op2, int nac, int mb, int *io, int ac)
721static void iot_ppa(const device_config *device, int op2, int nac, int mb, int *io, int ac)
666722{
667723   if (LOG_IOT_EXTRA)
668724      logerror("PPA instruction: mb=0%06o, (%s)\n", (unsigned) mb, cpuexec_describe_context(device->machine));
r6460r6461
690746 * Bit 5 conditions Hole 1. Bit 4 conditions Hole 2, etc. Bit 0 conditions Hole 6.
691747 * Hole 7 is left blank. Hole 8 is always punched in this mode.
692748 */
693void iot_ppb(const device_config *device, int op2, int nac, int mb, int *io, int ac)
749static void iot_ppb(const device_config *device, int op2, int nac, int mb, int *io, int ac)
694750{
695751   if (LOG_IOT_EXTRA)
696752      logerror("PPB instruction: mb=0%06o, (%s)\n", (unsigned) mb, cpuexec_describe_context(device->machine));
r6460r6461
856912/*
857913    tyo iot callback
858914*/
859void iot_tyo(const device_config *device, int op2, int nac, int mb, int *io, int ac)
915static void iot_tyo(const device_config *device, int op2, int nac, int mb, int *io, int ac)
860916{
861917   int ch, delay;
862918
r6460r6461
909965 * clears the In-Out Register before transferring the information and also clears
910966 * the type-in status bit.
911967 */
912void iot_tyi(const device_config *device, int op2, int nac, int mb, int *io, int ac)
968static void iot_tyi(const device_config *device, int op2, int nac, int mb, int *io, int ac)
913969{
914970   if (LOG_IOT_EXTRA)
915971      logerror("Warning, TYI instruction not fully emulated: mb=0%06o, (%s)\n", (unsigned) mb, cpuexec_describe_context(device->machine));
r6460r6461
9741030
9751031    Light on one pixel on CRT
9761032*/
977void iot_dpy(const device_config *device, int op2, int nac, int mb, int *io, int ac)
1033static void iot_dpy(const device_config *device, int op2, int nac, int mb, int *io, int ac)
9781034{
9791035   int x;
9801036   int y;
r6460r6461
10621118   parallel_drum.fd = NULL;
10631119}
10641120
1065void iot_dia(const device_config *device, int op2, int nac, int mb, int *io, int ac)
1121static void iot_dia(const device_config *device, int op2, int nac, int mb, int *io, int ac)
10661122{
10671123   parallel_drum.wfb = ((*io) & 0370000) >> 12;
10681124   parallel_drum_set_il((*io) & 0007777);
r6460r6461
10701126   parallel_drum.dba = 0;   /* right? */
10711127}
10721128
1073void iot_dba(const device_config *device, int op2, int nac, int mb, int *io, int ac)
1129static void iot_dba(const device_config *device, int op2, int nac, int mb, int *io, int ac)
10741130{
10751131   parallel_drum.wfb = ((*io) & 0370000) >> 12;
10761132   parallel_drum_set_il((*io) & 0007777);
r6460r6461
11111167   }
11121168}
11131169
1114void iot_dcc(const device_config *device, int op2, int nac, int mb, int *io, int ac)
1170static void iot_dcc(const device_config *device, int op2, int nac, int mb, int *io, int ac)
11151171{
11161172   attotime delay;
11171173   int dc;
r6460r6461
11501206   cpu_set_reg(cputag_get_cpu(device->machine, "maincpu"), PDP1_PC, cpu_get_reg(cputag_get_cpu(device->machine, "maincpu"), PDP1_PC)+1);
11511207}
11521208
1153void iot_dra(const device_config *device, int op2, int nac, int mb, int *io, int ac)
1209static void iot_dra(const device_config *device, int op2, int nac, int mb, int *io, int ac)
11541210{
11551211   (*io) = attotime_mul(
11561212      timer_timeelapsed(parallel_drum.rotation_timer),
r6460r6461
11721228        fire rocket, and fire torpedo. low order 4 bits, same for
11731229        other ship. routine is entered by jsp cwg.
11741230*/
1175void iot_011(const device_config *device, int op2, int nac, int mb, int *io, int ac)
1231static void iot_011(const device_config *device, int op2, int nac, int mb, int *io, int ac)
11761232{
11771233   int key_state = input_port_read(device->machine, "SPACEWAR");
11781234   int reply;
r6460r6461
12111267
12121268    check IO status
12131269*/
1214void iot_cks(const device_config *device, int op2, int nac, int mb, int *io, int ac)
1270static void iot_cks(const device_config *device, int op2, int nac, int mb, int *io, int ac)
12151271{
12161272   if (LOG_IOT_EXTRA)
12171273      logerror("CKS instruction: mb=0%06o, (%s)\n", (unsigned) mb, cpuexec_describe_context(device->machine));
src/mess/machine/adam.c
r6460r6461
2727
2828static UINT8 KbRepeatTable[256];
2929
30#ifdef UNUSED_FUNCTION
3031int adam_cart_verify(const UINT8 *cartdata, size_t size)
3132{
3233   int retval = IMAGE_VERIFY_FAIL;
r6460r6461
3940
4041   return retval;
4142}
43#endif
4244
4345void adam_clear_keyboard_buffer(void)
4446{
src/mess/machine/cbmb.c
r6460r6461
4545static UINT8 *cbmb_chargen;
4646UINT8 *cbmb_videoram;
4747UINT8 *cbmb_colorram;
48UINT8 *cbmb_memory;
48static UINT8 *cbmb_memory;
4949
5050/* tpi at 0xfde00
5151 in interrupt mode
src/mess/machine/rp5c15.c
r6460r6461
115115
116116static emu_timer* rtc_timer;
117117
118TIMER_CALLBACK(rtc_alarm_pulse)
118static void rtc_add_second(const device_config*);
119static void rtc_add_minute(const device_config*);
120static void rtc_add_day(const device_config*);
121static void rtc_add_month(const device_config*);
122
123static TIMER_CALLBACK(rtc_alarm_pulse)
119124{
120125   const device_config* device = ptr;
121126   rp5c15_t* rtc = device->token;
r6460r6461
354359   }
355360}
356361
357void rtc_add_second(const device_config* device)  // add one second to current time
362static void rtc_add_second(const device_config* device)  // add one second to current time
358363{
359364   rp5c15_t* rtc = device->token;
360365
r6460r6461
371376   rtc_add_minute(device);
372377}
373378
374void rtc_add_minute(const device_config* device)
379static void rtc_add_minute(const device_config* device)
375380{
376381   rp5c15_t* rtc = device->token;
377382
r6460r6461
396401   rtc_add_day(device);
397402}
398403
399void rtc_add_day(const device_config* device)
404static void rtc_add_day(const device_config* device)
400405{
401406   rp5c15_t* rtc = device->token;
402407   int d,m;
r6460r6461
464469   }
465470}
466471
467void rtc_add_month(const device_config* device)
472static void rtc_add_month(const device_config* device)
468473{
469474   rp5c15_t* rtc = device->token;
470475
src/mess/machine/rp5c15.h
r6460r6461
1515
1616DEVICE_GET_INFO(rp5c15);
1717
18void rtc_add_second(const device_config*);
19void rtc_add_minute(const device_config*);
20void rtc_add_day(const device_config*);
21void rtc_add_month(const device_config*);
22
23TIMER_CALLBACK(rtc_alarm_pulse);
24
2518#define RP5C15 DEVICE_GET_INFO_NAME(rp5c15)
2619
2720#define MDRV_RP5C15_ADD(_tag, _config) \
src/mess/machine/x68k_hdc.c
r6460r6461
2828   sasi->status_port |= 0x01;
2929}
3030
31unsigned char SASIReadByte(const device_config* device)
31static unsigned char SASIReadByte(const device_config* device)
3232{
3333   //int ret;
3434   unsigned char val;
src/mess/machine/x68k_hdc.h
r6460r6461
102102   int current_pos;
103103};
104104
105unsigned char SASIReadByte(const device_config* device);
106
107105DEVICE_START( x68k_hdc );
108106DEVICE_GET_INFO( x68k_hdc );
109107
src/mess/machine/lynx.c
r6460r6461
993993   }
994994}
995995
996READ8_HANDLER( suzy_read )
996static READ8_HANDLER( suzy_read )
997997{
998998   UINT8 value = 0, input;
999999
r6460r6461
10641064   return value;
10651065}
10661066
1067WRITE8_HANDLER(suzy_write)
1067static WRITE8_HANDLER( suzy_write )
10681068{
10691069   suzy.data[offset] = data;
10701070
r6460r6461
16111611****************************************/
16121612
16131613
1614READ8_HANDLER(mikey_read)
1614static READ8_HANDLER( mikey_read )
16151615{
16161616   UINT8 direction, value = 0x00;
16171617
r6460r6461
16811681   return value;
16821682}
16831683
1684WRITE8_HANDLER(mikey_write)
1684static WRITE8_HANDLER( mikey_write )
16851685{
16861686   switch (offset)
16871687   {
src/mess/machine/hec2hrp.c
r6460r6461
4242#include "includes/hectorkey.h"      // Keyboard mapping
4343#include "includes/hec2hrp.h"
4444
45const device_config *cassette_device_image(running_machine *machine);
4645
46static void Mise_A_Jour_Etat(int Adresse, int Value );
47static void Update_Sound(const address_space *space, UINT8 data);
4748
49static const device_config *cassette_device_image(running_machine *machine);
50
51static void Key(int pccode, int state, running_machine *machine);
52
4853// Stat for the register in 0x3000
49UINT8 state3000=0;
50UINT8 write_cassette=0;
54static UINT8 state3000=0;
55static UINT8 write_cassette=0;
5156
5257// Keyboard timer
53TIMER_CALLBACK( Callback_keyboard );
54emu_timer *keyboard_timer;
58static TIMER_CALLBACK( Callback_keyboard );
59static emu_timer *keyboard_timer;
5560
5661// Cassette timer
57TIMER_CALLBACK( Callback_CK );
58emu_timer *Cassette_timer;
59UINT8 CK_signal ;  // Synchro signal for K7
62static TIMER_CALLBACK( Callback_CK );
63static emu_timer *Cassette_timer;
64static UINT8 CK_signal ;  // Synchro signal for K7
6065
66// Status for CPU clock
67static UINT8 flag_clk=0;  // 0 5MHz (HR machine) - 1  1.75MHz (BR machine)
6168
62UINT8 actions=0xff;               //  keyboard key off
6369
64double Pin_Value[29][2]; // SN76477
65int AU[17];              // Pour les fils de bus audio du SN76477
66int ValMixer;            // for mixer
67int oldstate3000;        // Edge state mixer
68int oldstate1000;        // Edge state cassette
6970
71static UINT8 actions=0xff;               //  keyboard key off
7072
73static double Pin_Value[29][2]; // SN76477
74static int AU[17];              // Pour les fils de bus audio du SN76477
75static int ValMixer;            // for mixer
76static int oldstate3000;        // Edge state mixer
77static int oldstate1000;        // Edge state cassette
78
79
7180//#include "drivers/hec2son.c" // need to create a header file...
7281
7382// Keyboard map
74UINT8 touches[8];
75UINT8 pot0 = 0x40, pot1 = 0x40;  // State for joy resistor
83static UINT8 touches[8];
84static UINT8 pot0 = 0x40, pot1 = 0x40;  // State for joy resistor
7685
7786// To generate the CK signal (K7)
78TIMER_CALLBACK( Callback_CK )
87static TIMER_CALLBACK( Callback_CK )
7988{
8089   CK_signal++;
8190}
8291
83TIMER_CALLBACK( Callback_keyboard )
92static TIMER_CALLBACK( Callback_keyboard )
8493{
8594int touche ;
8695int Code0 ;
r6460r6461
109118}
110119}
111120
112void Key(int pccode, int state, running_machine *machine)
121static void Key(int pccode, int state, running_machine *machine)
113122{
114123 // Mise a jour de l'image du clavier /////////////////////////////////////////
115124int i, j, n;
r6460r6461
138147          {
139148               memory_set_bank(machine, 1, HECTOR_BANK_PROG);
140149               memory_set_bank(machine, 2, HECTORMX_BANK_PAGE0);
141               flag_hr=1;
150               hector_flag_hr=1;
142151          }
143152          else
144               flag_hr=0;
153               hector_flag_hr=0;
145154          //Common flag
146          flag_80c=0;
147          flag_clk =0;
155          hector_flag_80c = 0;
156          flag_clk = 0;
148157          return ;
149158 }
150159 for(i = 0; i < (n & 7); i++)
r6460r6461
168177                     }
169178                  }   
170179   if (offset==0x04)   {   // 0x804 => vidéo page, BR
171                     flag_hr=0;     
180                     hector_flag_hr=0;     
172181                           memory_set_bank(space->machine, 1, HECTOR_BANK_VIDEO);
173182                     if (flag_clk ==0)
174183                     {
r6460r6461
186195
187196                  } 
188197   if (offset==0x0c)   {   // 0x80c => base page, BR
189                     flag_hr=0;
198                     hector_flag_hr=0;
190199                           memory_set_bank(space->machine, 1, HECTOR_BANK_PROG);
191200                     if (flag_clk ==0)
192201                     {
r6460r6461
314323      }
315324
316325        // Other bit : color definition   
317          Col0 =  data        & 0x07 ;
318      Col2 =((data >> 3)  & 0x07) | (Col2 & 0x40) ;
326   hector_color[0] =  data        & 0x07 ;
327   hector_color[2] = ((data >> 3)  & 0x07) | (hector_color[2] & 0x40);
319328
320      oldstate1000=data; // For next step
329   oldstate1000=data; // For next step
321330}
322331WRITE8_HANDLER( hector_color_b_w )
323332{
324const device_config *discrete = devtag_get_device(space->machine, "discrete");
325          Col1 =  data        & 0x07 ;
326      Col3 = (data >> 3)  & 0x07;
327      // Half light on color 2 only on HR machines:
328      if (data & 0x40) Col2 |= 8; else Col2 &= 7;
329         // Play bit
330      discrete_sound_w(discrete, NODE_01,  (data & 0x80) ? 0:1 );
333   const device_config *discrete = devtag_get_device(space->machine, "discrete");
334          hector_color[1] =  data        & 0x07;
335   hector_color[3] = (data >> 3)  & 0x07;
336
337   // Half light on color 2 only on HR machines:
338   if (data & 0x40) hector_color[2] |= 8; else hector_color[2] &= 7;
339
340   // Play bit
341   discrete_sound_w(discrete, NODE_01,  (data & 0x80) ? 0:1 );
331342}
332343
333344
r6460r6461
335346 Cassette Handling
336347******************************************************************************/
337348
338const device_config *cassette_device_image(running_machine *machine)
349static const device_config *cassette_device_image(running_machine *machine)
339350{
340351   return devtag_get_device(machine, "cassette");
341352}
r6460r6461
356367   if ((offset &0x0ff) == 0x40) // Port page 0
357368      memory_set_bank(space->machine, 2, HECTORMX_BANK_PAGE0);
358369   if ((offset &0x0ff) == 0x41) // Port page 1
359      {
360            memory_set_bank(space->machine, 2, HECTORMX_BANK_PAGE1);
361            flag_80c=0;
362      }
370   {
371      memory_set_bank(space->machine, 2, HECTORMX_BANK_PAGE1);
372      hector_flag_80c=0;
373   }
363374   if ((offset &0x0ff) == 0x44) // Port page 2   // 42 pour MX80
364375      memory_set_bank(space->machine, 2, HECTORMX_BANK_PAGE2);
365376   if ((offset &0x0ff) == 0x49) // Port screen resolution
366      flag_80c=0;// No 80c in 40c !
377      hector_flag_80c=0;// No 80c in 40c !
367378}
368379
369380WRITE8_HANDLER( hector_mx80_io_port_w)
r6460r6461
373384   if ((offset &0x0ff) == 0x40) // Port page 0
374385      memory_set_bank(space->machine, 2, HECTORMX_BANK_PAGE0);
375386   if ((offset &0x0ff) == 0x41) // Port page 1
376      {
377            memory_set_bank(space->machine, 2, HECTORMX_BANK_PAGE1);
378            flag_80c=0;
379      }
387   {
388      memory_set_bank(space->machine, 2, HECTORMX_BANK_PAGE1);
389      hector_flag_80c=0;
390   }
380391   if ((offset &0x0ff) == 0x42) // Port page 2  => port different du MX40
381392      memory_set_bank(space->machine, 2, HECTORMX_BANK_PAGE2);
382393   if ((offset &0x0ff) == 0x49) // Port screen resolution
383      flag_80c=1;
394      hector_flag_80c=1;
384395}
385396
386397///////////////////////////////////////////////////////////////////////
r6460r6461
468479}
469480
470481
471void Init_Value_SN76477_Hector(void)
482static void Init_Value_SN76477_Hector(void)
472483{
473484     // Remplissage des valeurs de resistance et capacite d'Hector
474485
r6460r6461
653664   CAP_U(1.00001),   // 23  oneshot_cap
654665    RES_K(10000)   // 24  oneshot_res
655666};
667
668void hector_reset(running_machine *machine, int hr)
669{
670   hector_flag_hr = hr;
671   flag_clk = 0;
672   write_cassette = 0;
673}
674
675void hector_init(running_machine *machine)
676{
677   int i;
678
679   // For keyboard
680   keyboard_timer = timer_alloc(machine, Callback_keyboard, 0);
681   timer_adjust_periodic(keyboard_timer, ATTOTIME_IN_MSEC(100), 0, ATTOTIME_IN_MSEC(20));//keyboard scan 25ms
682
683   for(i = 0; i < 8; i++) touches[i] = 0xff;     //all key off
684
685   // For Cassette synchro
686   Cassette_timer = timer_alloc(machine, Callback_CK, 0);
687   timer_adjust_periodic(Cassette_timer, ATTOTIME_IN_MSEC(100), 0, ATTOTIME_IN_USEC(64));// 11 * 6; 16 *4; 32 *2; 64 => real synchro scan speed for 15,624Khz
688 
689   // Sound sn76477
690   Init_Value_SN76477_Hector();  //init R/C value
691}
src/mess/drivers/pdp1.c
r6460r6461
367367}
368368
369369
370pdp1_reset_param_t pdp1_reset_param =
371{
372   {   /* external iot handlers.  NULL means that the iot is unimplemented, unless there are
373        parentheses around the iot name, in which case the iot is internal to the cpu core. */
374      /* I put a ? when the source is the handbook, since a) I have used the maintainance manual
375        as the primary source (as it goes more into details) b) the handbook and the maintainance
376        manual occasionnally contradict each other. */
377      /* dia, dba, dcc, dra are documented in MIT PDP-1 COMPUTER MODIFICATION
378        BULLETIN no. 2 (drumInstrWriteup.bin/drumInstrWriteup.txt), and are
379        similar to IOT documented in Parallel Drum Type 23 Instruction Manual. */
380   /*  (iot)       rpa         rpb         tyo         tyi         ppa         ppb         dpy */
381      NULL,      iot_rpa,   iot_rpb,   iot_tyo,   iot_tyi,   iot_ppa,   iot_ppb,   iot_dpy,
382   /*              spacewar                                                                 */
383      NULL,      iot_011,   NULL,      NULL,      NULL,      NULL,      NULL,      NULL,
384   /*                          lag                                             glf?/jsp?   gpl?/gpr?/gcf? */
385      NULL,      NULL,      NULL,      NULL,      NULL,      NULL,      NULL,      NULL,
386   /*  rrb         rcb?        rcc?        cks         mcs         mes         mel          */
387      iot_rrb,   NULL,      NULL,      iot_cks,   NULL,      NULL,      NULL,      NULL,
388   /*  cad?        rac?        rbc?        pac                     lpr/lfb/lsp swc/sci/sdf?/shr?   scv? */
389      NULL,      NULL,      NULL,      NULL,      NULL,      NULL,      NULL,      NULL,
390   /*  (dsc)       (asc)       (isb)       (cac)       (lsm)       (esm)       (cbs)        */
391      NULL,      NULL,      NULL,      NULL,      NULL,      NULL,      NULL,      NULL,
392   /*  icv?        dia         dba         dcc         dra                     mri|rlc?    mrf/inr?/ccr? */
393      NULL,      iot_dia,   iot_dba,   iot_dcc,   iot_dra,   NULL,      NULL,      NULL,
394   /*  mcb|dur?    mwc|mtf?    mrc|sfc?... msm|cgo?    (eem/lem)   mic         muf          */
395      NULL,      NULL,      NULL,      NULL,      NULL,      NULL,      NULL,      NULL,
396   },
397   pdp1_tape_read_binary,
398   pdp1_io_sc_callback,
399   0,   /* extend mode support defined in input ports and pdp1_init_machine */
400   0,   /* hardware multiply/divide support defined in input ports and pdp1_init_machine */
401   0   /* type 20 sequence break system support defined in input ports and pdp1_init_machine */
402};
403
404
405370static MACHINE_DRIVER_START(pdp1)
406371
407372   /* basic machine hardware */
src/mess/drivers/elekscmp.c
r6460r6461
3030ADDRESS_MAP_END
3131
3232/* Input ports */
33INPUT_PORTS_START( elekscmp )
33static INPUT_PORTS_START( elekscmp )
3434INPUT_PORTS_END
3535
3636
src/mess/drivers/mk14.c
r6460r6461
6161
6262
6363/* Input ports */
64INPUT_PORTS_START( mk14 )
64static INPUT_PORTS_START( mk14 )
6565   PORT_START("LINE0")
6666      PORT_BIT(0x0F, IP_ACTIVE_LOW, IPT_UNUSED)
6767      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A)
src/mess/drivers/tvc.c
r6460r6461
342342   NULL
343343};
344344
345INTERRUPT_GEN( tvc_interrupt )
345static INTERRUPT_GEN( tvc_interrupt )
346346{
347347   tvc_flipflop  &= ~0x10;
348348   cpu_set_input_line(device, 0, HOLD_LINE);
src/mess/drivers/fmtowns.c
r6460r6461
166166static UINT16 towns_crtc_reg[32];
167167static UINT8 towns_tvram_enable;
168168
169struct towns_cdrom_controller
169static struct towns_cdrom_controller
170170{
171171   UINT8 command;
172172   UINT8 status;
src/mess/drivers/mod8.c
r6460r6461
4949ADDRESS_MAP_END
5050
5151/* Input ports */
52INPUT_PORTS_START( mod8 )
52static INPUT_PORTS_START( mod8 )
5353INPUT_PORTS_END
5454
5555static IRQ_CALLBACK ( mod8_irq_callback )
src/mess/drivers/interact.c
r6460r6461
8080ADDRESS_MAP_END
8181
8282/* Cassette definition */
83const struct CassetteOptions interact_cassette_options = {
83static const struct CassetteOptions interact_cassette_options = {
8484   1,      /* channels */
8585   16,      /* bits per sample */
8686   44100   /* sample frequency */
r6460r6461
101101
102102static MACHINE_RESET(interact)
103103{
104    flag_hr=0;
105    flag_clk =0;
106   write_cassette=0;
104   hector_reset(machine, 0);
107105}
108106
109107static MACHINE_START(interact)
110108{
111UINT8 i;
112       
113109   // Start keyboard
114110    at_keyboard_init(machine, AT_KEYBOARD_TYPE_PC);
115111    at_keyboard_reset();
116112    at_keyboard_set_scan_code_set(2);
117113    at_keyboard_reset();
118114
119   // For keyboard
120    keyboard_timer = timer_alloc(machine, Callback_keyboard, 0);
121    timer_adjust_periodic(keyboard_timer, ATTOTIME_IN_MSEC(100), 0, ATTOTIME_IN_MSEC(20));//keyboard scan 25ms
122
123    for(i = 0; i < 8; i++) touches[i] = 0xff;     //all key off
124
125   // For Cassette synchro
126    Cassette_timer = timer_alloc(machine, Callback_CK, 0);
127    timer_adjust_periodic(Cassette_timer, ATTOTIME_IN_MSEC(100), 0, ATTOTIME_IN_USEC(64));// 11 * 6; 16 *4; 32 *2; 64 => real synchro scan speed for 15,624Khz
128 
129   // Sound sn76477
130   Init_Value_SN76477_Hector();  //init R/C value
115   hector_init(machine);
131116}
132117
133static VIDEO_START( interact )
134{
135    Init_Hector_Palette(machine);
136    flag_hr=0;
137}
138
139118static VIDEO_UPDATE( interact )
140119{
141120      video_screen_set_visarea(screen, 0, 113, 0, 75);
142    hector_hr( bitmap, videoram,  77, 32);
121   hector_hr( bitmap, videoram,  77, 32);
143122   return 0;
144123}
145124
r6460r6461
163142   MDRV_PALETTE_LENGTH(16)            // 8 colours, but only 4 at a time
164143   MDRV_PALETTE_INIT(black_and_white)
165144
166   MDRV_VIDEO_START(interact)
145   MDRV_VIDEO_START(hec2hrp)
167146   MDRV_VIDEO_UPDATE(interact)
168147      /* sound hardware */
169148   MDRV_SPEAKER_STANDARD_MONO("mono")
r6460r6461
206185   MDRV_PALETTE_LENGTH(16)            // 8 colours, but only 4 at a time
207186   MDRV_PALETTE_INIT(black_and_white)
208187
209   MDRV_VIDEO_START(interact)
188   MDRV_VIDEO_START(hec2hrp)
210189   MDRV_VIDEO_UPDATE(interact)
211190      /* sound hardware */
212191   MDRV_SPEAKER_STANDARD_MONO("mono")
src/mess/drivers/fm7.c
r6460r6461
7979static UINT8 speaker_active;
8080static UINT16 fm7_kanji_address;
8181
82static void fm7_mmr_refresh(const address_space*);
8283
84
8385static struct key_encoder
8486{
8587   UINT8 buffer[12];
r6460r6461
11071109   memory_set_bankptr(space->machine,bank+1,RAM+(physical<<12));
11081110}
11091111
1110void fm7_mmr_refresh(const address_space* space)
1112static void fm7_mmr_refresh(const address_space* space)
11111113{
11121114   int x;
11131115   UINT16 window_addr;
src/mess/drivers/k1003.c
r6460r6461
7070ADDRESS_MAP_END
7171
7272/* Input ports */
73INPUT_PORTS_START( k1003 )
73static INPUT_PORTS_START( k1003 )
7474INPUT_PORTS_END
7575
7676
src/mess/drivers/pce220.c
r6460r6461
4444ADDRESS_MAP_END
4545
4646/* Input ports */
47INPUT_PORTS_START( pce220 )
47static INPUT_PORTS_START( pce220 )
4848INPUT_PORTS_END
4949
5050
src/mess/drivers/apf.c
r6460r6461
1616#include "driver.h"
1717#include "cpu/m6800/m6800.h"
1818#include "video/m6847.h"
19#include "includes/apf.h"
2019
2120#include "machine/6821pia.h"
2221#include "machine/wd17xx.h"
r6460r6461
5251static UINT8 mc6847_css = 0;
5352static UINT8 *apf_video_ram;
5453
54static unsigned char apf_ints;
55static void apf_update_ints(running_machine *machine);
56
57
5558static READ8_DEVICE_HANDLER( apf_mc6847_videoram_r )
5659{
5760   mc6847_css_w(device, mc6847_css && BIT(apf_video_ram[offset + 0x200], 6));
r6460r6461
154157/* use bit 3 to identify state of irq from pia 1 */
155158/* use bit 4 to identify state of irq from video */
156159
157unsigned char apf_ints;
158
159void apf_update_ints(running_machine *machine)
160static void apf_update_ints(running_machine *machine)
160161{
161162   cputag_set_input_line(machine, "maincpu", 0, apf_ints ? HOLD_LINE : CLEAR_LINE);
162163}
src/mess/drivers/hec2hrp.c
r6460r6461
5959#include "includes/hec2hrp.h"
6060
6161
62// Rom page (MX machine)
63UINT8 rom_p1[0x04000]; // Basic 3x page
64UINT8 rom_p2[0x04000]; // Assemblex / Monitrix page
65
66// Ram video BR :
67UINT8 videoramhector[0x04000];
68// Status for screen definition
69UINT8 flag_hr=1;
70UINT8 flag_80c=0;
71// Status for CPU clock
72UINT8 flag_clk=0;  // 0 5MHz (HR machine) - 1  1.75MHz (BR machine)
73
7462///////////////////////////////////////////////////////////////////////////////
7563static ADDRESS_MAP_START(hec2hrp_mem, ADDRESS_SPACE_PROGRAM, 8)
7664///////////////////////////////////////////////////////////////////////////////
r6460r6461
122110static MACHINE_START( hec2hrp )
123111///////////////////////////////////////////////////////////////////////////////
124112{   
125UINT8 i;
126
127113UINT8 *RAM = memory_region(machine, "maincpu"); // pointer to mess ram
128114UINT8 *ROM1 = memory_region(machine, "page1"); // pointer to rom page 1
129115UINT8 *ROM2 = memory_region(machine, "page2"); // pointer to rom page 2
130116
131117    // Memory install for bank switching
132118   memory_configure_bank(machine, 1, HECTOR_BANK_PROG , 1, &RAM[0xc000]  , 0); // Mess ram
133   memory_configure_bank(machine, 1, HECTOR_BANK_VIDEO, 1, videoramhector, 0); // Video ram
119   memory_configure_bank(machine, 1, HECTOR_BANK_VIDEO, 1, hector_videoram, 0); // Video ram
134120
135121    // Set bank HECTOR_BANK_PROG as basic bank
136122   memory_set_bank(machine, 1, HECTOR_BANK_PROG);
r6460r6461
141127   memory_configure_bank(machine, 2, HECTORMX_BANK_PAGE2 , 1, &ROM2[0x0000] , 0); // Rom page 2
142128   memory_set_bank(machine, 2, HECTORMX_BANK_PAGE0);
143129//////////////////////////////////////////////////////////SPECIFIQUE MX /////////////////
144   // For keyboard
145    keyboard_timer = timer_alloc(machine, Callback_keyboard, 0);
146    timer_adjust_periodic(keyboard_timer, ATTOTIME_IN_MSEC(100), 0, ATTOTIME_IN_MSEC(20));//keyboard scan 25ms
147130
148131    // Start keyboard
149132    at_keyboard_init(machine, AT_KEYBOARD_TYPE_PC);
r6460r6461
151134    at_keyboard_set_scan_code_set(2);
152135    at_keyboard_reset();
153136
154    for(i = 0; i < 8; i++) touches[i] = 0xff;     //all key off
155137
156   // For Cassette synchro
157    Cassette_timer = timer_alloc(machine, Callback_CK, 0);
158    timer_adjust_periodic(Cassette_timer, ATTOTIME_IN_MSEC(100), 0, ATTOTIME_IN_USEC(64));// 11 * 6; 16 *4; 32 *2; 64 => real synchro scan speed for 15,624Khz
159 
160   // Sound sn76477
161   Init_Value_SN76477_Hector();  //init R/C value
138    hector_init(machine);
162139}
163140
164141static MACHINE_RESET(hec2hrp)
165142{
166143   memory_set_bank(machine, 1, HECTOR_BANK_PROG);
167    memory_set_bank(machine, 2, HECTORMX_BANK_PAGE0);
168    flag_hr=1;
169    flag_clk =0;
170   write_cassette=0;
144   memory_set_bank(machine, 2, HECTORMX_BANK_PAGE0);
145   hector_reset(machine, 1);
171146}
172147
173148/* Cassette definition */
174const struct CassetteOptions hector_cassette_options = {
149static const struct CassetteOptions hector_cassette_options = {
175150   1,      /* channels */
176151   16,      /* bits per sample */
177152   44100   /* sample frequency */
r6460r6461
191166DISCRETE_SOUND_END
192167
193168///////////////////////////////////////////////////////////////////////////////
194static VIDEO_START( hec2hrp )
195///////////////////////////////////////////////////////////////////////////////
196{
197    Init_Hector_Palette(machine);
198}
199
200static VIDEO_UPDATE( hec2hrp )
201{
202    if (flag_hr==1)
203        {   
204           if (flag_80c==0)
205           {
206              video_screen_set_visarea(screen, 0, 243, 0, 227);
207              hector_hr( bitmap , &videoramhector[0], 227, 64);
208           }
209           else
210           {
211               video_screen_set_visarea(screen, 0, 243*2, 0, 227);
212               hector_80c( bitmap , &videoramhector[0], 227, 64);
213           }
214        }
215   else
216        {
217              video_screen_set_visarea(screen, 0, 113, 0, 75);
218            hector_hr( bitmap, videoram,  77, 32);
219        }
220    return 0;
221}
222
223///////////////////////////////////////////////////////////////////////////////
224169static MACHINE_DRIVER_START( hec2hr )
225170///////////////////////////////////////////////////////////////////////////////
226171   /* basic machine hardware */
r6460r6461
265210MACHINE_DRIVER_END
266211
267212///////////////////////////////////////////////////////////////////////////////
268 MACHINE_DRIVER_START( hec2hrp )
213static MACHINE_DRIVER_START( hec2hrp )
269214///////////////////////////////////////////////////////////////////////////////
270215   /* basic machine hardware */
271216   MDRV_CPU_ADD("maincpu",Z80, XTAL_5MHz)
docs/messnew.txt
r6460r6461
6161- The core is based on MAME 0.135u1.  This incorporates all features of the
6262  update to this core.  [MAME team]
6363
64- Cleanups (static qualifiers, headers, renames and more multisession
65  friendly init code).  [Atari Ace]
64- Cleanups (static qualifiers, headers, renames, reduced global symbols, and
65  more multisession friendly init code).  [Atari Ace]
6666
6767
6868

Previous 15994 Revisions Next


© 1998-2018 The MESS Team