Special 486 build

cf: https://x.com/RetroTechChris/status/1927145070752403698
This commit is contained in:
Sam Demeulemeester
2025-05-27 21:37:24 +02:00
parent 07d84f4f34
commit 6f47112b8b
4 changed files with 24 additions and 4 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ else
GIT_AVAILABLE = true
endif
CFLAGS = -std=gnu11 -Wall -Wextra -Wshadow -m32 -march=i586 -fpic -fno-builtin \
CFLAGS = -std=gnu11 -Wall -Wextra -Wshadow -m32 -march=i486 -fpic -fno-builtin \
-ffreestanding -fomit-frame-pointer -fno-stack-protector \
-fexcess-precision=standard -DARCH_BITS=32
+1 -1
View File
@@ -36,7 +36,7 @@ void usleep(unsigned int usec)
} while ((get_tsc() - t0) < cycles);
} else {
// This will be highly inaccurate, but should give at least the requested delay.
volatile uint64_t count = (uint64_t)usec * 1000;
volatile uint64_t count = (uint64_t)usec * 10;
while (count > 0) {
count--;
}
+21 -1
View File
@@ -97,6 +97,13 @@ static void determine_cache_size()
break;
}
/* fall through */
case 'U':
// UMC UMC UMC
if (cpuid_info.vendor_id.str[0] == 'U') {
l1_cache = 8;
break;
}
/* fall through */
case 'G':
if (cpuid_info.vendor_id.str[9] == 'N') {
// National Semiconductor
@@ -899,7 +906,17 @@ static void determine_cpu_model(void)
}
}
break;
case 'U':
// UMC UMC UMC
switch (cpuid_info.version.family) {
case 4:
l1_cache = 8;
cpu_model = "UMC Green CPU U5S 486";
break;
default:
break;
}
break;
case 'V':
// Vortex86 SoC
switch (cpuid_info.version.family) {
@@ -933,6 +950,9 @@ static void determine_cpu_model(void)
default:
// Unknown processor - make a guess at the family.
switch (cpuid_info.version.family) {
case 4:
cpu_model = "486-class CPU (unknown)";
break;
case 5:
cpu_model = "586-class CPU (unknown)";
break;
+1 -1
View File
@@ -64,7 +64,7 @@ test_pattern_t test_list[NUM_TEST_PATTERNS] = {
{ true, PAR, 1, 81, 0, "[Block move] "},
{ true, PAR, 1, 48, 0, "[Random number sequence] "},
{ true, PAR, 1, 6, 0, "[Modulo 20, random pattern] "},
{ true, ONE, 6, 240, 0, "[Bit fade test, 2 patterns] "},
{ false, ONE, 6, 240, 0, "[Bit fade test, 2 patterns] "},
};
int ticks_per_pass[NUM_PASS_TYPES];