1
/***********************************************************
2
* UAE - The U*nix Amiga Emulator *
4
* UAE-Ctrl -- Emulator Control from Inside Emulation *
5
* (c) 1996 Tauno Taipaleenmaki <tataipal@raita.oulu.fi> *
9
* Command line version, Should work with any KS version *
11
***********************************************************/
12
#include <clib/exec_protos.h>
17
#include "uae-control.h"
18
#include "uae_pragmas.h"
20
#define MAX_DRV_NAME 20
22
struct UAE_CONFIG config;
24
void print_drive_status(void);
25
void quit_program(int error, char *text);
27
/************************************
29
************************************/
32
int quit = 0,i, correct,number;
35
"US\0","DE\0","SE\0","FR\0","IT\0",
38
/* Read UAE configuration */
39
i = GetUaeConfig( &config );
42
printf(" UAE-Control v0.1\n\n");
43
printf(" 1) Reset\n");
44
printf(" 2) Debug\n");
45
printf(" 3) Exit Emulator\n");
46
printf(" 4) Change framerate (Currently : %ld)\n", config.framerate);
47
printf(" 5) Toggle sound (Currently : %s)\n", config.do_output_sound ? "ON" : "OFF");
48
printf(" 6) Toggle fake joystick (Currently : %s)\n", config.do_fake_joystick ? "ON" : "OFF");
49
printf(" 7) Change language (Currently : %s)\n", langs[config.keyboard]);
50
printf(" 8) Eject a disk\n");
51
printf(" 9) Insert a disk\n");
52
printf("10) Exit UAE-Control\n\n");
54
while( correct == 0 ) {
55
printf(" Command : ");
58
if ((i > 0) && (i < 11))
72
printf(" Enter new framerate (1-20) :");
75
if (SetFrameRate (number))
76
GetUaeConfig(&config);
78
printf(" Illegal value, not changed.\n");
81
if (config.do_output_sound)
85
GetUaeConfig( &config );
88
if (config.do_fake_joystick)
92
GetUaeConfig( &config );
95
printf(" 1 = US, 2 = DE, 3 = SE, 4 = FR, 5 = IT\n");
96
printf(" What will it be : ");
99
if ((number >= 1) && (number <= 5)) {
100
ChangeLanguage( number-1 );
101
GetUaeConfig( &config );
103
printf(" Illegal value, not changed.\n");
107
print_drive_status();
108
printf(" Eject which drive (1-4): ");
110
number = atoi( buf );
111
if ((number >= 1) && (number <=4 )) {
112
EjectDisk( number-1 );
113
GetUaeConfig( &config );
115
printf(" Illegal drive, not changed.\n");
119
print_drive_status();
120
printf(" Enter disk to drive (1-4): ");
122
number = atoi( buf );
123
if ((number >= 1) && (number <= 4)) {
124
printf("Name of diskfile :");
126
InsertDisk( (UBYTE *)&buf, number - 1 );
127
GetUaeConfig( &config );
129
printf(" Illegal drive, not changed.\n");
141
/******************************************
142
* Prints drive status *
143
******************************************/
144
void print_drive_status(void)
146
printf(" DF0 : %s\n", config.disk_in_df0 ? config.df0_name : "EMPTY");
147
printf(" DF1 : %s\n", config.disk_in_df1 ? config.df1_name : "EMPTY");
148
printf(" DF2 : %s\n", config.disk_in_df2 ? config.df2_name : "EMPTY");
149
printf(" DF3 : %s\n", config.disk_in_df3 ? config.df3_name : "EMPTY");
154
/******************************************
155
* Quits the program *
156
******************************************/
157
void quit_program(int error, char *text)
160
printf(" UAE-Control v0.1\n");
161
printf(" (c)1996 Tauno Taipaleenmaki\n\n");
162
printf(" ERROR: %s\n", text);