VBE function 0x4F0A

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Luis
Member
Member
Posts: 39
Joined: Sat Feb 16, 2013 11:19 am

VBE function 0x4F0A

Post by Luis »

Hi,

I've tried Bochs, VMware and QEMU (with Bochs card, VMware card, QXL card and Cirrus card) and I can't make any of them work with function 0x4F0A. I can't even get a valid error code return in AH register (i get AX = 0x0A0D. They don't support that function or is there any trick to make it work?

PS: CX register is not mentioned in the function input description but if I don't 0 it I get the whole screen filled with music symbols after calling the interrupt.


Cheers,

Luís
User avatar
Luis
Member
Member
Posts: 39
Joined: Sat Feb 16, 2013 11:19 am

Re: VBE function 0x4F0A

Post by Luis »

I guess I found the problem is another. My code disassembled by NASM says 'mox ax, 0x4F0A' just like in my code but I see instead in Bochs debugger in the same place 'mov ax, 0x0A0D' followed by 'dec di'. Now I'm confused.
Attachments
abc.png
MDenham
Member
Member
Posts: 62
Joined: Sat Nov 10, 2012 1:16 pm

Re: VBE function 0x4F0A

Post by MDenham »

Looking up "dec di" tells me that it's your missing 4F, which brings up the question of where the extra byte (the 0D) is coming from. My guess is some form of hosed line-ending conversion (\0x0a -> \0x0a\0x0d) happened to your binary, and that's your problem.
User avatar
Luis
Member
Member
Posts: 39
Joined: Sat Feb 16, 2013 11:19 am

Re: VBE function 0x4F0A

Post by Luis »

Thanks, you just saved my day :)

My tool to copy .bin files to .img disk image is using fscanf/fprintf and that's probably the problem. I was writing dumb code until very late that night until 7 am when writing the tool. I guess I was stupid using a char function :oops: I'll try to change it to fread/fwrite.


Cheers,

Luís
User avatar
Luis
Member
Member
Posts: 39
Joined: Sat Feb 16, 2013 11:19 am

Re: VBE function 0x4F0A

Post by Luis »

Solved =D>
Post Reply