Skip to content

Commit 74fdfa1

Browse files
committed
Merge branch 'dev'
2 parents 57047f1 + 8767906 commit 74fdfa1

File tree

8 files changed

+87
-28
lines changed

8 files changed

+87
-28
lines changed

Core/FileSystems/BootBlockImage.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,9 +1128,9 @@ BootBlockImage::BootBlockImage(const u8 *buf1, const u8 *buf2)
11281128

11291129
if (bbRecord[i].type == BootBlockType::STANDARD && bbRecord[i].image) {
11301130

1131-
// For standard boot blocks, we require a perfect match
1132-
if (std::memcmp(data, bbRecord[i].image, bbRecord[i].size) == 0) {
1133-
1131+
// For standard boot blocks, we require a perfect match (except DOS type and checksum)
1132+
if (std::memcmp(data + 8, bbRecord[i].image + 8, bbRecord[i].size - 8) == 0) {
1133+
11341134
type = bbRecord[i].type;
11351135
name = bbRecord[i].name;
11361136
return;

Core/FileSystems/BootBlockImageTypes.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,15 @@ struct BootBlockIdEnum : Reflection<BootBlockIdEnum, BootBlockId>
7373
}
7474
static const char *help(BootBlockId value)
7575
{
76-
return "";
76+
switch (value) {
77+
78+
case BootBlockId::NONE: return "Empty block";
79+
case BootBlockId::AMIGADOS_13: return "Kickstart 1.3 boot block";
80+
case BootBlockId::AMIGADOS_20: return "Kickstart 2.0 boot block";
81+
case BootBlockId::SCA: return "SCA Virus";
82+
case BootBlockId::BYTE_BANDIT: return "Byte Bandit Virus";
83+
}
84+
return "???";
7785
}
7886
};
7987

Core/FileSystems/MutableFileSystem.cpp

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -339,17 +339,20 @@ MutableFileSystem::killVirus()
339339
assert(storage.getType(0) == FSBlockType::BOOT);
340340
assert(storage.getType(1) == FSBlockType::BOOT);
341341

342-
auto id =
343-
traits.ofs() ? BootBlockId::AMIGADOS_13 :
344-
traits.ffs() ? BootBlockId::AMIGADOS_20 : BootBlockId::NONE;
342+
if (bootBlockType() == BootBlockType::VIRUS) {
345343

346-
if (id != BootBlockId::NONE) {
347-
storage[0].writeBootBlock(id, 0);
348-
storage[1].writeBootBlock(id, 1);
349-
} else {
350-
std::memset(storage[0].data() + 4, 0, traits.bsize - 4);
351-
std::memset(storage[1].data(), 0, traits.bsize);
352-
}
344+
auto id =
345+
traits.ofs() ? BootBlockId::AMIGADOS_13 :
346+
traits.ffs() ? BootBlockId::AMIGADOS_20 : BootBlockId::NONE;
347+
348+
if (id != BootBlockId::NONE) {
349+
storage[0].writeBootBlock(id, 0);
350+
storage[1].writeBootBlock(id, 1);
351+
} else {
352+
std::memset(storage[0].data() + 4, 0, traits.bsize - 4);
353+
std::memset(storage[1].data(), 0, traits.bsize);
354+
}
355+
}
353356
}
354357

355358
void

Core/Misc/RetroShell/Console.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ Console::initCommands(RSCommand &root)
11101110

11111111
.tokens = { "source" },
11121112
.chelp = { "Process a command script" },
1113-
.flags = vAmigaDOS ? rs::disabled : 0,
1113+
.flags = vAmigaDOS ? rs::hidden : 0,
11141114
.args = { { .name = { "path", "Script file" } } },
11151115

11161116
.func = [this] (std::ostream &os, const Arguments &args, const std::vector<isize> &values) {

Core/Misc/RetroShell/NavigatorConsole.cpp

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,55 @@ NavigatorConsole::initCommands(RSCommand &root)
10141014
}
10151015
});
10161016

