I-Appliance BBS
The Official Source for Internet Appliance Upgrades and Mods
Amazon Honor System Click Here to Pay Learn More
BBS Main List | Sign In | Sign Up | Search | Help | Linux-Hacker.netReply to Thread | Printer |

Home / I-Opener Areas / I-Opener Technical Stuff
Boot Logo Question..... With a Difference!
Boot Logo Question..... With a Difference!

New MessageBoot Logo Question..... With a Difference! (modified 0 times) wiggles
Profile
OK so we all know that the I-Opener's stock boot logo is annoying. There have been a lot of threads discussing how to dump the BIOS, how to remove the boot logo, and how to exchange it with a prettier logo. These are all solved problems.

However, something shrapnel said attracted my attention, and I quote:

"The Award BIOS used here is very modular. It can accept things like standard VGA drivers, SCSI drivers, even some network driver support. The boot logo is a module as well."

Now here is something I would like to see. I would like an animated boot logo like you see on the Nintendo 64, the PSX and the Dreamcast. I am wondering if such an animation can be put into an appropriate format and stuffed into the BIOS.

Of course one way to cheat is as follows: Stuff a completely black bitmap into the BIOS, so when the machine boots up you see nothing. (Dark backlit screen) Then you play your animation using an appropriate player program first thing in AUTOEXEC.BAT. (I am assuming DOS or Windows here.) Then you can have a nice startup animation with sound, but you first have 5-15 seconds of initial darkness as the machine self-checks. I am wondering if the animation can be incorporated into the BIOS to begin with, so as to avoid this awkward pause.

Any suggestions, or brainstorming, is welcome. I have never seen something like this done before anywhere (on Intel hardware that is) and I am not even sure that it is possible. But that has never stopped me before.

- wig

02-26-2001 03:10:53

New MessageRE:Boot Logo Question..... With a Difference! (modified 0 times) Programmer
Profile
You would need to rewrite a chuck of the bios..

1) trace through the bios til after it has set up the chipset and begins the bitmap load

2) remove that chunk of code

3) insert code that displays an anim-GIF (or other animated format)

4) replace Bitmap location with anim-GIF

5) off you go..

02-26-2001 07:38:06

New MessageRE:Boot Logo Question..... With a Difference! (modified 0 times) wiggles
Profile
OK programmer, meet me halfway here. I haven't done any hands-on BIOS hacking before (in fact, very little experience overall in assembly programming) but I learn quickly.

Now let's make some assumptions to simplify the problem. Let's assume that we have a standalone exe that displays the animation. Let's assume that no parameters or external files or libraries are required. You run the exe, you see the animation.

Now how would one go about embedding this exe inside a BIOS? Which programs would you recommend for doing something like this?

02-26-2001 22:08:03

New MessageRE:Boot Logo Question..... With a Difference! (modified 0 times) Programmer
Profile
You'll need to extract the executable from the bios modbin when run will create a 128KB original.tmp file. make a copy of this file.

figure out the start point of the code (Wild_pencil should know..)

use a debugger and jump to that location.

step through til you find the routine that copys the bitmap to the frame buffer

...........


I just realized why they use a static image.. there's no hardware support for cycling it.. at best it would run through the animation a predefined number of times then return to its normal operation.. presumably leaving the last frame in place on the frame buffer.. doing any more than this would require setting up some way to ensure the animation loop gets enough of a time slice..

02-27-2001 08:28:30

New MessageRE:Boot Logo Question..... With a Difference! (modified 0 times) Wild_Pencil
Profile | Email
Whoo.. this one isn't gonna be easy, wiggles.. It's possible, though. Here's a crash course on adding an external ROM to the Award BIOS.

First, I'd suggest writing the GIF animator as a .COM file. When you've got it working as a .COM file, you'll need to add a little more to transform it into a ROM. Basically, an "ORG 0", followed by "db 55h" and "db AAh" ("55AA" is a standard header for a ROM), and "db ##h". ## is your ROM filesize divided by 512.

To complete the ROM, add some padding -- up to the next 512-byte barrier. The very last byte in your ROM file is a checksum.

To add the ROM into the Award BIOS, use CBROM with the /isa option:
CBROM MYBIOS.BIN /isa MYROM.ROM CC00:0

That will insert your ROM into the Award BIOS, and it will instruct Award BIOS to decompress your ROM to memory location CC00:0. (This is the location I used for the Boot-CD ROM). CBROM will give you an error-message if there's anything wrong with your ROM file's format.

To test your ROM, go to a DOS prompt and run debug.exe, and issue the following commands:
A
JMP FAR CC00:0000
P

