flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > How to use images? revised.. Goto page 1, 2 Next |
Author |
|
Redragon 04 Dec 2004, 02:59
I was wondering if someone can post some FASM code to show a BMP image in dos.. and if possible make it bootable from a disk...thanks!
|
|||
04 Dec 2004, 02:59 |
|
Redragon 04 Dec 2004, 04:58
I tried compiling it using FASM and it didnt work. Is it using FASM or Tasm? if its Tasm, where would i go to get an actual working version of it, I tried Tasm before, to compile a few of your other examples, and Tasm wouldnt even start..i dont know whats wrong...anyway, thaks for the help.
|
|||
04 Dec 2004, 04:58 |
|
ASHLEY4 04 Dec 2004, 05:16
Its most likely masm, it will need converting for fasm, maybe someone else has a dos bmp display code, with fasm code ?.
\\\\||//// (@@) ASHLEY4. Batteries not included, Some assembly required. |
|||
04 Dec 2004, 05:16 |
|
ATV 13 Dec 2004, 06:54
This is very simple 320x200x256 BMP viewer for bootsector
Last edited by ATV on 03 Feb 2006, 08:18; edited 1 time in total |
|||
13 Dec 2004, 06:54 |
|
ASHLEY4 13 Dec 2004, 15:37
Nice code ATV, you should of entered it, in the 512b compo .
\\\\||//// (@@) ASHLEY4. Batteries not included, Some assembly required. |
|||
13 Dec 2004, 15:37 |
|
ATV 15 Dec 2004, 06:54
ASHLEY4, it's not really OS, but there is some extra lines that can load real kernel. Maybe BootBMP should load DebugOS?
|
|||
15 Dec 2004, 06:54 |
|
ASHLEY4 15 Dec 2004, 15:58
But the compo was started, so we would get nippits of of code, to help people with OS dev.
And since the linux penguin, a lot of beginners like a boot up image, and your was a good example. Now if you could of put the two (DebugOS that is) together you would of been onto a winner!. \\\\||//// (@@) ASHLEY4. Batteries not included, Some assembly required. |
|||
15 Dec 2004, 15:58 |
|
Redragon 25 Jun 2005, 19:14
since that uses a floppy loading, to make it show that image in 32bit mode, what all would you have to do?
|
|||
25 Jun 2005, 19:14 |
|
Dex4u 25 Jun 2005, 20:38
That demo is run in realmode 16bit, it loads a 64k bmp, but you wanted higher-res and thats a bmp file of about 900k , not only will it take a long time to load, but you would need to use unreal mode, or make a pmode floppy driver.
|
|||
25 Jun 2005, 20:38 |
|
Redragon 25 Jun 2005, 21:54
which one would be better, and faster? using real mode or a floppy driver?
|
|||
25 Jun 2005, 21:54 |
|
Dex4u 26 Jun 2005, 09:56
Its unrealmode and they are the same speed as they both use the floppy , but unrealmode you can use int 13h for floppy, but in pmode you need to make a pmode floppy driver or set up v86.
Read up on unrealmode its a sort of cross between real and pmode. Heres a start: http://www.mega-tokyo.com/osfaq2/index.php/UnrealMode |
|||
26 Jun 2005, 09:56 |
|
ATV 03 Feb 2006, 08:19
Little update, I have looked my old files and found pcxloader written few months back, but I have forget to send it (my near memory is very bad, because lack of vitamin B1/B12)
New bootloader can display pcx file and load over 64k kernel, but only in FAT12 and 320*200*256 pcx picture :-(no room for more code) Also updated bootbmp for bmp pictures included
|
|||||||||||
03 Feb 2006, 08:19 |
|
Adam Kachwalla 04 Apr 2006, 09:00
How can you fit a 640x480x16 bitmap (Mode 0x13)?
|
|||
04 Apr 2006, 09:00 |
|
Madis731 04 Apr 2006, 13:11
If you mean when the image is NOT exactly 640x480, then you should divide your original width,height with that 640,480 and pick the BIGGER constant. Then you can plot individual pixels from the source picture "constant" amount apart. The same you would act on the height. This means that when the picture is not of the same aspect - you will have some screen blank.
The other way is to have separate constants on the H,W parts so the image fits perfectly, but it might be stretched either way. |
|||
04 Apr 2006, 13:11 |
|
ATV 08 Apr 2006, 07:17
Adam, biggest problem is to show picture, because it can be 1bit*4color_planes or 4bits*1color_plane.
That depend what program saves that pcx picture. Main unpacking is same, but if there is 4 color planes (640/8=80 bytes*4planes). You need combine color planes. Something like: screen[0]=(buf[0] and 1)*8+(buf[80] and 1)*4+(buf[160] and 1)*2+(buf[240] and 1) Or you can use screen mode 12h (640*480*16) and write it in right color plane (it's not so easy as it sounds). If picture is 4 bit in 1 plane, it need to handle high/low nibble. And if that is not too complex already, some programs use packing over color planes. So it's more easy to use some graphic tools to convert picture 640*480*16 -> 320*200*256 If you are looking for challenge try unpacking GIF |
|||
08 Apr 2006, 07:17 |
|
Madis731 08 Apr 2006, 08:21
I've tryed PNG, but the packing lacks documentation I need some clearer documentation than the RFCs laconic one.
|
|||
08 Apr 2006, 08:21 |
|
Dex4u 08 Apr 2006, 10:43
ATV wrote: If you are looking for challenge try unpacking GIF And if looking for a bigger challenge, try JPEG . All image formats should be nonone OS dependent, other than than the load of file and memory aloting, so should only need writing once in asm (any offers ) PS: There a pnglib here: http://www.madwizard.org/view.php?page=downloads coded with masm. PPS: I think he just wants to display a 640x480 16 image at bootup, but put the wrong mode. |
|||
08 Apr 2006, 10:43 |
|
Adam Kachwalla 17 Jun 2006, 03:16
Don't worry about packing! Any 640x480x16 BMP will fit on a 1.2MB floppy disk with a little over 1MB left!
Why bother with packing and unpacking image files, when you can leave the image in Raw or BMP format? Remember to KISS (Keep It Simple, Stupid) |
|||
17 Jun 2006, 03:16 |
|
Adam Kachwalla 17 Jun 2006, 03:27
Madis731 wrote: If you mean when the image is NOT exactly 640x480, then you should divide your original width,height with that 640,480 and pick the BIGGER constant. Then you can plot individual pixels from the source picture "constant" amount apart. The same you would act on the height. This means that when the picture is not of the same aspect - you will have some screen blank. The problem here is that the image is exactly 640x480. It is a 16-color BMP. I can convert it to a variety of other file formats, but I like to work on the KISS (Keep It Simple, Stupid) principal. Unpacking code wastes a bit of time. Besides, the BMP only takes up 150KB |
|||
17 Jun 2006, 03:27 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.