1017+
root.add({
1018+
1019+
.tokens = { "boot" },
1020+
.ghelp = { "Manage the boot block" },
1021+
});
1022+
1023+
root.add({
1024+
1025+
.tokens = { "boot", "install" },
1026+
.chelp = { "Installs a block block" },
1027+
});
1028+
1029+
for (const auto& [key, value] : BootBlockIdEnum::pairs()) {
1030+
1031+
root.add({
1032+
1033+
.tokens = { "boot", "install", key },
1034+
.chelp = { BootBlockIdEnum::help(BootBlockId(value)) },
1035+
.func = [this] (std::ostream &os, const Arguments &args, const std::vector<isize> &values) {
1036+
1037+
fs.require_formatted();
1038+
fs.makeBootable(BootBlockId(values[0]));
1039+
1040+
}, .payload = { value }
1041+
});
1042+
}
1043+
1044+
root.add({
1045+
1046+
.tokens = { "boot", "scan" },
1047+
.chelp = { "Scan a boot block for viruses" },
1048+
.func = [this] (std::ostream &os, const Arguments &args, const std::vector<isize> &values) {
1049+
1050+
fs.require_formatted();
1051+
os << "Boot block: " << fs.getBootBlockName() << std::endl;
1052+
}
1053+
});
1054+
1055+
root.add({
1056+
1057+
.tokens = { "boot", "kill" },
1058+
.chelp = { "Kills a boot block virus" },
1059+
.func = [this] (std::ostream &os, const Arguments &args, const std::vector<isize> &values) {
1060+
1061+
fs.require_formatted();
1062+
fs.killVirus();
1063+
}
1064+
});
1065+
10171066
root.add({
10181067

10191068
.tokens = { "type" },

Core/config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
static constexpr int VER_MAJOR = 4;
1818
static constexpr int VER_MINOR = 3;
1919
static constexpr int VER_SUBMINOR = 0;
20-
static constexpr int VER_BETA = 1;
20+
static constexpr int VER_BETA = 0;
2121

2222
// Snapshot version number
2323
static constexpr int SNP_MAJOR = 4;
2424
static constexpr int SNP_MINOR = 3;
2525
static constexpr int SNP_SUBMINOR = 0;
26-
static constexpr int SNP_BETA = 1;
26+
static constexpr int SNP_BETA = 0;
2727

2828

2929
//

GUI/XIB files/en.lproj/MyDocument.xib

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@
343343
<popUpButton key="view" tag="10" id="L2b-nG-yBo" userLabel="Port 1">
344344
<rect key="frame" x="0.0" y="14" width="49" height="24"/>
345345
<autoresizingMask key="autoresizingMask"/>
346-
<popUpButtonCell key="cell" type="roundTextured" title="None" bezelStyle="texturedRounded" imagePosition="only" alignment="center" lineBreakMode="truncatingTail" state="on" tag="-1" imageScaling="proportionallyDown" inset="2" autoenablesItems="NO" selectedItem="VD3-Wr-Ufe" id="Oxd-8A-P5o" userLabel="PopupButtonCell">
346+
<popUpButtonCell key="cell" type="roundTextured" title="None" bezelStyle="texturedRounded" image="devNoneTemplate" imagePosition="only" alignment="center" lineBreakMode="truncatingTail" state="on" tag="-1" imageScaling="proportionallyDown" inset="2" autoenablesItems="NO" selectedItem="VD3-Wr-Ufe" id="Oxd-8A-P5o" userLabel="PopupButtonCell">
347347
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
348348
<font key="font" metaFont="message"/>
349349
<menu key="menu" autoenablesItems="NO" id="zHf-yH-YTM">
@@ -378,7 +378,7 @@
378378
<popUpButton key="view" tag="11" id="4MP-rV-xX2" userLabel="Port 2">
379379
<rect key="frame" x="0.0" y="14" width="49" height="24"/>
380380
<autoresizingMask key="autoresizingMask"/>
381-
<popUpButtonCell key="cell" type="roundTextured" title="None" bezelStyle="texturedRounded" imagePosition="only" alignment="center" lineBreakMode="truncatingTail" state="on" tag="-1" imageScaling="proportionallyDown" inset="2" autoenablesItems="NO" selectedItem="xyt-eC-0im" id="skK-6M-sib" userLabel="PopupButtonCell">
381+
<popUpButtonCell key="cell" type="roundTextured" title="None" bezelStyle="texturedRounded" image="devNoneTemplate" imagePosition="only" alignment="center" lineBreakMode="truncatingTail" state="on" tag="-1" imageScaling="proportionallyDown" inset="2" autoenablesItems="NO" selectedItem="xyt-eC-0im" id="skK-6M-sib" userLabel="PopupButtonCell">
382382
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
383383
<font key="font" metaFont="message"/>
384384
<menu key="menu" autoenablesItems="NO" id="L3K-on-eyR">
@@ -480,7 +480,6 @@
480480
<outlet property="controller" destination="-2" id="V0k-GF-uXZ"/>
481481
<outlet property="controlsItem" destination="9Rb-b3-ubi" id="jfC-Vg-VA6"/>
482482
<outlet property="controlsSegCtrl" destination="xdt-LW-MS0" id="sxA-d1-Y55"/>
483-
<outlet property="keyboardButton" destination="Ckl-d3-vFW" id="0sK-fd-hJt"/>
484483
<outlet property="keyboardItem" destination="Ckl-d3-vFW" id="eGJ-Rq-2Sq"/>
485484
<outlet property="preferencesItem" destination="Tmo-Cs-EVn" id="7iv-aV-69p"/>
486485
<outlet property="snapshotSegCtrl" destination="AHD-MB-nXC" id="Gpg-sH-vaL"/>

vAmiga.xcodeproj/project.pbxproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3178,7 +3178,7 @@
31783178
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
31793179
CODE_SIGN_STYLE = Manual;
31803180
COMBINE_HIDPI_IMAGES = YES;
3181-
CURRENT_PROJECT_VERSION = 250711;
3181+
CURRENT_PROJECT_VERSION = 250808;
31823182
DEAD_CODE_STRIPPING = YES;
31833183
DEVELOPMENT_TEAM = "";
31843184
ENABLE_APP_SANDBOX = NO;
@@ -3200,7 +3200,7 @@
32003200
"@executable_path/../Frameworks",
32013201
);
32023202
MACOSX_DEPLOYMENT_TARGET = 13.5;
3203-
MARKETING_VERSION = 4.3b1;
3203+
MARKETING_VERSION = 4.3;
32043204
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 c++20";
32053205
ONLY_ACTIVE_ARCH = NO;
32063206
PRODUCT_BUNDLE_IDENTIFIER = dirkwhoffmann.vAmiga;
@@ -3231,7 +3231,7 @@
32313231
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
32323232
CODE_SIGN_STYLE = Manual;
32333233
COMBINE_HIDPI_IMAGES = YES;
3234-
CURRENT_PROJECT_VERSION = 250711;
3234+
CURRENT_PROJECT_VERSION = 250808;
32353235
DEAD_CODE_STRIPPING = YES;
32363236
DEBUG_INFORMATION_FORMAT = dwarf;
32373237
DEVELOPMENT_TEAM = "";
@@ -3253,7 +3253,7 @@
32533253
);
32543254
LLVM_LTO = YES_THIN;
32553255
MACOSX_DEPLOYMENT_TARGET = 13.5;
3256-
MARKETING_VERSION = 4.3b1;
3256+
MARKETING_VERSION = 4.3;
32573257
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 c++20";
32583258
PRODUCT_BUNDLE_IDENTIFIER = dirkwhoffmann.vAmiga;
32593259
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -3277,7 +3277,7 @@
32773277
CODE_SIGN_IDENTITY = "Apple Development";
32783278
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
32793279
CODE_SIGN_STYLE = Automatic;
3280-
CURRENT_PROJECT_VERSION = 250711;
3280+
CURRENT_PROJECT_VERSION = 250808;
32813281
DEVELOPMENT_TEAM = "";
32823282
ENABLE_HARDENED_RUNTIME = YES;
32833283
GCC_C_LANGUAGE_STANDARD = gnu17;
@@ -3293,7 +3293,7 @@
32933293
);
32943294
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
32953295
MACOSX_DEPLOYMENT_TARGET = 15.1;
3296-
MARKETING_VERSION = 4.3b1;
3296+
MARKETING_VERSION = 4.3;
32973297
PRODUCT_BUNDLE_IDENTIFIER = dirkwhoffmann.vAmiga.QuickLookPlugIn;
32983298
PRODUCT_NAME = "$(TARGET_NAME)";
32993299
SKIP_INSTALL = YES;
@@ -3311,7 +3311,7 @@
33113311
CODE_SIGN_IDENTITY = "Apple Development";
33123312
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
33133313
CODE_SIGN_STYLE = Automatic;
3314-
CURRENT_PROJECT_VERSION = 250711;
3314+
CURRENT_PROJECT_VERSION = 250808;
33153315
DEVELOPMENT_TEAM = "";
33163316
ENABLE_HARDENED_RUNTIME = YES;
33173317
GCC_C_LANGUAGE_STANDARD = gnu17;
@@ -3327,7 +3327,7 @@
33273327
);
33283328
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
33293329
MACOSX_DEPLOYMENT_TARGET = 15.1;
3330-
MARKETING_VERSION = 4.3b1;
3330+
MARKETING_VERSION = 4.3;
33313331
PRODUCT_BUNDLE_IDENTIFIER = dirkwhoffmann.vAmiga.QuickLookPlugIn;
33323332
PRODUCT_NAME = "$(TARGET_NAME)";
33333333
SKIP_INSTALL = YES;

0 commit comments

Comments
 (0)