Skip to content

Commit 252172e

Browse files
author
iss
committed
new: option to disable menu color scheme
1 parent dadb263 commit 252172e

11 files changed

+317
-12
lines changed

ChangeLog.txt

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Oricutron ChangeLog
33

44
pre-release changes (work in progress)
55
--------------------------------------
6+
* Added option to disable menu color scheme
67
* Updated BD500 support
78
* Fixed crash with visual keyboard on/off
89
* Added Byte Drive BD-500 support

gui.c

+6-4
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ struct osdmenuitem hwopitems[] = { { " Oric-1", "1", SDLK_1,
283283
{ " Lightpen", NULL, 0, togglelightpen, 0, 0 },
284284
{ " Serial none ", NULL, 0, toggleaciabackend, 0, 0 },
285285
{ " CH376 (Telestrat) ", NULL, 0, togglech376, 0, 0 },
286-
{ " Twilighte board ", NULL, 0, toggletwilighte, 0, 0 },
286+
{ " Twilighte board ", NULL, 0, toggletwilighte, 0, 0 },
287287
// { " Mouse", NULL, 0, NULL, 0, 0 },
288288
{ OSDMENUBAR, NULL, 0, NULL, 0, 0 },
289289
{ "Back", "\x17", SDLK_BACKSPACE,gotomenu, 0, 0 },
@@ -1541,16 +1541,16 @@ void toggletwilighte(struct machine *oric, struct osdmenuitem *mitem, int dummy)
15411541
oric->twilighteboard_activated = SDL_TRUE;
15421542
mitem->name = "\x0e""Twilighte board";
15431543
oric->twilighte = twilighte_oric_init();
1544-
if (oric->twilighte == NULL)
1544+
if (oric->twilighte == NULL)
15451545
{
15461546
oric->twilighteboard_activated = SDL_FALSE; // Impossible to create struct, we did not activate twilighteboard
15471547
}
15481548
else
15491549
{
15501550
oric->ch376_activated = SDL_TRUE;
15511551
}
1552-
1553-
1552+
1553+
15541554
}
15551555

15561556
// Toggle symbols autoload
@@ -2374,6 +2374,8 @@ void setmenutoggles( struct machine *oric )
23742374
else
23752375
find_item_by_function(keopitems, togglestickykeys)->name = " Sticky mod keys";
23762376

2377+
g_menu_scheme = oric->disable_menuscheme? 5 : oric->type;
2378+
23772379
find_item_by_function(hwopitems, togglech376)->name = oric->ch376_activated ? "\x0e""CH376 (Telestrat)" : " CH376 (Telestrat) ";
23782380
find_item_by_function(hwopitems, toggletwilighte)->name = oric->twilighteboard_activated ? "\x0e""Twilighte board" : " Twilighte board";
23792381
}

machine.c

+4-5
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ extern char diskpath[], diskfile[], filetmp[];
6262
extern char telediskpath[], telediskfile[];
6363
extern char pravdiskpath[], pravdiskfile[];
6464
extern SDL_bool refreshstatus, refreshavi;
65-
extern int g_menu_scheme; // #InfoBadDesign - init g_menu_scheme should be done elsewhere - machine.c should not depend on gui - but this is the only place I know
6665

6766
char atmosromfile[1024];
6867
char oric1romfile[1024];
@@ -319,8 +318,8 @@ void atmoswrite( struct m6502 *cpu, unsigned short addr, unsigned char data )
319318
if (oric->twilighteboard_activated && addr >= 0xc000 )
320319
twilighteboard_oric_ROM_RAM_write(oric->twilighte,addr-0xc000,data);
321320
else
322-
if( ( !oric->romdis ) && ( addr >= 0xc000 ) ) return; // Can't write to ROM!
323-
321+
if( ( !oric->romdis ) && ( addr >= 0xc000 ) ) return; // Can't write to ROM!
322+
324323
if( ( addr & 0xff00 ) == 0x0300 )
325324
{
326325
if( oric->aciabackend && ( oric->aciaoffset <= addr && addr < oric->aciaoffset+4 ) )
@@ -1192,6 +1191,8 @@ void preinit_machine( struct machine *oric )
11921191
oric->define_mapping = SDL_FALSE;
11931192
oric->sticky_mod_keys = SDL_FALSE;
11941193

1194+
oric->disable_menuscheme = SDL_FALSE;
1195+
11951196
oric->pravdiskautoboot = SDL_TRUE;
11961197
}
11971198

