Subversion Repositories Shiroi

Rev

Rev 10 | Rev 13 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10 Rev 12
Line 1... Line 1...
1
/* $Id: shiroi.c 10 2024-08-29 01:39:27Z nishi $ */
1
/* $Id: shiroi.c 12 2024-08-29 04:19:08Z nishi $ */
2
 
2
 
3
#include "io.h"
3
#include "io.h"
-
 
4
 
4
#include "math.h"
5
#include "math.h"
5
#include "sound.h"
6
#include "sound.h"
6
#include "video.h"
7
#include "video.h"
7
#include "text.h"
8
#include "text.h"
-
 
9
#include "debug.h"
-
 
10
 
8
#include "char.h"
11
#include "char.h"
9
 
12
 
10
void init_cards(void);
13
void init_cards(void);
11
void basic(void);
14
void basic(void);
12
 
15
 
Line 16... Line 19...
16
extern short vdg_data;
19
extern short vdg_data;
17
 
20
 
18
extern short psg_addr;
21
extern short psg_addr;
19
extern short psg_data;
22
extern short psg_data;
20
 
23
 
-
 
24
extern short debug_addr;
-
 
25
extern short debug_data;
-
 
26
 
21
extern short fpu_stack;
27
extern short fpu_stack;
22
extern short fpu_command;
28
extern short fpu_command;
23
 
29
 
24
extern short text_kbd_data;
30
extern short text_kbd_data;
25
 
31
 
Line 86... Line 92...
86
	}
92
	}
87
 
93
 
88
	vdp_addr = -1;
94
	vdp_addr = -1;
89
	vdg_addr = -1;
95
	vdg_addr = -1;
90
	psg_addr = -1;
96
	psg_addr = -1;
-
 
97
	debug_addr = -1;
91
	fpu_stack = -1;
98
	fpu_stack = -1;
92
	text_kbd_data = -1;
99
	text_kbd_data = -1;
93
 
100
 
94
	init_cards();
101
	init_cards();
95
 
102
 
Line 98... Line 105...
98
#else
105
#else
99
	if(vdp_addr == -1 && vdg_addr == -1){
106
	if(vdp_addr == -1 && vdg_addr == -1){
100
#endif
107
#endif
101
		int i;
108
		int i;
102
		for(i = 0; i < 3; i++){
109
		for(i = 0; i < 3; i++){
103
			_beep(3L * 1024);
110
			_beep(1L * 1024 / 2);
104
			unsigned long j;
111
			unsigned long j;
105
			for(j = 0; j < 3L * 1024; j++);
112
			for(j = 0; j < 1L * 1024 / 2; j++);
106
		}
113
		}
107
		while(1);
114
		while(1);
108
	}
115
	}
109
 
116
 
110
	video_init();
117
	video_init();
Line 203... Line 210...
203
	if(wait == 2){
210
	if(wait == 2){
204
		wait = 0;
211
		wait = 0;
205
		move++;
212
		move++;
206
		if(move == 15) move = 0;
213
		if(move == 15) move = 0;
207
	}
214
	}
208
	for(i = 0; i < 3 * 1024; i++);
215
	for(i = 0; i < 3 * 1024 / 16; i++);
209
 
216
 
210
skip:
217
skip:
211
	if((k = inp(text_kbd_data)) == 0) goto move_bar;
218
	if((k = inp(text_kbd_data)) == 0) goto move_bar;
212
	while(inp(text_kbd_data) != 0);
219
	while(inp(text_kbd_data) != 0);
213
 
220
 
Line 227... Line 234...
227
		if(t != 0){
234
		if(t != 0){
228
			video_card(t, port);
235
			video_card(t, port);
229
			sound_card(t, port);
236
			sound_card(t, port);
230
			math_card(t, port);
237
			math_card(t, port);
231
			text_card(t, port);
238
			text_card(t, port);
-
 
239
			debug_card(t, port);
232
		}
240
		}
233
		port += 3;
241
		port += 3;
234
	}
242
	}
235
}
243
}