1
0
mirror of synced 2026-01-12 00:02:46 +00:00

Fixes stability issue and booting from fixed disk. (#35)

* Revert "Some more refactor of the Teensy code."

This reverts commit e03594b514b7d1e41af70f44ef220a1571d88deb.

* Fix issue booting from other fixed disk.
This commit is contained in:
Matthieu Bucchianeri 2025-02-19 21:22:23 -08:00 committed by GitHub
parent fe8385da08
commit 4b9a0874b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 167 additions and 180 deletions

View File

@ -558,7 +558,6 @@ inline void Internal_RAM_Write() {
// --------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------
__attribute__((always_inline))
inline void Mem_Read_Cycle()
{
isa_address = ADDRESS_DATA_GPIO6_UNSCRAMBLE;
@ -654,7 +653,6 @@ inline void Mem_Read_Cycle()
// --------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------
__attribute__((always_inline))
inline void Mem_Write_Cycle()
{
isa_address = ADDRESS_DATA_GPIO6_UNSCRAMBLE;
@ -734,14 +732,11 @@ inline void Mem_Write_Cycle()
// --------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------
__attribute__((always_inline))
inline void IO_Read_Cycle()
{
isa_address = 0xFFFF & ADDRESS_DATA_GPIO6_UNSCRAMBLE;
uint16_t base_address = isa_address&0x0FF8;
switch (base_address) {
case EMS_BASE_IO:
if ((isa_address&0x0FF8)==EMS_BASE_IO) { // Location of 16 KB Expanded Memory page frame pointers
switch (isa_address) {
case EMS_BASE_IO : isa_data_out = ems_frame_pointer[0]; break;
case EMS_BASE_IO+1: isa_data_out = ems_frame_pointer[0] >> 8; break;
@ -759,9 +754,8 @@ inline void IO_Read_Cycle()
while ( (gpio9_int&0xF0) != 0xF0 ) { gpio9_int = GPIO9_DR; } // Wait here until cycle is complete
GPIO8_DR = sd_pin_outputs + MUX_DATA_n_HIGH + CHRDY_OE_n_HIGH + DATA_OE_n_HIGH;
break;
case SD_BASE:
}
else if ((isa_address&0x0FF8)==SD_BASE) { // Location of SD Card registers
switch (isa_address) {
case SD_BASE+0: sd_spi_dataout = 0xff; SD_SPI_Cycle(); isa_data_out = sd_spi_datain; break;
case SD_BASE+1: isa_data_out = SD_CONFIG_BYTE; break;
@ -780,7 +774,6 @@ inline void IO_Read_Cycle()
while ( (gpio9_int&0xF0) != 0xF0 ) { gpio9_int = GPIO9_DR; } // Wait here until cycle is complete
GPIO8_DR = sd_pin_outputs + MUX_DATA_n_HIGH + CHRDY_OE_n_HIGH + DATA_OE_n_HIGH;
break;
}
}
@ -788,14 +781,11 @@ inline void IO_Read_Cycle()
// --------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------
__attribute__((always_inline))
inline void IO_Write_Cycle()
{
isa_address = 0xFFFF & ADDRESS_DATA_GPIO6_UNSCRAMBLE;
uint16_t base_address = isa_address&0x0FF8;
switch (base_address) {
case EMS_BASE_IO:
if ((isa_address&0x0FF8)==EMS_BASE_IO) { // Location of 16 KB Expanded Memory page frame pointers
GPIO7_DR = GPIO7_DATA_OUT_UNSCRAMBLE + MUX_ADDR_n_HIGH + CHRDY_OUT_LOW + trigger_out;
GPIO8_DR = sd_pin_outputs + MUX_DATA_n_LOW + CHRDY_OE_n_HIGH + DATA_OE_n_HIGH;
@ -819,9 +809,8 @@ inline void IO_Write_Cycle()
GPIO7_DR = GPIO7_DATA_OUT_UNSCRAMBLE + MUX_ADDR_n_LOW + CHRDY_OUT_LOW + trigger_out;
GPIO8_DR = sd_pin_outputs + MUX_DATA_n_HIGH + CHRDY_OE_n_HIGH + DATA_OE_n_HIGH;
break;
case SD_BASE:
}
else if ((isa_address&0x0FF8)==SD_BASE) { // Location of SD Card registers
GPIO7_DR = GPIO7_DATA_OUT_UNSCRAMBLE + MUX_ADDR_n_HIGH + CHRDY_OUT_LOW + trigger_out;
GPIO8_DR = sd_pin_outputs + MUX_DATA_n_LOW + CHRDY_OE_n_HIGH + DATA_OE_n_HIGH;
@ -840,6 +829,7 @@ inline void IO_Write_Cycle()
case SD_BASE+7: sd_timeout = 0; sd_requested_timeout = data_in * 10; break;
}
//gpio9_int = GPIO9_DR;
while ( (gpio9_int&0xF0) != 0xF0 ) { // Wait here until cycle is complete
gpio6_int = GPIO6_DR;
gpio9_int = GPIO9_DR;
@ -849,7 +839,6 @@ inline void IO_Write_Cycle()
GPIO7_DR = GPIO7_DATA_OUT_UNSCRAMBLE + MUX_ADDR_n_LOW + CHRDY_OUT_LOW + trigger_out;
GPIO8_DR = sd_pin_outputs + MUX_DATA_n_HIGH + CHRDY_OE_n_HIGH + DATA_OE_n_HIGH;
break;
}
}
@ -860,22 +849,23 @@ inline void IO_Write_Cycle()
// Main loop
//
// -------------------------------------------------
void loop() {
// Give Teensy 4.1 a moment
//
//delay (1000);
void loop()
{
PSRAM_Configure();
while (1) {
gpio6_int = GPIO6_DR;
gpio9_int = GPIO9_DR;
switch (gpio9_int&0x800000F0) {
case 0x000000E0: IO_Read_Cycle(); break; // ~AEN + ~IORD
case 0x000000D0: IO_Write_Cycle(); break; // ~AEN + ~IOWR
case 0x000000B0:
case 0x800000B0: Mem_Read_Cycle(); break; // ~MEMRD
case 0x00000070:
case 0x80000070: Mem_Write_Cycle(); break; // ~MEMWR
}
if ((gpio9_int&0x80000010)==0) IO_Read_Cycle(); // Isolate and check AEN and IO Rd/Wr
else if ((gpio9_int&0x80000020)==0) IO_Write_Cycle();
else if ((gpio9_int&0x00000040)==0) Mem_Read_Cycle();
else if ((gpio9_int&0x00000080)==0) Mem_Write_Cycle();
}
}

View File

@ -1,14 +1,14 @@
#define BOOTROM_ADDR 0xce000
unsigned char BOOTROM[] = {
85, 170, 4, 6, 80, 81, 82, 250, 184, 152, 5, 232, 0, 5, 184, 218,
5, 232, 250, 4, 140, 200, 232, 18, 5, 184, 145, 5, 232, 239, 4, 184,
0, 0, 232, 6, 5, 184, 149, 5, 232, 227, 4, 232, 228, 3, 115, 3,
85, 170, 4, 6, 80, 81, 82, 250, 184, 147, 5, 232, 251, 4, 184, 213,
5, 232, 245, 4, 140, 200, 232, 13, 5, 184, 140, 5, 232, 234, 4, 184,
0, 0, 232, 1, 5, 184, 144, 5, 232, 222, 4, 232, 223, 3, 115, 3,
233, 140, 0, 49, 192, 142, 192, 38, 161, 78, 0, 186, 131, 2, 239, 38,
161, 76, 0, 186, 133, 2, 239, 140, 200, 38, 163, 78, 0, 184, 197, 0,
38, 163, 76, 0, 184, 55, 6, 232, 180, 4, 184, 64, 0, 142, 192, 38,
160, 117, 0, 4, 128, 186, 130, 2, 238, 80, 232, 190, 4, 184, 149, 5,
232, 155, 4, 184, 82, 6, 232, 149, 4, 38, 254, 6, 117, 0, 38, 160,
117, 0, 48, 228, 232, 164, 4, 184, 149, 5, 232, 129, 4, 88, 49, 201,
38, 163, 76, 0, 184, 50, 6, 232, 175, 4, 184, 64, 0, 142, 192, 38,
160, 117, 0, 4, 128, 186, 130, 2, 238, 80, 232, 185, 4, 184, 144, 5,
232, 150, 4, 184, 77, 6, 232, 144, 4, 38, 254, 6, 117, 0, 38, 160,
117, 0, 48, 228, 232, 159, 4, 184, 144, 5, 232, 124, 4, 88, 49, 201,
142, 193, 60, 128, 117, 15, 140, 200, 38, 163, 6, 1, 184, 170, 1, 38,
163, 4, 1, 235, 13, 140, 200, 38, 163, 26, 1, 184, 170, 1, 38, 163,
24, 1, 140, 200, 38, 163, 98, 0, 184, 127, 3, 38, 163, 96, 0, 251,
@ -25,24 +25,24 @@ unsigned char BOOTROM[] = {
206, 1, 97, 2, 37, 3, 144, 1, 144, 1, 144, 1, 64, 3, 100, 3,
144, 1, 144, 1, 86, 3, 100, 3, 144, 1, 144, 1, 100, 3, 100, 3,
144, 1, 144, 1, 100, 3, 102, 3, 144, 1, 144, 1, 144, 1, 100, 3,
80, 184, 109, 6, 232, 119, 3, 88, 80, 136, 224, 48, 228, 232, 139, 3,
184, 149, 5, 232, 104, 3, 88, 233, 201, 1, 0, 4, 255, 0, 0, 255,
80, 184, 104, 6, 232, 114, 3, 88, 80, 136, 224, 48, 228, 232, 134, 3,
184, 144, 5, 232, 99, 3, 88, 233, 201, 1, 0, 4, 255, 0, 0, 255,
255, 0, 200, 0, 0, 0, 0, 0, 63, 0, 6, 189, 64, 0, 142, 197,
48, 228, 38, 134, 38, 116, 0, 132, 228, 116, 1, 249, 7, 195, 132, 192,
117, 3, 233, 158, 1, 80, 48, 228, 137, 198, 83, 232, 227, 1, 137, 197,
1, 240, 137, 222, 131, 211, 0, 232, 10, 2, 91, 88, 115, 3, 233, 134,
117, 3, 233, 158, 1, 80, 48, 228, 137, 198, 83, 232, 222, 1, 137, 197,
1, 240, 137, 222, 131, 211, 0, 232, 5, 2, 91, 88, 115, 3, 233, 134,
1, 30, 83, 81, 82, 87, 80, 137, 193, 48, 237, 140, 200, 142, 216, 137,
223, 186, 129, 2, 176, 0, 238, 81, 137, 232, 137, 243, 177, 81, 232, 213,
223, 186, 129, 2, 176, 0, 238, 81, 137, 232, 137, 243, 177, 81, 232, 208,
2, 114, 60, 186, 135, 2, 176, 10, 238, 186, 128, 2, 236, 60, 254, 116,
10, 186, 135, 2, 236, 132, 192, 117, 38, 235, 238, 185, 0, 1, 86, 190,
0, 8, 252, 243, 165, 173, 94, 131, 197, 1, 131, 214, 0, 89, 226, 199,
186, 129, 2, 176, 1, 238, 88, 95, 90, 89, 91, 31, 233, 44, 1, 186,
129, 2, 176, 1, 238, 89, 88, 40, 200, 95, 90, 89, 91, 31, 233, 14,
1, 132, 192, 117, 3, 233, 11, 1, 80, 48, 228, 137, 198, 83, 232, 80,
1, 137, 197, 1, 240, 137, 222, 131, 211, 0, 232, 119, 1, 91, 88, 115,
1, 132, 192, 117, 3, 233, 11, 1, 80, 48, 228, 137, 198, 83, 232, 75,
1, 137, 197, 1, 240, 137, 222, 131, 211, 0, 232, 114, 1, 91, 88, 115,
3, 233, 243, 0, 30, 83, 81, 82, 87, 80, 137, 193, 48, 237, 137, 223,
140, 192, 142, 216, 140, 200, 142, 192, 186, 129, 2, 176, 0, 238, 81, 137,
232, 137, 243, 177, 88, 232, 62, 2, 114, 102, 186, 128, 2, 176, 254, 238,
232, 137, 243, 177, 88, 232, 57, 2, 114, 102, 186, 128, 2, 176, 254, 238,
185, 0, 1, 86, 137, 254, 191, 0, 8, 252, 243, 165, 137, 247, 94, 186,
135, 2, 176, 25, 238, 186, 128, 2, 236, 60, 255, 117, 10, 186, 135, 2,
236, 132, 192, 117, 59, 235, 238, 36, 31, 60, 5, 117, 51, 186, 135, 2,
@ -51,63 +51,62 @@ unsigned char BOOTROM[] = {
2, 176, 1, 238, 140, 216, 142, 192, 88, 95, 90, 89, 91, 31, 235, 107,
186, 129, 2, 176, 1, 238, 89, 140, 216, 142, 192, 88, 40, 200, 95, 90,
89, 91, 31, 235, 74, 132, 192, 116, 74, 80, 48, 228, 137, 197, 83, 232,
143, 0, 1, 232, 131, 211, 0, 232, 186, 0, 91, 88, 114, 57, 235, 59,
138, 0, 1, 232, 131, 211, 0, 232, 181, 0, 91, 88, 114, 57, 235, 59,
182, 254, 6, 184, 64, 0, 142, 192, 38, 138, 22, 117, 0, 7, 181, 254,
177, 255, 49, 192, 248, 195, 80, 83, 232, 102, 0, 232, 150, 0, 91, 88,
114, 21, 235, 23, 235, 21, 180, 3, 232, 160, 0, 135, 209, 248, 195, 180,
177, 255, 49, 192, 248, 195, 80, 83, 232, 97, 0, 232, 145, 0, 91, 88,
114, 21, 235, 23, 235, 21, 180, 3, 232, 155, 0, 135, 209, 248, 195, 180,
170, 249, 195, 180, 1, 249, 195, 180, 4, 249, 195, 48, 228, 248, 195, 49,
192, 142, 216, 142, 192, 185, 0, 1, 191, 0, 124, 243, 171, 186, 130, 2,
236, 136, 194, 48, 246, 184, 1, 2, 185, 1, 0, 187, 0, 124, 205, 19,
129, 62, 254, 125, 85, 170, 117, 15, 184, 138, 6, 232, 96, 1, 49, 192,
142, 192, 234, 0, 124, 0, 0, 184, 164, 6, 232, 81, 1, 251, 244, 235,
253, 49, 192, 49, 219, 82, 81, 82, 136, 200, 36, 192, 209, 224, 209, 224,
136, 232, 185, 255, 0, 247, 225, 90, 136, 241, 48, 237, 1, 200, 177, 63,
247, 225, 89, 81, 48, 237, 128, 225, 63, 73, 1, 200, 131, 210, 0, 137,
211, 89, 90, 195, 81, 82, 232, 18, 0, 57, 211, 114, 10, 119, 4, 57,
200, 114, 4, 249, 90, 89, 195, 248, 90, 89, 195, 186, 250, 0, 185, 63,
197, 195, 80, 30, 83, 81, 82, 86, 140, 200, 142, 216, 186, 129, 2, 176,
1, 238, 185, 1, 0, 186, 160, 134, 180, 134, 205, 21, 186, 128, 2, 176,
255, 185, 10, 0, 238, 226, 253, 186, 129, 2, 176, 0, 238, 187, 10, 0,
190, 206, 4, 185, 1, 0, 180, 1, 232, 92, 0, 115, 15, 49, 201, 186,
32, 78, 180, 134, 205, 21, 75, 117, 231, 249, 235, 52, 190, 212, 4, 185,
5, 0, 180, 1, 232, 64, 0, 114, 39, 186, 135, 2, 176, 250, 238, 190,
218, 4, 185, 1, 0, 180, 1, 232, 45, 0, 190, 224, 4, 185, 1, 0,
180, 0, 232, 34, 0, 115, 9, 186, 135, 2, 236, 132, 192, 116, 224, 249,
94, 90, 89, 91, 31, 114, 8, 184, 245, 5, 232, 113, 0, 88, 195, 184,
24, 6, 232, 105, 0, 88, 195, 186, 128, 2, 176, 255, 238, 81, 185, 6,
0, 252, 172, 238, 226, 252, 185, 8, 0, 236, 60, 255, 225, 251, 89, 56,
224, 118, 3, 249, 235, 4, 248, 236, 226, 253, 176, 255, 238, 195, 64, 0,
0, 0, 0, 149, 72, 0, 0, 1, 170, 135, 119, 0, 0, 0, 0, 1,
105, 64, 0, 0, 0, 1, 186, 128, 2, 80, 176, 255, 238, 136, 200, 238,
136, 248, 238, 136, 216, 238, 88, 134, 224, 238, 134, 224, 238, 176, 1, 238,
185, 8, 0, 236, 60, 255, 225, 251, 132, 192, 116, 1, 249, 195, 156, 30,
83, 86, 137, 198, 140, 200, 142, 216, 180, 14, 49, 219, 252, 172, 8, 192,
116, 4, 205, 16, 235, 247, 94, 91, 31, 157, 195, 156, 30, 83, 81, 82,
86, 137, 194, 140, 200, 142, 216, 49, 219, 252, 137, 214, 177, 12, 211, 238,
131, 230, 15, 138, 132, 129, 5, 180, 14, 205, 16, 137, 214, 177, 8, 211,
238, 131, 230, 15, 138, 132, 129, 5, 180, 14, 205, 16, 137, 214, 177, 4,
211, 238, 131, 230, 15, 138, 132, 129, 5, 180, 14, 205, 16, 137, 214, 131,
230, 15, 138, 132, 129, 5, 180, 14, 205, 16, 94, 90, 89, 91, 31, 157,
195, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69,
70, 58, 0, 32, 0, 13, 10, 0, 66, 111, 111, 116, 82, 79, 77, 32,
102, 111, 114, 32, 88, 84, 77, 97, 120, 32, 118, 49, 46, 48, 13, 10,
67, 111, 112, 121, 114, 105, 103, 104, 116, 32, 40, 99, 41, 32, 50, 48,
50, 53, 32, 77, 97, 116, 116, 104, 105, 101, 117, 32, 66, 117, 99, 99,
104, 105, 97, 110, 101, 114, 105, 13, 10, 0, 82, 79, 77, 32, 66, 97,
115, 101, 32, 65, 100, 100, 114, 101, 115, 115, 32, 32, 32, 32, 32, 32,
32, 32, 61, 32, 0, 83, 68, 32, 67, 97, 114, 100, 32, 105, 110, 105,
116, 105, 97, 108, 105, 122, 101, 100, 32, 115, 117, 99, 99, 101, 115, 115,
102, 117, 108, 108, 121, 13, 10, 0, 83, 68, 32, 67, 97, 114, 100, 32,
102, 97, 105, 108, 101, 100, 32, 116, 111, 32, 105, 110, 105, 116, 105, 97,
108, 105, 122, 101, 13, 10, 0, 70, 105, 120, 101, 100, 32, 68, 105, 115,
107, 32, 73, 68, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61,
32, 0, 84, 111, 116, 97, 108, 32, 70, 105, 120, 101, 100, 32, 68, 105,
115, 107, 32, 68, 114, 105, 118, 101, 115, 32, 61, 32, 0, 85, 110, 115,
117, 112, 112, 111, 114, 116, 101, 100, 32, 73, 78, 84, 49, 51, 104, 32,
70, 117, 110, 99, 116, 105, 111, 110, 32, 0, 66, 111, 111, 116, 105, 110,
103, 32, 102, 114, 111, 109, 32, 83, 68, 32, 67, 97, 114, 100, 46, 46,
46, 13, 10, 0, 78, 111, 116, 32, 98, 111, 111, 116, 97, 98, 108, 101,
13, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
192, 142, 216, 142, 192, 185, 0, 1, 191, 0, 124, 243, 171, 186, 128, 0,
184, 1, 2, 185, 1, 0, 187, 0, 124, 205, 19, 129, 62, 254, 125, 85,
170, 117, 15, 184, 133, 6, 232, 96, 1, 49, 192, 142, 192, 234, 0, 124,
0, 0, 184, 159, 6, 232, 81, 1, 251, 244, 235, 253, 49, 192, 49, 219,
82, 81, 82, 136, 200, 36, 192, 209, 224, 209, 224, 136, 232, 185, 255, 0,
247, 225, 90, 136, 241, 48, 237, 1, 200, 177, 63, 247, 225, 89, 81, 48,
237, 128, 225, 63, 73, 1, 200, 131, 210, 0, 137, 211, 89, 90, 195, 81,
82, 232, 18, 0, 57, 211, 114, 10, 119, 4, 57, 200, 114, 4, 249, 90,
89, 195, 248, 90, 89, 195, 186, 250, 0, 185, 63, 197, 195, 80, 30, 83,
81, 82, 86, 140, 200, 142, 216, 186, 129, 2, 176, 1, 238, 185, 1, 0,
186, 160, 134, 180, 134, 205, 21, 186, 128, 2, 176, 255, 185, 10, 0, 238,
226, 253, 186, 129, 2, 176, 0, 238, 187, 10, 0, 190, 201, 4, 185, 1,
0, 180, 1, 232, 92, 0, 115, 15, 49, 201, 186, 32, 78, 180, 134, 205,
21, 75, 117, 231, 249, 235, 52, 190, 207, 4, 185, 5, 0, 180, 1, 232,
64, 0, 114, 39, 186, 135, 2, 176, 250, 238, 190, 213, 4, 185, 1, 0,
180, 1, 232, 45, 0, 190, 219, 4, 185, 1, 0, 180, 0, 232, 34, 0,
115, 9, 186, 135, 2, 236, 132, 192, 116, 224, 249, 94, 90, 89, 91, 31,
114, 8, 184, 240, 5, 232, 113, 0, 88, 195, 184, 19, 6, 232, 105, 0,
88, 195, 186, 128, 2, 176, 255, 238, 81, 185, 6, 0, 252, 172, 238, 226,
252, 185, 8, 0, 236, 60, 255, 225, 251, 89, 56, 224, 118, 3, 249, 235,
4, 248, 236, 226, 253, 176, 255, 238, 195, 64, 0, 0, 0, 0, 149, 72,
0, 0, 1, 170, 135, 119, 0, 0, 0, 0, 1, 105, 64, 0, 0, 0,
1, 186, 128, 2, 80, 176, 255, 238, 136, 200, 238, 136, 248, 238, 136, 216,
238, 88, 134, 224, 238, 134, 224, 238, 176, 1, 238, 185, 8, 0, 236, 60,
255, 225, 251, 132, 192, 116, 1, 249, 195, 156, 30, 83, 86, 137, 198, 140,
200, 142, 216, 180, 14, 49, 219, 252, 172, 8, 192, 116, 4, 205, 16, 235,
247, 94, 91, 31, 157, 195, 156, 30, 83, 81, 82, 86, 137, 194, 140, 200,
142, 216, 49, 219, 252, 137, 214, 177, 12, 211, 238, 131, 230, 15, 138, 132,
124, 5, 180, 14, 205, 16, 137, 214, 177, 8, 211, 238, 131, 230, 15, 138,
132, 124, 5, 180, 14, 205, 16, 137, 214, 177, 4, 211, 238, 131, 230, 15,
138, 132, 124, 5, 180, 14, 205, 16, 137, 214, 131, 230, 15, 138, 132, 124,
5, 180, 14, 205, 16, 94, 90, 89, 91, 31, 157, 195, 48, 49, 50, 51,
52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70, 58, 0, 32, 0,
13, 10, 0, 66, 111, 111, 116, 82, 79, 77, 32, 102, 111, 114, 32, 88,
84, 77, 97, 120, 32, 118, 49, 46, 48, 13, 10, 67, 111, 112, 121, 114,
105, 103, 104, 116, 32, 40, 99, 41, 32, 50, 48, 50, 53, 32, 77, 97,
116, 116, 104, 105, 101, 117, 32, 66, 117, 99, 99, 104, 105, 97, 110, 101,
114, 105, 13, 10, 0, 82, 79, 77, 32, 66, 97, 115, 101, 32, 65, 100,
100, 114, 101, 115, 115, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 0,
83, 68, 32, 67, 97, 114, 100, 32, 105, 110, 105, 116, 105, 97, 108, 105,
122, 101, 100, 32, 115, 117, 99, 99, 101, 115, 115, 102, 117, 108, 108, 121,
13, 10, 0, 83, 68, 32, 67, 97, 114, 100, 32, 102, 97, 105, 108, 101,
100, 32, 116, 111, 32, 105, 110, 105, 116, 105, 97, 108, 105, 122, 101, 13,
10, 0, 70, 105, 120, 101, 100, 32, 68, 105, 115, 107, 32, 73, 68, 32,
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 61, 32, 0, 84, 111, 116,
97, 108, 32, 70, 105, 120, 101, 100, 32, 68, 105, 115, 107, 32, 68, 114,
105, 118, 101, 115, 32, 61, 32, 0, 85, 110, 115, 117, 112, 112, 111, 114,
116, 101, 100, 32, 73, 78, 84, 49, 51, 104, 32, 70, 117, 110, 99, 116,
105, 111, 110, 32, 0, 66, 111, 111, 116, 105, 110, 103, 32, 102, 114, 111,
109, 32, 83, 68, 32, 67, 97, 114, 100, 46, 46, 46, 13, 10, 0, 78,
111, 116, 32, 98, 111, 111, 116, 97, 98, 108, 101, 13, 10, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@ -127,4 +126,5 @@ unsigned char BOOTROM[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 189};
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19};

View File

@ -937,10 +937,7 @@ int18h_entry:
mov di, 0x7c00
rep stosw
.read_boot_sector:
mov dx, REG_SCRATCH_0
in al, dx
mov dl, al
xor dh, dh
mov dx, 0x80 ; MBR can only boot from 1st fixed disk
mov ax, 0x201 ; read 1 sector
mov cx, 1 ; sector 1
mov bx, 0x7c00