@@ -1810,8 +1811,6 @@ SDL_bool init_machine( struct machine *oric, int type, SDL_bool nukebreakpoints
18101811

18111812
clear_patches( oric );
18121813

1813-
g_menu_scheme = type;
1814-
18151814
switch( type )
18161815
{
18171816
case MACH_ORIC1_16K:

machine.h

+2
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ struct machine
260260
SDL_bool define_mapping;
261261
SDL_bool sticky_mod_keys;
262262

263+
SDL_bool disable_menuscheme;
264+
263265
int aciaoffset;
264266
int aciabackend;
265267
int aciabackendcfg;

main.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@ static void load_config( struct start_opts *sto, struct machine *oric )
528528
if( read_config_bool( &sto->lctmp[i], "ch376", &oric->ch376_activated) ) continue;
529529
if( read_config_bool( &sto->lctmp[i], "twilighte_board",&oric->twilighteboard_activated) ) continue;
530530
if( read_config_bool( &sto->lctmp[i], "pravdiskautoboot", &oric->pravdiskautoboot ) ) continue;
531+
if( read_config_bool( &sto->lctmp[i], "disable_menuscheme", &oric->disable_menuscheme ) ) continue;
531532
if( read_config_bool( &sto->lctmp[i], "show_keyboard", &oric->show_keyboard ) ) continue;
532533
if( read_config_bool( &sto->lctmp[i], "sticky_mod_keys", &oric->sticky_mod_keys ) )continue;
533534
if( read_config_string( &sto->lctmp[i], "autoload_keyboard_mapping", keymap_file, 4096 ) )
@@ -1397,7 +1398,7 @@ void frameloop_normal( struct machine *oric, SDL_bool *framedone, SDL_bool *need
13971398
}
13981399

13991400
if (!oric->twilighteboard_activated)
1400-
tape_patches( oric );
1401+
tape_patches( oric );
14011402

14021403
via_clock( &oric->via, oric->cpu.icycles );
14031404
ay_ticktock( &oric->ay, oric->cpu.icycles );

oricutron.cfg

+4-1
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,13 @@ kbjoy2_fire2 = 'N'
204204
kbjoy2_fire3 = 'LALT'
205205

206206
; Visual keyboard
207-
show_keyboard = yes
207+
;show_keyboard = yes
208208
;sticky_mod_keys = yes
209209
;autoload_keyboard_mapping = 'keymap/my_keymap.kma'
210210

211+
; Disable menu color scheme
212+
;disable_menuscheme = no
213+
211214
; ch376 chip emulation. This chip can read a usbkey. For more information : http://orix.oric.org
212215
; only available in telestrat mode
213216
ch376 = no

oricutron.desktop

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ Exec=oricutron %U
1010
MimeType=application/x-oric-rom;application/x-oric-tape;application/x-oric-disk
1111
Icon=oricutron
1212
Categories=Emulator;Utility;
13-
Keywords=ORIC,Oric1,Atmos
13+
Keywords=ORIC,Oric1,Atmos,Pravetz-8D

roms/basic11b.sym

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ c4d3 InsDelLine
1010
c4e0 DeleteLine
1111
c524 InsertLine
1212
c55f SetLineLinkPtrs
13+
c444 FreeMemCheck
1314
c592 GetLine
1415
c5e8 ReadKey
1516
c5fa TokeniseLine
@@ -167,6 +168,7 @@ ede0 SetupTimer
167168
ee1a StopTimer
168169
ee22 IRQ
169170
ee8c ResetTimer
171+
ee1a StopTimer
170172
ee9d GetTimer
171173
eeab SetTimer
172174
eec9 Delay
@@ -213,6 +215,7 @@ fb14 KeyClickH
213215
fb1c KeyClickHData
214216
fb2a KeyClickL
215217
fb32 KeyClickLData
218+
fb14 KeyClickH
216219
fb40 SOUND
217220
fbd0 PLAY
218221
fc18 MUSIC

roms/pravetzt-1.0.pch

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
;
2+
; ROM patches file
3+
;
4+
; This file describes how to patch a ROM for things like turbotape,
5+
; and filename decoding.
6+
;
7+
8+
; ****** ROM INFORMATION ******
9+
10+
; This part isn't actual patches, just information about
11+
; the hardware the ROM expects to be present.
12+
13+
; ROM expects a special keyboard layout?
14+
keymap = qwerty
15+
16+
; ****** FILENAME DECODING *******
17+
18+
; When the PC is about to execute this address, we should be at a point
19+
; in CLOAD/CSAVE/STORE/RECALL where the filename is valid in memory.
20+
fd_cload_getname_pc = $e4af
21+
fd_csave_getname_pc = $e7ef
22+
;fd_store_getname_pc =
23+
;fd_recall_getname_pc =
24+
25+
; The address to read the CLOAD filename
26+
fd_getname_addr = $0035
27+
28+
29+
; ****** TURBOTAPE ******
30+
31+
; Address of the "Cassette Sync" function in ROM
32+
tt_getsync_pc = $e696
33+
34+
; Address of the RTS at the end of the cassette sync function (so we can
35+
; skip the function)
36+
tt_getsync_end_pc = $e6b9
37+
38+
; If turbotape is enabled, but no tape is inserted, the cassette sync
39+
; function will be executed normally. Here we have an address inside the
40+
; loop that waits for the cassette sync signal, so that we can break out
41+
; of it if a tape is inserted.
42+
tt_getsync_loop_pc = $e681
43+
44+
; Address of the "Read Byte" function in ROM
45+
tt_readbyte_pc = $e630
46+
47+
; Address of the RTS at the end of the read byte function
48+
tt_readbyte_end_pc = $e65b
49+
50+
; Set carry at end of readbyte routine?
51+
tt_readbyte_setcarry = no
52+
53+
; In order to simulate the effects of the read byte routine, you can
54+
; specify an address to write the byte read, and an address to write
55+
; zero to.
56+
tt_readbyte_storebyte_addr = $002f
57+
;tt_readbyte_storezero_addr =
58+
59+
; Address of the "put byte" function in ROM
60+
tt_putbyte_pc = $e5c6
61+
62+
; Address of the RTS at the end of the put byte function
63+
tt_putbyte_end_pc = $e5f2
64+
65+
; Address of the RTS at the end of CSAVE
66+
tt_csave_end_pc = $e7fe
67+
68+
; Address of the RTS at the end of STORE
69+
;tt_store_end_pc =
70+
71+
; Address of the function that writes the tape leader
72+
; (so we can write a shorter one)
73+
tt_writeleader_pc = $e6ba
74+
tt_writeleader_end_pc = $e6c9

0 commit comments

Comments
 (0)