Skip to content

Commit c334cdc

Browse files
committed
asic/hw rev is actually pre-A not A.
1 parent 9a791c5 commit c334cdc

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

core/asic.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,15 @@ static void plug_devices(void) {
9090

9191
static asic_rev_t report_reset(asic_rev_t loaded_rev, emu_device_t device, bool* python) {
9292
/* Parse boot code routines to determine version. */
93-
asic_rev_t default_rev = ASIC_REV_A;
93+
asic_rev_t default_rev = ASIC_REV_PRE_A;
9494
boot_ver_t boot_ver;
9595
bool gotVer = bootver_parse(mem.flash.block, &boot_ver);
9696
if (gotVer) {
9797
gui_console_printf("[CEmu] Boot code version: %u.%u.%u.%04u\n",
9898
boot_ver.major, boot_ver.minor, boot_ver.revision, boot_ver.build);
9999

100100
/* Determine the newest ASIC revision that is compatible */
101-
for (int rev = ASIC_REV_A; rev <= ASIC_REV_M; rev++) {
101+
for (int rev = ASIC_REV_PRE_A; rev <= ASIC_REV_M; rev++) {
102102
if (bootver_check_rev(&boot_ver, (asic_rev_t)rev, device)) {
103103
default_rev = rev;
104104
}
@@ -112,7 +112,9 @@ static asic_rev_t report_reset(asic_rev_t loaded_rev, emu_device_t device, bool*
112112
else {
113113
gui_console_err_printf("[CEmu] Could not determine boot code version.\n");
114114
}
115-
gui_console_printf("[CEmu] Default ASIC revision is Rev %c.\n", "AIM"[(int)default_rev - 1]);
115+
116+
const char* revsStr[] = { "pre-A", "rev I", "rev M" };
117+
gui_console_printf("[CEmu] Default ASIC revision is %s.\n", revsStr[(int)default_rev - 1]);
116118

117119
loaded_rev = gui_handle_reset((gotVer ? &boot_ver : NULL), loaded_rev, default_rev, device, python);
118120
return (loaded_rev != ASIC_REV_AUTO) ? loaded_rev : default_rev;

core/asic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ typedef enum {
1818

1919
typedef enum {
2020
ASIC_REV_AUTO = 0, /* Used only with set_asic_revision() */
21-
ASIC_REV_A = 1,
21+
ASIC_REV_PRE_A = 1,
2222
ASIC_REV_I = 2,
2323
ASIC_REV_M = 3
2424
} asic_rev_t;

gui/qt/emuthread.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@ void EmuThread::unblock() {
282282
asic_rev_t EmuThread::handleReset(const boot_ver_t* bootVer, asic_rev_t loadedRev, asic_rev_t defaultRev, emu_device_t device, bool* python) {
283283
// Build a list of supported revisions
284284
QList<int> supportedRevs;
285-
supportedRevs.reserve(ASIC_REV_M - ASIC_REV_A + 1);
286-
for (int rev = ASIC_REV_A; rev <= ASIC_REV_M; rev++) {
285+
supportedRevs.reserve(ASIC_REV_M - ASIC_REV_PRE_A + 1);
286+
for (int rev = ASIC_REV_PRE_A; rev <= ASIC_REV_M; rev++) {
287287
if (bootver_check_rev(bootVer, (asic_rev_t)rev, device)) {
288288
supportedRevs.push_back(rev);
289289
}

gui/qt/mainwindow.ui

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9634,7 +9634,7 @@ QPushButton:pressed {
96349634
<item row="3" column="0">
96359635
<widget class="QLabel" name="label_33">
96369636
<property name="text">
9637-
<string>ASIC revision:</string>
9637+
<string>ASIC/HW revision:</string>
96389638
</property>
96399639
</widget>
96409640
</item>
@@ -9697,7 +9697,7 @@ QPushButton:pressed {
96979697
</item>
96989698
<item>
96999699
<property name="text">
9700-
<string>Rev A</string>
9700+
<string>pre-A</string>
97019701
</property>
97029702
</item>
97039703
<item>

gui/sdl/main.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,15 @@ int main(int argc, char **argv) {
279279
if (strlen(optarg) == 1) {
280280
char rev = toupper(optarg[0]);
281281
if (rev < 'I') {
282-
asic_rev = ASIC_REV_A;
282+
asic_rev = ASIC_REV_PREA;
283283
} else if (rev < 'M') {
284284
asic_rev = ASIC_REV_I;
285285
} else {
286286
asic_rev = ASIC_REV_M;
287287
}
288+
} else if (!strcmp(optarg, "preA") || !strcmp(optarg, "pre-A") ||
289+
!strcmp(optarg, "prea") || !strcmp(optarg, "pre-a")) {
290+
asic_rev = ASIC_REV_PREA;
288291
}
289292
break;
290293

0 commit comments

Comments
 (0)