1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
|
--- old/src/gens/emulator/g_main.h 2004-04-15 16:22:49.000000000 -0400
+++ new/src/gens/emulator/g_main.h 2006-12-30 12:50:37.000000000 -0500
@@ -22,6 +22,7 @@
extern int Intro_Style;
extern int SegaCD_Accurate;
extern int Active;
+extern int Quick_Exit;
extern POINT Window_Pos;
@@ -36,6 +37,8 @@
extern unsigned char Keys[];
extern unsigned char joystate[];
+static int Build_Language_String (void);
+
void SetWindowText(const char *text);
int Set_Render(int Full, int Num, int Force);
--- old/src/gens/emulator/g_main.c 2004-05-18 16:34:00.000000000 -0400
+++ new/src/gens/emulator/g_main.c 2006-12-30 13:13:00.000000000 -0500
@@ -5,6 +5,7 @@
#include <sys/stat.h>
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#include "g_main.h"
#include "timer.h"
#include "gens.h"
@@ -54,6 +55,7 @@
int Intro_Style = 2;
int SegaCD_Accurate = 0;
int Kaillera_Client_Running = 0;
+int Quick_Exit = 0;
static int Gens_Running = 0;
@@ -96,6 +98,11 @@
switch (event.key.keysym.sym)
{
case SDLK_ESCAPE:
+ if (Quick_Exit)
+ {
+ close_gens();
+ }
+
if (Debug)
{
Change_Debug (0);
@@ -427,21 +434,73 @@
break;
case SDL_JOYAXISMOTION:
- if (event.jaxis.axis < 2)
+ if (event.jaxis.axis < 6)
+ {
+ if (event.jaxis.value < -10000)
+ {
+ if (event.jaxis.axis == 0)
+ {
+ joystate[0x100 * event.jaxis.which + 0x3] = 1;
+ joystate[0x100 * event.jaxis.which + 0x4] = 0;
+ }
+ else if (event.jaxis.axis == 1)
+ {
+ joystate[0x100 * event.jaxis.which + 0x1] = 1;
+ joystate[0x100 * event.jaxis.which + 0x2] = 0;
+ }
+ else if (event.jaxis.axis == 2)
+ {
+ joystate[0x100 * event.jaxis.which + 0x7] = 1;
+ joystate[0x100 * event.jaxis.which + 0x8] = 0;
+ }
+ else if (event.jaxis.axis == 3)
+ {
+ joystate[0x100 * event.jaxis.which + 0x5] = 1;
+ joystate[0x100 * event.jaxis.which + 0x6] = 0;
+ }
+ else if (event.jaxis.axis == 4)
+ {
+ joystate[0x100 * event.jaxis.which + 0xB] = 1;
+ joystate[0x100 * event.jaxis.which + 0xC] = 0;
+ }
+ else if (event.jaxis.axis == 5)
+ {
+ joystate[0x100 * event.jaxis.which + 0x9] = 1;
+ joystate[0x100 * event.jaxis.which + 0xA] = 0;
+ }
+ }
+ else if (event.jaxis.value > 10000)
+ {
+ if (event.jaxis.axis == 0)
+ {
+ joystate[0x100 * event.jaxis.which + 0x3] = 0;
+ joystate[0x100 * event.jaxis.which + 0x4] = 1;
+ }
+ else if (event.jaxis.axis == 1)
{
- if (event.jaxis.value < -500)
+ joystate[0x100 * event.jaxis.which + 0x1] = 0;
+ joystate[0x100 * event.jaxis.which + 0x2] = 1;
+ }
+ else if (event.jaxis.axis == 2)
{
- joystate[0x100 * event.jaxis.which +
- ((event.jaxis.axis == 0) ? 0x3 : 0x1)] = 1;
- joystate[0x100 * event.jaxis.which +
- ((event.jaxis.axis == 0) ? 0x4 : 0x2)] = 0;
+ joystate[0x100 * event.jaxis.which + 0x7] = 0;
+ joystate[0x100 * event.jaxis.which + 0x8] = 1;
}
- else if (event.jaxis.value > 500)
+ else if (event.jaxis.axis == 3)
{
- joystate[0x100 * event.jaxis.which +
- ((event.jaxis.axis == 0) ? 0x4 : 0x2)] = 1;
- joystate[0x100 * event.jaxis.which +
- ((event.jaxis.axis == 0) ? 0x3 : 0x1)] = 0;
+ joystate[0x100 * event.jaxis.which + 0x5] = 0;
+ joystate[0x100 * event.jaxis.which + 0x6] = 1;
+ }
+ else if (event.jaxis.axis == 4)
+ {
+ joystate[0x100 * event.jaxis.which + 0xB] = 0;
+ joystate[0x100 * event.jaxis.which + 0xC] = 1;
+ }
+ else if (event.jaxis.axis == 5)
+ {
+ joystate[0x100 * event.jaxis.which + 0x9] = 0;
+ joystate[0x100 * event.jaxis.which + 0xA] = 1;
+ }
}
else
{
@@ -455,7 +514,26 @@
joystate[0x100 * event.jaxis.which + 0x2] = 0;
joystate[0x100 * event.jaxis.which + 0x1] = 0;
}
-
+ else if (event.jaxis.axis == 2)
+ {
+ joystate[0x100 * event.jaxis.which + 0x8] = 0;
+ joystate[0x100 * event.jaxis.which + 0x7] = 0;
+ }
+ else if (event.jaxis.axis == 3)
+ {
+ joystate[0x100 * event.jaxis.which + 0x6] = 0;
+ joystate[0x100 * event.jaxis.which + 0x5] = 0;
+ }
+ else if (event.jaxis.axis == 4)
+ {
+ joystate[0x100 * event.jaxis.which + 0xC] = 0;
+ joystate[0x100 * event.jaxis.which + 0xB] = 0;
+ }
+ else if (event.jaxis.axis == 5)
+ {
+ joystate[0x100 * event.jaxis.which + 0xA] = 0;
+ joystate[0x100 * event.jaxis.which + 0x9] = 0;
+ }
}
}
@@ -679,6 +757,24 @@
sync_gens_ui ();
gtk_widget_show_all (gens_window);
+ //If a rom is passed in on the command line then open it
+ if (strcmp(Rom_Name, "") != 0)
+ {
+ struct stat buf;
+ char Rom_Path[2048];
+ strcpy (Rom_Path, Rom_Dir);
+ strcat (Rom_Path, Rom_Name);
+ if (stat (Rom_Path, &buf) == 0)
+ {
+ printf("Opening %s\n", Rom_Path);
+ Open_Rom(Rom_Path);
+ }
+ else
+ {
+ printf("%s not found\n", Rom_Path);
+ }
+ }
+
while (is_gens_running ())
{
update_SDL_events ();
--- old/src/gens/emulator/parse.h 2004-05-19 15:12:02.000000000 -0400
+++ new/src/gens/emulator/parse.h 2006-12-30 12:40:16.000000000 -0500
@@ -4,8 +4,8 @@
#define MM "--"
#define ENABLE "enable"
#define DISABLE "disable"
-// 1 arg option
+// 1 arg option
#define ROMPATH "rompath"
#define SAVEPATH "savepath"
#define SRAMPATH "srampath"
@@ -38,6 +38,7 @@
#define FS "fs"
#define WINDOW "window"
+#define QUICKEXIT "quickexit"
// enable and disable options
#define STRETCH "stretch"
--- old/src/gens/emulator/parse.c 2004-05-19 15:21:00.000000000 -0400
+++ new/src/gens/emulator/parse.c 2007-01-03 01:29:41.210902112 -0500
@@ -1,6 +1,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <getopt.h>
+#include <string.h>
#include "port.h"
#include "save.h"
#include "cpu_68k.h"
@@ -33,67 +34,71 @@
#include "support.h"
#include "parse.h"
-#define print_usage(option, helpmsg) fprintf(stderr, MM option"\n" helpmsg)
-#define print_usage2(option, helpmsg) fprintf(stderr, MM ENABLE "-" option ", " MM DISABLE "-" option "\n" helpmsg "\n\n")
+#define print_usage(option, helpmsg) fprintf(stderr, MM option"\t" helpmsg"\n")
+#define print_usage2(option, helpmsg) fprintf(stderr, MM "en/disable-" option "\t" helpmsg "\n")
static void _usage()
{
- fprintf (stderr, "Gens for Linux v2.12-rc3\n");
+ fprintf (stderr, "Gens for Linux v2.12-mythgame\n");
fprintf (stderr, "Usage : gens [options] romfile\n");
- print_usage( HELP, "print this help");
+ print_usage( HELP, "\t\tprint this help");
- print_usage( ROMPATH ,"path where your roms are stored");
- print_usage( SAVEPATH ,"path where to save your states file");
- print_usage( SRAMPATH ,"path where to save your states file");
- print_usage( BRAMPATH ,"path where to save your states file");
- print_usage( DUMPPATH ,"path where to save your states file");
- print_usage( DUMPGYMPATH ,"path where to save your states file");
- print_usage( SCRSHTPATH ,"path where to save your states file");
- print_usage( PATPATH ,"path where to save your states file");
- print_usage( IPSPATH ,"path where to save your states file");
- print_usage( GCOFFPATH ,"path where to save your states file");
- print_usage( GENSMANPATH ,"path where to save your states file");
- print_usage( GENBIOS ,"");
- print_usage( USABIOS ,"");
- print_usage( EURBIOS ,"");
- print_usage( JAPBIOS ,"");
- print_usage( _32X68kBIOS ,"");
- print_usage( _32XMBIOS ,"");
- print_usage( _32XSBIOS ,"");
- print_usage( CONTRAST ,"");
- print_usage( BRIGHTNESS ,"");
- print_usage( WINDOWMODE ,"");
- print_usage( FSMODE ,"");
- print_usage( FRAMESKIP ,"");
- print_usage( SOUNDRATE ,"");
- print_usage( MSH2SPEED ,"");
- print_usage( SSH2SPEED ,"");
- print_usage( RAMCARTSIZE,"");
-
- print_usage2( STRETCH,"stretch mode");
- print_usage2( SWBLIT,"software blitting");
- print_usage2( GREYSCALE,"greyscale");
- print_usage2( INVERT,"");
- print_usage2( SPRITELIMIT,"");
- print_usage2( SOUND,"");
- print_usage2( STEREO,"");
- print_usage2( Z80,"");
- print_usage2( YM2612,"");
- print_usage2( PSG,"");
- print_usage2( DAC,"");
- print_usage2( PCM,"");
- print_usage2( PWM,"");
- print_usage2( CDDA,"");
+ print_usage( ROMPATH ,"\tdirectory roms are located in");
+ print_usage( SAVEPATH ,"\tpath to save states file");
+ print_usage( SRAMPATH ,"\tpath to save SRAM (battery backup) files");
+ print_usage( BRAMPATH ,"\tpath to save BRAM (Sega CD battery backup) files");
+ print_usage( DUMPPATH ,"\tpath to save wav sound dumps");
+ print_usage( DUMPGYMPATH ,"\tpath to save GYM sound dumps");
+ print_usage( SCRSHTPATH ,"path to save screen shots");
+ print_usage( PATPATH ,"\tpath for game genie patch files");
+ print_usage( IPSPATH ,"\tpath for patch files");
+ print_usage( GCOFFPATH ,"\tpath to GCOffline (offline version of Genesis Collective)");
+ print_usage( GENSMANPATH ,"path to Gens manual");
+ print_usage( GENBIOS ,"\tpath to the Genesis bios");
+ print_usage( USABIOS ,"\tpath to the USA Sega CD bios");
+ print_usage( EURBIOS ,"\tpath to the European Sega CD bios");
+ print_usage( JAPBIOS ,"\tpath to the Japanese Sega CD bios");
+ print_usage( _32X68kBIOS ,"\tpath to the 32X 68k bios");
+ print_usage( _32XMBIOS ,"\tpath to the 32X Master bios");
+ print_usage( _32XSBIOS ,"\tpath to the 32X Slave bios");
+ print_usage( CONTRAST ,"\tadjust contrast up to (0-200, default 100)");
+ print_usage( BRIGHTNESS ,"\tadjust brightness up to (0-200, default 100)");
+ print_usage( FS ,"\t\trun the emulator full screen (0/1)");
+ print_usage( FSMODE ,"\trendering mode for full screen (1-11)\n\t\t\t 0 - normal\t\t 6 - interpolated scanline\n\t\t\t 1 - double\t\t 7 - interpolated 50%% scanline\n\t\t\t 2 - interpolated\t 8 - interpolated 25%% scanline\n\t\t\t 3 - scanline\t\t 9 - 2xSAI (Kreed)\n\t\t\t 4 - 50%% scanline\t 10 - Scale2x\n\t\t\t 5 - 25%% scanline\t 11 - Hq2x");
+ print_usage( WINDOW ,"\trun the emulator in a window (0/1)");
+ print_usage( WINDOWMODE ,"\trendering mode for window (0-11)\n\t\t\t same options as fs-mode");
+ print_usage( FRAMESKIP ,"\tskip frames at this relative rate, useful on slower cpus (0-8, -1 auto)");
+ print_usage( SOUNDRATE ,"\tthe sound sampling rate (11025, 22050, 44100)");
+ print_usage( MSH2SPEED ,"\tmaster SH2 speed (0-200, default 100)");
+ print_usage( SSH2SPEED ,"\tslave SH2 speed (0-200, default 100)");
+ print_usage( RAMCARTSIZE ,"\tSega CD SRAM size (-1 = none, 0 = 8k, 1 = 16k, 2 = 32k, 3 = 64k)");
+ print_usage( QUICKEXIT ,"\tmake the ESC key exit Gens instead of pause (0/1)");
+ fprintf (stderr, "\n");
+
+ print_usage2( STRETCH,"\tstretch mode");
+ print_usage2( SWBLIT,"\tsoftware blitting");
+ print_usage2( GREYSCALE,"\tdisplay in greyscale mode");
+ print_usage2( INVERT,"\tdisplay colors inverted");
+ print_usage2( SPRITELIMIT,"limit the number of sprites on screen");
+ print_usage2( SOUND,"\tsound is to be enabled");
+ print_usage2( STEREO,"stereo sound is to be enabled");
+ print_usage2( Z80,"\tZ80 sound processor");
+ print_usage2( YM2612,"\tYM2612 sound chip");
+ print_usage2( PSG,"\tPSG 76489 sound chip");
+ print_usage2( DAC,"\tpart of YM2612 chip");
+ print_usage2( PCM,"\tsound chip for Sega CD");
+ print_usage2( PWM,"\t10-channel PWM mixing for 32X");
+ print_usage2( CDDA,"\tCDDA data access mode for Sega CD");
print_usage2( PSGIMPROVED,"");
print_usage2( YMIMPROVED,"");
print_usage2( DACIMPROVED,"");
- print_usage2( PERFECTSYNC,"");
- print_usage2( FASTBLUR,"");
- print_usage2( FPS,"");
- print_usage2( MSG,"");
- print_usage2( LED,"");
- print_usage2( FIXCHKSUM,"");
- print_usage2( AUTOPAUSE,"");
+ print_usage2( PERFECTSYNC,"synch main and sub CPUs for Sega CD");
+ print_usage2( FASTBLUR,"\tmode to simulate output to tv");
+ print_usage2( FPS,"\tFPS display");
+ print_usage2( MSG,"\tGens system messages");
+ print_usage2( LED,"\tSega CD power and access LEDs");
+ print_usage2( FIXCHKSUM,"\ttoggle that may fix red screen checksum errors");
+ print_usage2( AUTOPAUSE,"\tset gens to pause when screen loses focus");
exit (0);
}
@@ -184,6 +189,7 @@
{AUTOPAUSE1, no_argument, 0, 0},
{AUTOPAUSE0, no_argument, 0, 0},
{RAMCARTSIZE, required_argument, 0, 0},
+ {QUICKEXIT, no_argument, 0, 0},
{HELP, no_argument, 0, 0},
{0, 0, 0, 0}
};
@@ -499,6 +505,10 @@
{
BRAM_Ex_Size = strtol (optarg, (char **) NULL, 10);
}
+ else if (!strcmp (long_options[option_index].name, QUICKEXIT))
+ {
+ Quick_Exit = 1;
+ }
else if (!strcmp (long_options[option_index].name, HELP))
{
_usage();
@@ -510,6 +520,12 @@
if (optind < argc)
{
+ //The first non ARGV element is the romfile parameter
+ strcpy (Rom_Name, argv[optind++]);
+ }
+
+ if (optind < argc)
+ {
printf ("non-option ARGV-elements: ");
while (optind < argc)
printf ("%s ", argv[optind++]);
--- old/src/gens/sdllayer/g_sdlinput.h 2004-05-18 16:45:07.000000000 -0400
+++ new/src/gens/sdllayer/g_sdlinput.h 2006-12-30 12:47:40.000000000 -0500
@@ -28,7 +28,7 @@
void open_joystick();
void close_joystick();
-extern SDL_Joystick* joy[2];
+extern SDL_Joystick* joy[6];
#define CHECK_BUTTON(player, ctrl, button) \
if (Check_Key_Pressed(Keys_Def[player].button)) \
--- old/src/gens/sdllayer/g_sdlinput.c 2004-05-18 16:46:01.000000000 -0400
+++ new/src/gens/sdllayer/g_sdlinput.c 2006-12-30 12:43:35.000000000 -0500
@@ -16,7 +16,7 @@
unsigned char Keys[1024];
unsigned char Kaillera_Keys[16];
-unsigned char joystate[0x80 + 0x100 + 0x10 * 3 + 0x4];
+unsigned char joystate[0x530];
struct K_Def Keys_Def[8] = {
{SDLK_RETURN, SDLK_RSHIFT,
@@ -29,7 +29,7 @@
SDLK_y, SDLK_h, SDLK_g, SDLK_j}
};
-SDL_Joystick *joy[2] = { NULL, NULL };
+SDL_Joystick *joy[6] = { NULL, NULL, NULL, NULL, NULL, NULL };
void
End_Input ()
@@ -40,28 +40,32 @@
void
open_joystick ()
{
+ int Cur_Joy = 0;
Nb_Joys = 0;
SDL_JoystickEventState (SDL_ENABLE);
- joy[0] = SDL_JoystickOpen (0);
- if (joy[0])
- Nb_Joys++;
- joy[1] = SDL_JoystickOpen (1);
- if (joy[1])
+
+ while (Cur_Joy < 6)
+ {
+ joy[Cur_Joy] = SDL_JoystickOpen (Cur_Joy);
+ if (joy[Cur_Joy])
Nb_Joys++;
+ Cur_Joy++;
+ }
}
void
close_joystick ()
{
- if (SDL_JoystickOpened (0))
+ int Cur_Joy = 0;
+
+ while (Cur_Joy < 6)
{
- SDL_JoystickClose (joy[0]);
- joy[0] = NULL;
- }
- if (SDL_JoystickOpened (1))
+ if (SDL_JoystickOpened (Cur_Joy))
{
- SDL_JoystickClose (joy[1]);
- joy[1] = NULL;
+ SDL_JoystickClose (joy[Cur_Joy]);
+ joy[Cur_Joy] = NULL;
+ }
+ Cur_Joy++;
}
}
@@ -95,7 +99,7 @@
{
Num_Joy = ((key >> 8) & 0xF);
- if ((Num_Joy < 2) && joy[Num_Joy])
+ if ((Num_Joy < 6) && joy[Num_Joy])
{
if (key & 0x80) // Test POV Joys
{
@@ -146,6 +150,46 @@
if (joystate[0x100 * Num_Joy + 0x4])
return 1;
break;
+
+ case 5:
+ if (joystate[0x100 * Num_Joy + 0x5])
+ return 1;
+ break;
+
+ case 6:
+ if (joystate[0x100 * Num_Joy + 0x6])
+ return 1;
+ break;
+
+ case 7:
+ if (joystate[0x100 * Num_Joy + 0x7])
+ return 1;
+ break;
+
+ case 8:
+ if (joystate[0x100 * Num_Joy + 0x8])
+ return 1;
+ break;
+
+ case 9:
+ if (joystate[0x100 * Num_Joy + 0x9])
+ return 1;
+ break;
+
+ case 10:
+ if (joystate[0x100 * Num_Joy + 0xA])
+ return 1;
+ break;
+
+ case 11:
+ if (joystate[0x100 * Num_Joy + 0xB])
+ return 1;
+ break;
+
+ case 12:
+ if (joystate[0x100 * Num_Joy + 0xC])
+ return 1;
+ break;
}
}
}
@@ -437,11 +481,15 @@
{
GdkEvent *event;
SDL_Event sdl_event;
- SDL_Joystick *js[2];
+ SDL_Joystick *js[6];
SDL_JoystickEventState (SDL_ENABLE);
js[0] = SDL_JoystickOpen (0);
js[1] = SDL_JoystickOpen (1);
+ js[2] = SDL_JoystickOpen (2);
+ js[3] = SDL_JoystickOpen (3);
+ js[4] = SDL_JoystickOpen (4);
+ js[5] = SDL_JoystickOpen (5);
while (gtk_events_pending ())
gtk_main_iteration ();
@@ -453,19 +501,73 @@
switch (sdl_event.type)
{
case SDL_JOYAXISMOTION:
- if (sdl_event.jaxis.value < -500)
+ if (sdl_event.jaxis.value < -10000)
+ {
+ if (sdl_event.jaxis.axis == 0)
+ {
+ return (0x1000 +
+ (0x100 * sdl_event.jaxis.which + 0x3));
+ }
+ else if (sdl_event.jaxis.axis == 1)
+ {
+ return (0x1000 +
+ (0x100 * sdl_event.jaxis.which + 0x1));
+ }
+ else if (sdl_event.jaxis.axis == 2)
{
return (0x1000 +
- (0x100 * sdl_event.jaxis.which +
- ((sdl_event.jaxis.axis == 0) ? 0x3 : 0x1)));
+ (0x100 * sdl_event.jaxis.which + 0x7));
}
- else if (sdl_event.jaxis.value > 500)
+ else if (sdl_event.jaxis.axis == 3)
{
return (0x1000 +
- (0x100 * sdl_event.jaxis.which +
- ((sdl_event.jaxis.axis == 0) ? 0x4 : 0x2)));
+ (0x100 * sdl_event.jaxis.which + 0x5));
}
- else if (sdl_event.jaxis.value == 0)
+ else if (sdl_event.jaxis.axis == 4)
+ {
+ return (0x1000 +
+ (0x100 * sdl_event.jaxis.which + 0xB));
+ }
+ else if (sdl_event.jaxis.axis == 5)
+ {
+ return (0x1000 +
+ (0x100 * sdl_event.jaxis.which + 0x9));
+ }
+ }
+ else if (sdl_event.jaxis.value > 10000)
+ {
+ if (sdl_event.jaxis.axis == 0)
+ {
+ return (0x1000 +
+ (0x100 * sdl_event.jaxis.which + 0x4));
+ }
+ else if (sdl_event.jaxis.axis == 1)
+ {
+ return (0x1000 +
+ (0x100 * sdl_event.jaxis.which + 0x2));
+ }
+ else if (sdl_event.jaxis.axis == 2)
+ {
+ return (0x1000 +
+ (0x100 * sdl_event.jaxis.which + 0x8));
+ }
+ else if (sdl_event.jaxis.axis == 3)
+ {
+ return (0x1000 +
+ (0x100 * sdl_event.jaxis.which + 0x6));
+ }
+ else if (sdl_event.jaxis.axis == 4)
+ {
+ return (0x1000 +
+ (0x100 * sdl_event.jaxis.which + 0xC));
+ }
+ else if (sdl_event.jaxis.axis == 5)
+ {
+ return (0x1000 +
+ (0x100 * sdl_event.jaxis.which + 0xA));
+ }
+ }
+ else
{
return (Get_Key ());
}
--- old/src/gens/util/rom.h 2004-03-14 09:33:06.000000000 -0500
+++ new/src/gens/util/rom.h 2006-12-30 17:30:58.000000000 -0500
@@ -52,7 +52,7 @@
int Detect_Format(char *Name);
int Get_Rom(void);
-
+int Open_Rom(char *Name);
int Pre_Load_Rom(char *Name);
int Load_Rom_CC(char *Name, int Size);
struct Rom *Load_Bios(char *Name);
--- old/src/gens/util/rom.c 2004-05-18 16:33:59.000000000 -0400
+++ new/src/gens/util/rom.c 2007-01-05 13:23:45.596482516 -0500
@@ -99,7 +99,7 @@
void
Update_Rom_Dir (char *Path)
{
- Get_Dir_From_Path (Path, Rom_Dir);
+ sprintf (Rom_Dir, "%s", Path);;
}
@@ -390,11 +390,10 @@
gint res;
char Name[2048];
gchar *filename;
- int sys;
widget =
create_file_chooser_dialog ("Open Rom", GTK_FILE_CHOOSER_ACTION_OPEN);
-// fileselection_set_dir (fd.filesel, Rom_Dir);
+ gtk_file_chooser_set_filename (GTK_FILE_CHOOSER(widget), Rom_Dir);
addRomsFilter (widget);
res = gtk_dialog_run (GTK_DIALOG (widget));
if (res == GTK_RESPONSE_OK)
@@ -407,6 +406,15 @@
g_free (filename);
Free_Rom (Game);
+ return Open_Rom(Name);
+
+}
+
+int
+Open_Rom(char *Name)
+{
+ int sys;
+
sys = Detect_Format (Name);
if (sys < 1)
@@ -458,6 +466,7 @@
break;
}
return -1;
+
}
int
--- old/src/gens/gtkui/glade/interface.c 2004-05-19 15:49:28.000000000 -0400
+++ new/src/gens/gtkui/glade/interface.c 2007-01-03 13:13:28.113596925 -0500
@@ -1825,7 +1825,7 @@
gtk_widget_show (image1);
gtk_box_pack_start (GTK_BOX (hbox1), image1, TRUE, TRUE, 0);
- label1 = gtk_label_new ("Gens for Linux\nversion 2.12-rc3\n\nSega Genesis / Megadrive,\nSega CD / Mega CD,\nSega 32X emulator");
+ label1 = gtk_label_new ("Gens for Linux\nversion 2.12-mythgame\n\nSega Genesis / Megadrive,\nSega CD / Mega CD,\nSega 32X emulator");
gtk_widget_set_name (label1, "label1");
gtk_widget_show (label1);
gtk_box_pack_start (GTK_BOX (hbox1), label1, FALSE, FALSE, 0);
|