That should pass control to your Animated-GIF displaying ROM.. and (hopefully) return control to you after the animation is complete.

Now, two harder problems remain.. how to animate in the background... and how to hook into your ROM from the BIOS Startup routine...

You might be able to do background animations by temporarily hooking the Timer Interrupt. I'd suggest waiting until after the BIOS initializes the chipset and PICs before hooking the interrupt. Your interrupt handler will be called 18 times per second (if I remember correctly).

Where to hook this in the BIOS startup routine.. blecch.. I'd suggest looking in ORIGINAL.TMP for all occurrences of "CD 10", which is a call to the Video Interrupt. One of them should be the one that sets the video mode for displaying the Award Bitmap. At that point, I'd try to find somewhere where I can clobber 5 or more bytes so I can make the call to the ROM code: CALL FAR CC00:0000 (which is E9 00 00 00 CC)

Make no mistake, hacking ORIGINAL.TMP is a little difficult. There's a program called AWDHACK which supposedly works. Personally, I never managed to get AWDHACK to actually _save_ my changes to ORIGINAL.TMP -- so instead, I ran a debugger on MODBIN.EXE, and changed ORIGINAL.TMP's contents in-memory. Once the changes were made, I saved the BIOS in MODBIN.

Ralf Brown's Interrupt List will be a very good reference for you on this project.

-WP

02-27-2001 15:24:54

New MessageRE:Boot Logo Question..... With a Difference! (modified 0 times) Wild_Pencil
Profile | Email
... forgot to add...

Award BIOS will do a memory-scan for segments that start with "55 AA". When found, Award BIOS will attempt to call into those memory regions, since it assumes (correctly) that there is an OEM ROM located at that location. This is the same mechanism that the System BIOS uses to call OEM ROMs for SCSI cards and NICs that have their own BIOS on the card.

Anyways.. because of this, your code should be prepared to be called twice -- once from your hack, and once from Award BIOS.

Um. Yeah.. just realized the far call you want to issue isn't to CC00:0000 it should be to CC00:0003 (forgot to compensate for the ROM header)

ah well. Anyways.. Programmer will correct any mistakes or omissions I've made..

-WP

02-27-2001 15:43:16

New MessageRE:Boot Logo Question..... With a Difference! (modified 0 times) wiggles
Profile
Programmer wrote:

-----
I just realized why they use a static image.. there's no hardware support for cycling it.. at best it would run through the animation a predefined number of times then return to its normal operation.. presumably leaving the last frame in place on the frame buffer.. doing any more than this would require setting up some way to ensure the animation loop gets enough of a time slice..
-----

Yeah of course. This is expected behavior anyway. If you've ever played a PSX, N64 or Dreamcast, you would know that the animation cycles through once, then elegantly fades to black. (The fading to black stuff could be part of the animation as well.) Then when you hit the 100% black screen (final frame of animation) you get stuck there until the game loads into console memory and takes over the video card. It seems like identical behavior is possible on the x86.

Somehow it appears that both of you favor animated gif as the animation format. I'm not quite sure how efficient that will be in terms of memory. I was initially thinking of building a Flic file (ancient Autodesk animation format) and then converting it to an exe, possibly com. I believe the difference is that a com can at most be 32kbytes. Am I right?

I have already seen programs that compile a Flic into a standalone self-displaying exe. I will see if there are similar programs for an animated gif. No need to solve a problem twice.

Now, as for debugging ORIGINAL.TMP and making changes to it... What DOS or Windows programs would you recommend, wild_pencil? SoftIce or something else? What would you use personally?

Thanks for all the hints. I will keep y'all updated on my progress.
- wig

02-27-2001 16:38:46

New MessageRE:Boot Logo Question..... With a Difference! (modified 0 times) Wild_Pencil
Profile | Email
No particular reason for Animated GIF.. just picking up on what Programmer suggested and went with it.

COM files have a maximum size of 64k. You also have to consider that you've got very tight size requirements for embedding your ROM into the Award BIOS (the compressed ROM image has to fit), and other size requirements for decompressing your ROM into the proper memory location. There's a very good reason why Award had to go through all the trouble of compressing and decompressing their BIOS code.

If you could keep your new ROM under 64k, you'll save yourself a lot of grief. Otherwise, you'll have to figure out where to store the extra data -- which complicates things substantially.

Pre-Fabricated Animation .EXEs won't work. EXE files require DOS -- which is non-existant in the BIOS. If you write a COM file that is self-sufficient, or makes a few BIOS calls, your program shouldn't be difficult to convert into a ROM.

