[prev in list] [next in list] [prev in thread] [next in thread]
List: bochs-dev
Subject: Re: [Bochs-developers] FW: [PATCH] update CD-ROM detection and HDD
From: "Myles Watson" <mylesgw () gmail ! com>
Date: 2007-10-05 19:16:53
Message-ID: 004c01c80784$4a244e70$4c23040a () chimp
[Download RAW message or body]
Sorry about that. Here's the %lx support patch.
I'll send the CD-ROM and HDD handling patch separately.
Myles
> -----Original Message-----
> From: Stanislav Shwartsman
> Subject: FW: FW: [Bochs-developers] [PATCH] update CD-ROM detection and
> HDD handling
>
> Hi. FYI
>
> -----Original Message-----
> From: Volker Ruppert
> Sent: Friday, October 05, 2007 8:10 PM
> To: Stanislav Shwartsman
> Subject: Re: FW: [Bochs-developers] [PATCH] update CD-ROM detection and
> HDD
> handling
>
> Hi Stanislav,
>
> > Volker, could you apply the patch please ?
>
> This patch seems to be incomplete. I got the following error, but I don't
> have
> the time to find out what's missing.
>
> bcc -o rombios.s -C-c -D__i86__ -0 -S _rombios_.c
> _rombios_.c:2110.64: error: ATA_CB_DH_LBA undeclared
> _rombios_.c:2625.34: error: ATA_CMD_REQUEST_SENSE undeclared
> make: *** [rombios16.bin] Fehler 1
>
> I also haven't found the announced support for %lx.
>
> --
> Bye
>
> Volker
["printf.patch" (application/octet-stream)]
--- defines_2.c 2007-10-03 16:21:44.000000000 -0600
+++ printf_fixes_3.c 2007-10-03 16:25:05.000000000 -0600
@@ -1531,6 +1531,20 @@
send(action, val - (nval * 10) + '0');
}
+void put_str(action, s)
+ Bit16u action;
+ Bit8u *s;
+{
+ Bit8u c;
+ if (!s)
+ s = "<NULL>";
+
+ while (c = read_byte(get_CS(), s)) {
+ send(action, c);
+ s++;
+ }
+}
+
//--------------------------------------------------------------------------
// bios_printf()
// A compact variable argument printf function which prints its output via
@@ -1589,9 +1603,20 @@
}
else if (c == 'l') {
s++;
+ c = read_byte(get_CS(), s);
arg_ptr++; /* increment to next arg */
hibyte = read_word(arg_seg, arg_ptr);
- put_luint(action, ((Bit32u) hibyte << 16) | arg, format_width, 0);
+ if (c == 'd' || c == 'u')
+ put_luint(action, ((Bit32u) hibyte << 16) | arg, format_width, 0);
+ else
+ {
+ if (format_width == 0)
+ format_width = 8;
+ for (i=format_width-1; i>=0; i--) {
+ nibble = ((((Bit32u) hibyte <<16) | arg) >> (4 * i)) & 0x000f;
+ send (action, (nibble<=9)? (nibble+'0') : (nibble-10+'A'));
+ }
+ }
}
else if (c == 'd') {
if (arg & 0x8000)
@@ -1600,7 +1625,7 @@
put_int(action, arg, format_width, 0);
}
else if (c == 's') {
- bios_printf(action & (~BIOS_PRINTF_HALT), arg);
+ put_str(action, arg);
}
else if (c == 'c') {
send(action, arg);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
bochs-developers mailing list
bochs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bochs-developers
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic