Previous 15994 Revisions Next

r2813 Thursday 5th June, 2008 at 12:26:49 UTC by Miodrag Milanović
[APOGEE][MIKROSHA] New drivers for Apogee BK-01 and Mikrosha with tape working
[docs]messnew.txt
[src/mess]mess.mak messdriv.c
[src/mess/drivers]apogee.c* mikrosha.c*
[src/mess/formats]rk_cas.c rk_cas.h
[src/mess/includes]apogee.h* mikrosha.h*
[src/mess/machine]apogee.c* mikrosha.c*
[src/mess/video]apogee.c* mikrosha.c*

src/mess/includes/mikrosha.h
r0r2813
1/*****************************************************************************
2 *
3 * includes/mikrosha.h
4 *
5 ****************************************************************************/
6
7#ifndef MIKROSHA_H_
8#define MIKROSHA_H_
9
10
11/*----------- defined in machine/mikrosha.c -----------*/
12
13extern DRIVER_INIT( mikrosha );
14extern MACHINE_RESET( mikrosha );
15
16extern const ppi8255_interface mikrosha_ppi8255_interface_1;
17extern const i8275_interface mikrosha_i8275_interface;
18
19/*----------- defined in video/mikrosha.c -----------*/
20
21extern I8275_DISPLAY_PIXELS(mikrosha_display_pixels);
22
23extern VIDEO_UPDATE( mikrosha );
24extern PALETTE_INIT( mikrosha );
25
26
27#endif /* MIKROSHA_H_ */
src/mess/includes/apogee.h
r0r2813
1/*****************************************************************************
2 *
3 * includes/apogee.h
4 *
5 ****************************************************************************/
6
7#ifndef APOGEE_H_
8#define APOGEE_H_
9
10
11/*----------- defined in machine/apogee.c -----------*/
12
13extern DRIVER_INIT( apogee );
14extern MACHINE_RESET( apogee );
15
16extern const ppi8255_interface apogee_ppi8255_interface_1;
17extern const i8275_interface apogee_i8275_interface;
18
19/*----------- defined in video/apogee.c -----------*/
20
21extern I8275_DISPLAY_PIXELS(apogee_display_pixels);
22
23extern VIDEO_UPDATE( apogee );
24extern PALETTE_INIT( apogee );
25
26
27#endif /* APOGEE_H_ */
src/mess/video/mikrosha.c
r0r2813
1/***************************************************************************
2
3        Mikrosha video driver by Miodrag Milanovic
4
5        06/03/2008 Preliminary driver.
6
7****************************************************************************/
8
9
10#include "driver.h"
11#include "video/i8275.h"
12
13I8275_DISPLAY_PIXELS(mikrosha_display_pixels)
14{
15   int i;
16   bitmap_t *bitmap = tmpbitmap;
17   UINT8 *charmap = memory_region(REGION_GFX1);
18   UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;
19   if (vsp) {
20      pixels = 0;
21   }
22   if (lten) {
23      pixels = 0xff;
24   }
25   if (rvv) {
26      pixels ^= 0xff;
27   }
28   for(i=0;i<6;i++) {
29      *BITMAP_ADDR16(bitmap, y, x + i) = (pixels >> (5-i)) & 1;
30   }
31}
32
33VIDEO_UPDATE( mikrosha )
34{
35   device_config   *devconf = (device_config *) device_list_find_by_tag(screen->machine->config->devicelist, I8275, "i8275");
36   i8275_update( devconf, bitmap, cliprect);
37   VIDEO_UPDATE_CALL ( generic_bitmapped );
38   return 0;
39}
40
41const rgb_t mikrosha_palette[3] = {
42   MAKE_RGB(0x00, 0x00, 0x00), // black
43   MAKE_RGB(0xa0, 0xa0, 0xa0), // white
44   MAKE_RGB(0xff, 0xff, 0xff)   // highlight
45};
46
47PALETTE_INIT( mikrosha )
48{
49   palette_set_colors(machine, 0, mikrosha_palette, ARRAY_LENGTH(mikrosha_palette));
50}
51
src/mess/video/apogee.c
r0r2813
1/***************************************************************************
2
3        Apogee BK-01 driver by Miodrag Milanovic
4
5        05/06/2008 Preliminary driver.
6
7****************************************************************************/
8
9
10#include "driver.h"
11#include "video/i8275.h"
12
13I8275_DISPLAY_PIXELS(apogee_display_pixels)
14{
15   int i;
16   bitmap_t *bitmap = tmpbitmap;
17   UINT8 *charmap = memory_region(REGION_GFX1);
18   UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;
19   if (vsp) {
20      pixels = 0;
21   }
22   if (lten) {
23      pixels = 0xff;
24   }
25   if (rvv) {
26      pixels ^= 0xff;
27   }
28   for(i=0;i<6;i++) {
29      *BITMAP_ADDR16(bitmap, y, x + i) = (pixels >> (5-i)) & 1;
30   }
31}
32
33VIDEO_UPDATE( apogee )
34{
35   device_config   *devconf = (device_config *) device_list_find_by_tag(screen->machine->config->devicelist, I8275, "i8275");
36   i8275_update( devconf, bitmap, cliprect);
37   VIDEO_UPDATE_CALL ( generic_bitmapped );
38   return 0;
39}
40
41const rgb_t apogee_palette[3] = {
42   MAKE_RGB(0x00, 0x00, 0x00), // black
43   MAKE_RGB(0xa0, 0xa0, 0xa0), // white
44   MAKE_RGB(0xff, 0xff, 0xff)   // highlight
45};
46
47PALETTE_INIT( apogee )
48{
49   palette_set_colors(machine, 0, apogee_palette, ARRAY_LENGTH(apogee_palette));
50}
51
src/mess/messdriv.c
r2812r2813
871871   DRIVER( radio86 )
872872   DRIVER( radio4k )
873873   DRIVER( spektr01 )
874   DRIVER( apogee )
875   DRIVER( mikrosha )
874876
875877   /* Bondwell */
876878   DRIVER( bw2 )
src/mess/machine/mikrosha.c
r0r2813
1/***************************************************************************
2
3        Mikrosha machine driver by Miodrag Milanovic
4
5        06/03/2008 Preliminary driver.
6
7****************************************************************************/
8
9
10#include "driver.h"
11#include "deprecat.h"
12#include "cpu/i8085/i8085.h"
13#include "devices/cassette.h"
14#include "machine/8255ppi.h"
15#include "machine/8257dma.h"
16#include "video/i8275.h"
17#include "includes/mikrosha.h"
18
19static int mikrosha_keyboard_mask;
20
21
22/* Driver initialization */
23DRIVER_INIT(mikrosha)
24{
25   /* set initialy ROM to be visible on first bank */
26   UINT8 *RAM = memory_region(REGION_CPU1);
27   memset(RAM,0x0000,0x1000); // make frist page empty by default
28     memory_configure_bank(1, 1, 2, RAM, 0x0000);
29   memory_configure_bank(1, 0, 2, RAM, 0xf800);
30}
31
32READ8_HANDLER (mikrosha_8255_porta_r2 )
33{
34   UINT8 key = 0xff;
35   if ((mikrosha_keyboard_mask & 0x01)!=0) { key &= input_port_read(machine,"LINE0"); }
36   if ((mikrosha_keyboard_mask & 0x02)!=0) { key &= input_port_read(machine,"LINE1"); }
37   if ((mikrosha_keyboard_mask & 0x04)!=0) { key &= input_port_read(machine,"LINE2"); }
38   if ((mikrosha_keyboard_mask & 0x08)!=0) { key &= input_port_read(machine,"LINE3"); }
39   if ((mikrosha_keyboard_mask & 0x10)!=0) { key &= input_port_read(machine,"LINE4"); }
40   if ((mikrosha_keyboard_mask & 0x20)!=0) { key &= input_port_read(machine,"LINE5"); }
41   if ((mikrosha_keyboard_mask & 0x40)!=0) { key &= input_port_read(machine,"LINE6"); }
42   if ((mikrosha_keyboard_mask & 0x80)!=0) { key &= input_port_read(machine,"LINE7"); }
43   return key;
44}
45
46READ8_HANDLER (mikrosha_8255_portc_r2 )
47{
48   double level = cassette_input(image_from_devtype_and_index(IO_CASSETTE, 0));
49   UINT8 dat = input_port_read(machine,"LINE8");
50   if (level <  0) {
51      dat ^= 0x10;
52    }
53   return dat;
54}
55
56WRITE8_HANDLER (mikrosha_8255_portb_w2 )
57{
58   mikrosha_keyboard_mask = data ^ 0xff;
59}
60
61const ppi8255_interface mikrosha_ppi8255_interface_1 =
62{
63   mikrosha_8255_porta_r2,
64   NULL,
65   mikrosha_8255_portc_r2,
66   NULL,
67   mikrosha_8255_portb_w2,
68   NULL,
69};
70
71I8275_DMA_REQUEST(mikrosha_video_dma_request) {
72   dma8257_drq_write(0, 2, state);
73}
74
75const i8275_interface mikrosha_i8275_interface = {
76   "main",
77   6,
78   mikrosha_video_dma_request,
79   NULL,
80   mikrosha_display_pixels
81};
82
83static UINT8 mikrosha_dma_read_byte(int channel, offs_t offset)
84{
85   UINT8 result;
86   cpuintrf_push_context(0);
87   result = program_read_byte(offset);
88   cpuintrf_pop_context();
89   return result;
90}
91
92static void mikrosha_write_video(UINT8 data)
93{
94   i8275_dack_set_data((device_config*)device_list_find_by_tag( Machine->config->devicelist, I8275, "i8275" ),data);
95}
96
97static const struct dma8257_interface mikrosha_dma =
98{
99   0,
100   XTAL_16MHz / 9,
101
102   mikrosha_dma_read_byte,
103   0,
104
105   { 0, 0, 0, 0 },
106   { 0, 0, mikrosha_write_video, 0 },
107   { 0, 0, 0, 0 }
108};
109
110static TIMER_CALLBACK( mikrosha_reset )
111{
112   memory_set_bank(1, 0);
113}
114
115MACHINE_RESET( mikrosha )
116{
117   timer_set(ATTOTIME_IN_USEC(10), NULL, 0, mikrosha_reset);
118   memory_set_bank(1, 1);
119
120   mikrosha_keyboard_mask = 0;
121   dma8257_init(1);
122   dma8257_config(0, &mikrosha_dma);
123   dma8257_reset();
124}
src/mess/machine/apogee.c
r0r2813
1/***************************************************************************
2
3        Apogee BK-01 driver by Miodrag Milanovic
4
5        05/06/2008 Preliminary driver.
6
7****************************************************************************/
8
9
10#include "driver.h"
11#include "deprecat.h"
12#include "cpu/i8085/i8085.h"
13#include "devices/cassette.h"
14#include "machine/8255ppi.h"
15#include "machine/8257dma.h"
16#include "video/i8275.h"
17#include "includes/apogee.h"
18
19static int apogee_keyboard_mask;
20
21
22/* Driver initialization */
23DRIVER_INIT(apogee)
24{
25   /* set initialy ROM to be visible on first bank */
26   UINT8 *RAM = memory_region(REGION_CPU1);
27   memset(RAM,0x0000,0x1000); // make frist page empty by default
28     memory_configure_bank(1, 1, 2, RAM, 0x0000);
29   memory_configure_bank(1, 0, 2, RAM, 0xf800);
30}
31
32READ8_HANDLER (apogee_8255_portb_r2 )
33{
34   UINT8 key = 0xff;
35   if ((apogee_keyboard_mask & 0x01)!=0) { key &= input_port_read(machine,"LINE0"); }
36   if ((apogee_keyboard_mask & 0x02)!=0) { key &= input_port_read(machine,"LINE1"); }
37   if ((apogee_keyboard_mask & 0x04)!=0) { key &= input_port_read(machine,"LINE2"); }
38   if ((apogee_keyboard_mask & 0x08)!=0) { key &= input_port_read(machine,"LINE3"); }
39   if ((apogee_keyboard_mask & 0x10)!=0) { key &= input_port_read(machine,"LINE4"); }
40   if ((apogee_keyboard_mask & 0x20)!=0) { key &= input_port_read(machine,"LINE5"); }
41   if ((apogee_keyboard_mask & 0x40)!=0) { key &= input_port_read(machine,"LINE6"); }
42   if ((apogee_keyboard_mask & 0x80)!=0) { key &= input_port_read(machine,"LINE7"); }
43   return key;
44}
45
46READ8_HANDLER (apogee_8255_portc_r2 )
47{
48   double level = cassette_input(image_from_devtype_and_index(IO_CASSETTE, 0));
49   UINT8 dat = input_port_read(machine,"LINE8");
50   if (level <  0) {
51      dat ^= 0x10;
52    }
53   return dat;
54}
55
56WRITE8_HANDLER (apogee_8255_porta_w2 )
57{
58   apogee_keyboard_mask = data ^ 0xff;
59}
60
61const ppi8255_interface apogee_ppi8255_interface_1 =
62{
63   NULL,
64   apogee_8255_portb_r2,
65   apogee_8255_portc_r2,
66   apogee_8255_porta_w2,
67   NULL,
68   NULL,
69};
70
71I8275_DMA_REQUEST(apogee_video_dma_request) {
72   dma8257_drq_write(0, 2, state);
73}
74
75const i8275_interface apogee_i8275_interface = {
76   "main",
77   6,
78   apogee_video_dma_request,
79   NULL,
80   apogee_display_pixels
81};
82
83static UINT8 apogee_dma_read_byte(int channel, offs_t offset)
84{
85   UINT8 result;
86   cpuintrf_push_context(0);
87   result = program_read_byte(offset);
88   cpuintrf_pop_context();
89   return result;
90}
91
92static void apogee_write_video(UINT8 data)
93{
94   i8275_dack_set_data((device_config*)device_list_find_by_tag( Machine->config->devicelist, I8275, "i8275" ),data);
95}
96
97static const struct dma8257_interface apogee_dma =
98{
99   0,
100   XTAL_16MHz / 9,
101
102   apogee_dma_read_byte,
103   0,
104
105   { 0, 0, 0, 0 },
106   { 0, 0, apogee_write_video, 0 },
107   { 0, 0, 0, 0 }
108};
109
110static TIMER_CALLBACK( apogee_reset )
111{
112   memory_set_bank(1, 0);
113}
114
115MACHINE_RESET( apogee )
116{
117   timer_set(ATTOTIME_IN_USEC(1), NULL, 0, apogee_reset);
118   memory_set_bank(1, 1);
119
120   apogee_keyboard_mask = 0;
121   dma8257_init(1);
122   dma8257_config(0, &apogee_dma);
123   dma8257_reset();
124}
src/mess/formats/rk_cas.c
r2812r2813
1414#define RK_HEADER_LEN   256
1515
1616#define RK_SIZE_20 20
17#define RK_SIZE_22 22
1718#define RK_SIZE_60 60
1819
1920static int     data_size;
r2812r2813
6061   return  (RK_HEADER_LEN  * 8 * 2 +  8*2 + caslen * 8 * 2) * RK_SIZE_20;   
6162}
6263
64static int rk22_cas_to_wav_size( const UINT8 *casdata, int caslen ) {   
65   data_size = caslen;
66   return  (RK_HEADER_LEN  * 8 * 2 +  8*2 + caslen * 8 * 2) * RK_SIZE_22;   
67}
68
6369static int rk60_cas_to_wav_size( const UINT8 *casdata, int caslen ) {   
6470   data_size = caslen;
6571   return  (RK_HEADER_LEN  * 8 * 2 +  8*2 + caslen * 8 * 2) * RK_SIZE_60;   
r2812r2813
8187   return p - buffer;
8288}
8389
90static int rk22_cas_fill_wave( INT16 *buffer, int length, UINT8 *bytes ) {   
91   int i;
92   INT16 * p = buffer;
93   
94   for (i=0; i<RK_HEADER_LEN; i++) {
95      p = rk_output_byte (p, 0x00, RK_SIZE_22 );   
96   }
97
98   p = rk_output_byte (p, 0xE6, RK_SIZE_22);   
99   
100   for (i=0; i<data_size; i++)
101      p = rk_output_byte (p, bytes[i], RK_SIZE_22);
102
103   return p - buffer;
104}
105
84106static int rk60_cas_fill_wave( INT16 *buffer, int length, UINT8 *bytes ) {   
85107   int i;
86108   INT16 * p = buffer;
r2812r2813
97119   return p - buffer;
98120}
99121
100
101
102122static const struct CassetteLegacyWaveFiller rk20_legacy_fill_wave = {
103123   rk20_cas_fill_wave,         /* fill_wave */
104124   -1,               /* chunk_size */
r2812r2813
109129   0               /* trailer_samples */
110130};
111131
112
113
114132static casserr_t rk20_cassette_identify( cassette_image *cassette, struct CassetteOptions *opts ) {
115133   return cassette_legacy_identify( cassette, opts, &rk20_legacy_fill_wave );
116134}
r2812r2813
119137   return cassette_legacy_construct( cassette, &rk20_legacy_fill_wave );
120138}
121139
140static const struct CassetteLegacyWaveFiller rk22_legacy_fill_wave = {
141   rk22_cas_fill_wave,         /* fill_wave */
142   -1,               /* chunk_size */
143   0,               /* chunk_samples */
144   rk22_cas_to_wav_size,         /* chunk_sample_calc */
145   RK_WAV_FREQUENCY,         /* sample_frequency */
146   0,               /* header_samples */
147   0               /* trailer_samples */
148};
149
150static casserr_t rk22_cassette_identify( cassette_image *cassette, struct CassetteOptions *opts ) {
151   return cassette_legacy_identify( cassette, opts, &rk22_legacy_fill_wave );
152}
153
154static casserr_t rk22_cassette_load( cassette_image *cassette ) {
155   return cassette_legacy_construct( cassette, &rk22_legacy_fill_wave );
156}
157
122158static const struct CassetteLegacyWaveFiller rk60_legacy_fill_wave = {
123159   rk60_cas_fill_wave,         /* fill_wave */
124160   -1,               /* chunk_size */
r2812r2813
172208   NULL
173209};
174210
211static const struct CassetteFormat rka_cassette_format = {
212   "rka",
213   rk20_cassette_identify,
214   rk20_cassette_load,
215   NULL
216};
217
218static const struct CassetteFormat rkm_cassette_format = {
219   "rkm",
220   rk22_cassette_identify,
221   rk22_cassette_load,
222   NULL
223};
175224CASSETTE_FORMATLIST_START(rku_cassette_formats)
176225   CASSETTE_FORMAT(rku_cassette_format)
177226CASSETTE_FORMATLIST_END
r2812r2813
191240CASSETTE_FORMATLIST_START(rkr_cassette_formats)
192241   CASSETTE_FORMAT(rkr_cassette_format)
193242CASSETTE_FORMATLIST_END
243
244CASSETTE_FORMATLIST_START(rka_cassette_formats)
245   CASSETTE_FORMAT(rka_cassette_format)
246CASSETTE_FORMATLIST_END
247
248CASSETTE_FORMATLIST_START(rkm_cassette_formats)
249   CASSETTE_FORMAT(rkm_cassette_format)
250CASSETTE_FORMATLIST_END
src/mess/formats/rk_cas.h
r2812r2813
1515CASSETTE_FORMATLIST_EXTERN(rks_cassette_formats);
1616CASSETTE_FORMATLIST_EXTERN(rko_cassette_formats);
1717CASSETTE_FORMATLIST_EXTERN(rkr_cassette_formats);
18CASSETTE_FORMATLIST_EXTERN(rka_cassette_formats);
19CASSETTE_FORMATLIST_EXTERN(rkm_cassette_formats);
1820
1921#endif /* RK_CAS_H */
2022
src/mess/mess.mak
r2812r2813
493493   $(MESS_MACHINE)/mm58274c.o \
494494   $(MESS_MACHINE)/z80dart.o   \
495495   $(MESS_MACHINE)/68901mfp.o \
496   $(MESS_FORMATS)/rk_cas.o   \
496497   $(MESS_VIDEO)/msm6255.o   \
497498
498499
r2812r2813
12201221$(MESSOBJ)/ut88.a:      \
12211222   $(MESS_DRIVERS)/ut88.o \
12221223   $(MESS_MACHINE)/ut88.o \
1223   $(MESS_FORMATS)/rk_cas.o      \
12241224   $(MESS_VIDEO)/ut88.o \
12251225
12261226$(MESSOBJ)/mikro80.a:      \
r2812r2813
12531253   $(MESS_DRIVERS)/radio86.o \
12541254   $(MESS_MACHINE)/radio86.o \
12551255   $(MESS_VIDEO)/radio86.o \
1256   $(MESS_DRIVERS)/apogee.o \
1257   $(MESS_MACHINE)/apogee.o \
1258   $(MESS_VIDEO)/apogee.o \
1259   $(MESS_DRIVERS)/mikrosha.o \
1260   $(MESS_MACHINE)/mikrosha.o \
1261   $(MESS_VIDEO)/mikrosha.o \
12561262   $(MESS_VIDEO)/i8275.o \
12571263
12581264$(MESSOBJ)/comx.a:            \
src/mess/drivers/mikrosha.c
r0r2813
1/***************************************************************************
2
3        Mikrosha driver by Miodrag Milanovic
4
5        05/06/2008 Preliminary driver.
6
7****************************************************************************/
8
9
10#include "driver.h"
11#include "cpu/i8085/i8085.h"
12#include "machine/8255ppi.h"
13#include "machine/8257dma.h"
14#include "video/i8275.h"
15#include "devices/cassette.h"
16#include "formats/rk_cas.h"
17#include "includes/mikrosha.h"
18
19/* Address maps */
20static ADDRESS_MAP_START(mikrosha_mem, ADDRESS_SPACE_PROGRAM, 8)
21    AM_RANGE( 0x0000, 0x0fff ) AM_RAMBANK(1) // First bank
22    AM_RANGE( 0x1000, 0x7fff ) AM_RAM  // RAM
23    AM_RANGE( 0xc000, 0xc003 ) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) AM_MIRROR(0x07fc)
24    //AM_RANGE( 0xc800, 0xc803 ) AM_DEVREADWRITE(PPI8255, "ppi8255_2", ppi8255_r, ppi8255_w) AM_MIRROR(0x07fc)
25    AM_RANGE( 0xd000, 0xd001 ) AM_DEVREADWRITE(I8275, "i8275", i8275_r, i8275_w) AM_MIRROR(0x07fe) // video
26    //AM_RANGE( 0xd800, 0xd603 ) AM_MIRROR(0x07fc) // Timer
27    AM_RANGE( 0xf800, 0xffff ) AM_WRITE(dma8257_0_w)    // DMA
28    AM_RANGE( 0xf800, 0xffff ) AM_ROM  // System ROM
29ADDRESS_MAP_END
30
31/* Input ports */
32INPUT_PORTS_START( mikrosha )
33   PORT_START_TAG("LINE0")
34      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE)
35      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP)
36      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0)
37      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8)
38      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(":") PORT_CODE(KEYCODE_EQUALS)
39      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H)
40      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P)
41      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X)
42   PORT_START_TAG("LINE1")
43      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC)
44      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN)
45      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1)
46      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9)
47      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A)
48      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I)
49      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q)
50      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y)
51   PORT_START_TAG("LINE2")
52      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB)
53      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Home") PORT_CODE(KEYCODE_HOME)
54      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2)
55      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(":") PORT_CODE(KEYCODE_EQUALS)
56      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B)
57      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J)
58      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R)
59      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z)
60   PORT_START_TAG("LINE3")
61      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Del") PORT_CODE(KEYCODE_DEL)
62      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1)
63      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3)
64      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("`") PORT_CODE(KEYCODE_TILDE)
65      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C)
66      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K)
67      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S)
68      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE)
69   PORT_START_TAG("LINE4")
70      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER)
71      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PgUp") PORT_CODE(KEYCODE_PGUP)
72      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4)
73      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("<") PORT_CODE(KEYCODE_COMMA)
74      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D)
75      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L)
76      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T)
77      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("'") PORT_CODE(KEYCODE_QUOTE)
78   PORT_START_TAG("LINE5")
79      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ins") PORT_CODE(KEYCODE_INSERT)
80      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("End") PORT_CODE(KEYCODE_END)
81      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5)
82      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS)
83      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E)
84      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M)
85      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U)
86      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE)
87   PORT_START_TAG("LINE6")
88      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT)
89      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Center") PORT_CODE(KEYCODE_F3)
90      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6)
91      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(">") PORT_CODE(KEYCODE_STOP)
92      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F)
93      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N)
94      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V)
95      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\") PORT_CODE(KEYCODE_BACKSLASH)
96   PORT_START_TAG("LINE7")
97      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT)
98      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PgDn") PORT_CODE(KEYCODE_PGDN)
99      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7)
100      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("?") PORT_CODE(KEYCODE_SLASH)
101      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G)
102      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O)
103      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W)
104      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Back") PORT_CODE(KEYCODE_BACKSPACE)
105   PORT_START_TAG("LINE8")
106      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
107      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
108      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
109      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
110      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
111      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Rus/Lat") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT)
112      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL)
113      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT)
114INPUT_PORTS_END
115
116/* Machine driver */
117static MACHINE_DRIVER_START( mikrosha )
118    /* basic machine hardware */
119    MDRV_CPU_ADD(8080, XTAL_16MHz / 9)
120    MDRV_CPU_PROGRAM_MAP(mikrosha_mem, 0)
121    MDRV_MACHINE_RESET( mikrosha )
122
123   MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 )
124   MDRV_DEVICE_CONFIG( mikrosha_ppi8255_interface_1 )
125
126   //MDRV_DEVICE_ADD( "ppi8255_2", PPI8255 )
127   //MDRV_DEVICE_CONFIG( mikrosha_ppi8255_interface_2 )
128
129   MDRV_DEVICE_ADD( "i8275", I8275 )
130   MDRV_DEVICE_CONFIG(mikrosha_i8275_interface)
131    /* video hardware */
132   MDRV_SCREEN_ADD("main", RASTER)
133   MDRV_SCREEN_REFRESH_RATE(50)
134   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
135   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
136   MDRV_SCREEN_SIZE(78*6, 30*10)
137   MDRV_SCREEN_VISIBLE_AREA(0, 78*6-1, 0, 30*10-1)
138   MDRV_PALETTE_LENGTH(3)
139   MDRV_PALETTE_INIT(mikrosha)
140
141   MDRV_VIDEO_START(generic_bitmapped)
142   MDRV_VIDEO_UPDATE(mikrosha)
143
144   MDRV_SPEAKER_STANDARD_MONO("mono")
145   MDRV_SOUND_ADD(WAVE, 0)
146   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
147MACHINE_DRIVER_END
148
149static void mikrosha_cassette_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
150{
151   /* cassette */
152   switch(state)
153   {
154      /* --- the following bits of info are returned as 64-bit signed integers --- */
155      case MESS_DEVINFO_INT_COUNT:            info->i = 1; break;
156      case MESS_DEVINFO_INT_CASSETTE_DEFAULT_STATE:   info->i = CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED; break;
157      case MESS_DEVINFO_PTR_CASSETTE_FORMATS:      info->p = (void *)rkm_cassette_formats; break;
158
159      default:               cassette_device_getinfo(devclass, state, info); break;
160   }
161}
162
163/* ROM definition */
164ROM_START( mikrosha )
165   ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF )
166   ROM_LOAD( "mikrosha.rom", 0xf800, 0x0800, CRC(86A83556))
167   ROM_REGION(0x0800, REGION_GFX1,0)
168   ROM_LOAD ("mikrosha.fnt", 0x0000, 0x0800, CRC(B315DA1C))
169ROM_END
170
171SYSTEM_CONFIG_START(mikrosha)
172   CONFIG_DEVICE(mikrosha_cassette_getinfo);
173SYSTEM_CONFIG_END
174
175/* Driver */
176
177/*    YEAR  NAME      PARENT  COMPAT    MACHINE     INPUT       INIT        CONFIG      COMPANY     FULLNAME        FLAGS */
178COMP( 1987, mikrosha, radio86,0,       mikrosha,    mikrosha,   mikrosha,   mikrosha,     "Lianozovo Electromechanical Factory",       "Mikrosha",      0)
src/mess/drivers/apogee.c
r0r2813
1/***************************************************************************
2
3        Apogee BK-01 driver by Miodrag Milanovic
4
5        05/06/2008 Preliminary driver.
6
7****************************************************************************/
8
9
10#include "driver.h"
11#include "cpu/i8085/i8085.h"
12#include "machine/8255ppi.h"
13#include "machine/8257dma.h"
14#include "video/i8275.h"
15#include "devices/cassette.h"
16#include "formats/rk_cas.h"
17#include "includes/apogee.h"
18
19/* Address maps */
20static ADDRESS_MAP_START(apogee_mem, ADDRESS_SPACE_PROGRAM, 8)
21    AM_RANGE( 0x0000, 0x0fff ) AM_RAMBANK(1) // First bank
22    AM_RANGE( 0x1000, 0xebff ) AM_RAM  // RAM
23    //AM_RANGE( 0xec00, 0xecff ) AM_RAM  // Timer
24    AM_RANGE( 0xed00, 0xed03 ) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) AM_MIRROR(0x00fc)
25    //AM_RANGE( 0xee00, 0xee03 ) AM_DEVREADWRITE(PPI8255, "ppi8255_2", ppi8255_r, ppi8255_w) AM_MIRROR(0x00fc)
26    AM_RANGE( 0xef00, 0xef01 ) AM_DEVREADWRITE(I8275, "i8275", i8275_r, i8275_w) AM_MIRROR(0x00fe) // video
27    AM_RANGE( 0xf000, 0xf0ff ) AM_WRITE(dma8257_0_w)    // DMA
28    AM_RANGE( 0xf000, 0xffff ) AM_ROM  // System ROM
29ADDRESS_MAP_END
30
31/* Input ports */
32INPUT_PORTS_START( apogee )
33   PORT_START_TAG("LINE0")
34      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Home") PORT_CODE(KEYCODE_HOME)
35      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PgUp") PORT_CODE(KEYCODE_PGUP)
36      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Del") PORT_CODE(KEYCODE_DEL)
37      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("?") PORT_CODE(KEYCODE_5_PAD)
38      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("End") PORT_CODE(KEYCODE_END)
39      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ins") PORT_CODE(KEYCODE_INSERT)
40      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PgDn") PORT_CODE(KEYCODE_PGDN)
41      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
42   PORT_START_TAG("LINE1")
43      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB)
44      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC)
45      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER)
46      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Back") PORT_CODE(KEYCODE_BACKSPACE)
47      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT)
48      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP)
49      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT)
50      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN)
51   PORT_START_TAG("LINE2")
52      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0)
53      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1)
54      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2)
55      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3)
56      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4)
57      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5)
58      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6)
59      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7)
60   PORT_START_TAG("LINE3")
61      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8)
62      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9)
63      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(":") PORT_CODE(KEYCODE_EQUALS)
64      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("+") PORT_CODE(KEYCODE_COLON)
65      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("<") PORT_CODE(KEYCODE_COMMA)
66      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS)
67      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(">") PORT_CODE(KEYCODE_STOP)
68      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("?") PORT_CODE(KEYCODE_SLASH)
69   PORT_START_TAG("LINE4")
70      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("~") PORT_CODE(KEYCODE_TILDE)
71      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A)
72      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B)
73      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C)
74      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D)
75      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E)
76      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F)
77      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G)
78   PORT_START_TAG("LINE5")
79      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H)
80      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I)
81      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J)
82      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K)
83      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L)
84      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M)
85      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N)
86      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O)
87   PORT_START_TAG("LINE6")
88      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P)
89      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q)
90      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R)
91      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S)
92      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T)
93      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U)
94      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V)
95      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W)
96   PORT_START_TAG("LINE7")
97      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X)
98      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y)
99      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z)
100      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE)
101      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\") PORT_CODE(KEYCODE_BACKSLASH)
102      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE)
103      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("'") PORT_CODE(KEYCODE_QUOTE)
104      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE)
105   PORT_START_TAG("LINE8")
106      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
107      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
108      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
109      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
110      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
111      PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT)
112      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL)
113      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Rus/Lat") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT)
114INPUT_PORTS_END
115
116/* Machine driver */
117static MACHINE_DRIVER_START( apogee )
118    /* basic machine hardware */
119    MDRV_CPU_ADD(8080, XTAL_16MHz / 9)
120    MDRV_CPU_PROGRAM_MAP(apogee_mem, 0)
121    MDRV_MACHINE_RESET( apogee )
122
123   MDRV_DEVICE_ADD( "ppi8255_1", PPI8255 )
124   MDRV_DEVICE_CONFIG( apogee_ppi8255_interface_1 )
125
126   //MDRV_DEVICE_ADD( "ppi8255_2", PPI8255 )
127   //MDRV_DEVICE_CONFIG( apogee_ppi8255_interface_2 )
128
129   MDRV_DEVICE_ADD( "i8275", I8275 )
130   MDRV_DEVICE_CONFIG(apogee_i8275_interface)
131    /* video hardware */
132   MDRV_SCREEN_ADD("main", RASTER)
133   MDRV_SCREEN_REFRESH_RATE(50)
134   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
135   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
136   MDRV_SCREEN_SIZE(78*6, 30*10)
137   MDRV_SCREEN_VISIBLE_AREA(0, 78*6-1, 0, 30*10-1)
138   MDRV_PALETTE_LENGTH(3)
139   MDRV_PALETTE_INIT(apogee)
140
141   MDRV_VIDEO_START(generic_bitmapped)
142   MDRV_VIDEO_UPDATE(apogee)
143
144   MDRV_SPEAKER_STANDARD_MONO("mono")
145   MDRV_SOUND_ADD(WAVE, 0)
146   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
147MACHINE_DRIVER_END
148
149static void apogee_cassette_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info)
150{
151   /* cassette */
152   switch(state)
153   {
154      /* --- the following bits of info are returned as 64-bit signed integers --- */
155      case MESS_DEVINFO_INT_COUNT:            info->i = 1; break;
156      case MESS_DEVINFO_INT_CASSETTE_DEFAULT_STATE:   info->i = CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED; break;
157      case MESS_DEVINFO_PTR_CASSETTE_FORMATS:      info->p = (void *)rka_cassette_formats; break;
158
159      default:               cassette_device_getinfo(devclass, state, info); break;
160   }
161}
162
163/* ROM definition */
164ROM_START( apogee )
165   ROM_REGION( 0x10000, REGION_CPU1, ROMREGION_ERASEFF )
166   ROM_LOAD( "apogee.rom", 0xf000, 0x1000, CRC(a47383a7))
167   ROM_REGION(0x0800, REGION_GFX1,0)
168   ROM_LOAD ("apogee.fnt", 0x0000, 0x0800, CRC(fe5867f0))
169ROM_END
170
171SYSTEM_CONFIG_START(apogee)
172   CONFIG_DEVICE(apogee_cassette_getinfo);
173SYSTEM_CONFIG_END
174
175/* Driver */
176
177/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT   INIT    CONFIG COMPANY   FULLNAME       FLAGS */
178COMP( 1989, apogee, radio86,0,        apogee,    apogee,apogee, apogee,  "Zavod BRA",    "Apogee BK-01",   0)
docs/messnew.txt
r2812r2813
22
33New System Drivers Supported (in no particular order):
44------------------------------------------------------
5- OSCOM Nano [Curt Coder, HobbyLabs]
5- Apogee BK-01 [Miodrag Milanovic]
66- Galaksija Plus [Miodrag Milanovic]
77- Grundy NewBrain A/AD/MD (not working) [Curt Coder]
8- Mikrosha [Miodrag Milanovic]
9- OSCOM Nano  [Curt Coder, HobbyLabs]
810- Radio-86RK [Miodrag Milanovic]
911
1012System Driver Changes:

Previous 15994 Revisions Next


© 1998-2018 The MESS Team