Assembly/Debugging tools... I prefer to use DOS tools. Windows adds too much bloat and just gets in the way, in my opinion. Personally, I've always loved using Turbo Debugger -- with it, I've defeated many copy protection schemes in my misspent teenage years.

Freeware debuggers are just as good. They're more commonly marketed as "Game Editors", though. Anything that lets you analyze and modify a program's memory contents (ideally with a built-in disassembler) will work. I've tried an old copy of GameTools once, and was quite impressed with it. Wasn't nearly as slick as Turbo Debugger, though.

Modifying ORIGINAL.TMP is as easy as running the debugger against MODBIN.EXE, specifying your BIOS file as MODBIN's target. All the LZH compression/decompression, and the checksums, are handled by MODBIN when you tell it to save the BIOS. Once MODBIN is up and running, hot-key into your debugger and scan around for the memory region that holds the decompressed ORIGINAL.TMP. If your debugger has a built-in disassembler, you're golden... disassemble and reverse-engineer the code from within.

Of course, if you've got an actual disassembler, it's much easier to just disassemble ORIGINAL.TMP and look at the listing. I don't own a disassembler, so I do things without the aid of a full disassembly.

-WP

02-28-2001 01:51:31

New MessageRE:Boot Logo Question..... With a Difference! (modified 0 times) Programmer
Profile
some format that uses a compact file and outputs to something suitable for a frame buffer would be best.. :)

disassembling original.tmp isn't likely to help you much.. Award uses Obfuscation to hide some of what they're doing and the results from a full disassembly are crap... hence a debugger with trace capability (or better Wild_Pencils suggestion of a debugger with incremental disassembly)..

you may not be able to make use of any bios calls as the interrupts might not have been hooked yet.. (by the time you run the anim)

There's not need to mark the code as an oem rom.. The ONLY place we want to jump to it is the initial display routine from the real bios

Suggested path forward:

Pick a file format that is compressed or compresses well.
find or write a viewer for said format that
1) is very small (executable + graphic must be smaller than 95K compressed less if you have added anything to your rom)
2) requires no outside libraries
3) is a com or pure binary file
4) reads its data from a memory location rather than a file (hey look we'll probably have to write/modify one)
5) writes frames suitable for a frame buffer

Pick a memory location for the data to be decompressed to
Pick a memory location for the executable to be decompressed to

trace into the bios, and look for the section that displays the static image
replace that sections with NOPs, a Call to Seg:Offset of our viewer, and whatever was used to return to the bios before.

make an animation

From DOS:

load the animation data (uncompressed) to our data memory location
load the binary viewer (uncompressed) to our executable memory location
load the modified bios (uncompressed) to E0000 (where it belongs)
perform a soft reboot by putting 1234h in 472h and jumping to FFFF:0000

should see everything just fine..

package it up with cbrom

flash it to your system

power off

power on

cross fingers

watch animation
honestly, this shouldn't be very difficult

02-28-2001 10:03:44

New MessageRE:Boot Logo Question..... With a Difference! (modified 0 times) wiggles
Profile
This discussion is likely to quickly descend to technical details that are not likely to be interesting to most people.

People will probably only be interested when I finish an animated BIOS and make it available for download.

However, I would like to continue this dialog with Programmer and wild_pencil. I may need occasional hints and such. If you like, please mail me at wiggles at runbox dot com so we can keep in touch.

Thanks.
- wig

03-01-2001 22:17:39

New MessageRE:Boot Logo Question..... With a Difference! (modified 0 times) Texman
Profile
OK....skipped through the thread....may have missed something...but has anyone seen the SONY BIOS splash screen...animated....just a thought.
03-01-2001 23:53:37

New MessageRE:Boot Logo Question..... With a Difference! (modified 0 times) wiggles
Profile
Is this a Sony Vaio desktop or laptop?

Damn that could be sweet. If we could reverse engineer that it would save me a lot of hassle.

03-02-2001 01:31:20

New MessageRE:Boot Logo Question..... With a Difference! (modified 0 times) Programmer
Profile
you can get ahold of me at programmer at bethie dot net, I don't always reply quickly.
03-02-2001 08:14:29

New MessageRE:Boot Logo Question..... With a Difference! (modified 0 times) hayfever
Profile | Email
Is there a way I can help you? My VAIO notebook here has the animated logo, and I'd love to see an animated logo for the hacked iopeners. e-mail me if I can help, hayfever81 at usa dot net.
03-29-2001 13:15:36

New MessageRE:Boot Logo Question..... With a Difference! (modified 0 times) codeman
Profile | Email
if you want a uncompressed copy of original.tmp get modbin version 6b run it in a dos window on you bios image
and after a few sec it will crash but it will leave you with original.bin in the dir uncompressed
modbin6 is for version 6 bios's and the iopener is not a version 6 so it crashes but it will give you a uncompressed image to disassemble.

codeman

03-29-2001 17:20:20

New MessageRE:Boot Logo Question..... With a Difference! (modified 0 times) Programmer
Profile
heyfever: what's the model # of your machine, and do you know if there are any bios updates for it on Sonys Site? If there are not, then it would be very good of you to figure out what brand your bios is (award, AMI, etc.) and post a copy of it somewhere..
03-30-2001 08:44:15

New MessageRE:Boot Logo Question..... With a Difference! (modified 0 times) YouBecha
Profile
Great Googlily moogily.....;)
http://www.geocities.com/mr_bubba_zanetti/
03-30-2001 23:58:34

New MessageRE:Boot Logo Question..... With a Difference! (modified 0 times) r_fl_z
Profile | Email
This is a great thread for those of us interested in moding the BIOS, and I for one would like to see it 'descend to technical details' :P Does documentation on the various portions of the BIOS code exist, if so where?
03-31-2001 01:59:32

New MessageRE:Boot Logo Question..... With a Difference! (modified 0 times) hayfever
Profile | Email
My laptop is a Sony Vaio PCG-F540, which is a P3-500, 6gb HD, with win98se. When my parts arrive from BadFlash (after IMOD3's come in), I'm replacing the 6gb HD with a Travelstar 20GN 20gb drive, and the 6gb will go in the iopener, but I digress.

The bios is a PhoenixBIOS 4.0 Revision 6. Reading their site, I'm not sure, but it may actually be a NoteBIOS instead of a normal PhoenixBIOS, but I can't tell whether the NoteBIOS says PhoenixBIOS or not.

Entering the bios, it says the version is R0116K1/RK116K1, and the serial number is 28309431-3906316. I can't find a program to extract the bios, and there are no updates on Sony's site. If someone sends me to one, I have both Linux and Win98SE on here, so I will e-mail a copy of the bios to you.

E-mail me, hayfever81 at usa dot net.

-Hayfever

04-02-2001 12:57:47

New MessageRE:Boot Logo Question..... With a Difference! (modified 0 times) Programmer
Profile
bah humbug.. doesn't appear to be any phoenix specific software out there.. you could give uniflash a try and see if it'll grab an image....
04-03-2001 07:05:15

New MessageRE:Boot Logo Question..... With a Difference! (modified 0 times) r_fl_z
Profile | Email
Anyone have any good links for documentation on BIOS internals? I've looked around a bit, but have found nothing useful. TIA
04-03-2001 15:22:17

New MessageRE:Boot Logo Question..... With a Difference! (modified 0 times) hayfever
Profile | Email
Okay Programmer and all others. I believe I have it. I have a PhoenixBIOS backup of the Sony Vaio bios, the one with the animated bios logo, complete with both audio and video. Who wants it? E-mail me or post here with your e-mail. Oh, and because I don't want to risk being sued, I am assuming you have a sony computer with a PhoenixBIOS on it, so you have the right to posess it.

Hayden

04-06-2001 07:34:21

New MessageRE:Boot Logo Question..... With a Difference! (modified 0 times) BadFlash
Profile | Email
I can't help with this issue, but I'd appreciate a copy of the bios file for my library. What did you use to do the backup?
04-06-2001 09:30:40

New MessageRE:Boot Logo Question..... With a Difference! (modified 0 times) hayfever
Profile | Email
I used Phoenix Phlash 1.82, with a Platform.bin from another manufacturer, since I couldn't find one for sony. I had tried Phlash before, but it requires an identification file called platform.bin. I hope it was pulled fine, maybe you can verify this. I'll e-mail you the file.
04-06-2001 10:30:15

New MessageRE:Boot Logo Question..... With a Difference! (modified 0 times) Programmer
Profile
you can send it to me at programmer at bethie dot net
04-06-2001 13:16:57

Reply to Thread | Printer |
All times are PSTPowered by UltraBoard v1.62



Copyright © 2000, Netmake Inc. All Rights Reserved.
See Terms and Conditions for more information.




i-opener opener laptop notebook computer help drivers dll free windows dos repair fix linux mac macintosh 2000 95 98 nt pc configure hardware software sound video netscape explorer network networking lan wan software cmos fat bios printer card mouse modem ide scsi cd rom controllers scanner tape hard drive cgi scripts source code mp3