View Full Version: Dex's 1 Sector CD Player?

dex >>OS Dev >>Dex's 1 Sector CD Player?


Dex- 05-26-2008

I can find no fault in you description, but as far as the pciRegRead8 pciRegRead16 pciRegRead32 Its just a way of reading a byte or a word or a dword. The built in driver is not a fully driver, it just un-mutes the sound and turns the volume up, that why you need the cable to play the CD. but if you had the cable it should work, if i get time i will try and make it play a short wav. I will also write a simple DexOS prog to test ID.

rhyno_dagreat- 05-26-2008

Awesome! Thanks Dex! As a bit of a gift to you for all of this help, I have written a simple Number-To-Hex String converter. Hopefully it will be of use to you when you're testing things: ;------------------------------------------------; ;Hexadecimal Number Display Program ; ;By: Ryan Lloyd (c) 2008 ; ;Description: Takes a number put in EAX and ; ; turns it into a DWORD sized string. Then it ; ; outputs it to the screen. Enjoy! ; ;------------------------------------------------; use16 org 100h jmp Start numtbl db '0123456789ABCDEF' num0x db '0x',0 numstr db 'XXXXXXXX',0 lastPlace dw 0 Start: mov ax, 0003h int 10h mov ax, cs mov ds, ax mov es, ax xor eax, eax mov al, 0F0h call NumToHex mov si, num0x call PrintF mov si, numstr call PrintF mov ax, 0100h int 21h mov ax, 4C00h int 21h ;------------------------------------------------; ;Function: NumToHex ; ;By: Ryan Lloyd ; ;Description: Turns a number into a ; ; hexadecimal string. ; ;Parameters: ; ; EAX - DWORD value to convert. ; ;Returns: ; ; numstr - Hexadecimal number in string fmt. ; ;------------------------------------------------; NumToHex: push ax push bx push cx push dx push di mov cl, 0 mov dx, 0 mov di, numstr add di, 7 std @@: cmp dx, 8 je @f push eax shr eax, cl and al, 0Fh lea bx, [numtbl] xlatb stosb add cl, 4 pop eax inc dx jmp @r @@: pop di pop dx pop cx pop bx pop ax ret ;------------------------------------------------; ;Function: PrintF ; ;By: Ryan Lloyd ; ;Description: Prints a string out to the screen. ; ;Parameters: ; ; SI - Address of string to be printed. ; ;Returns: ; ; lastPlace - Last byte accessed in video memory.; ;------------------------------------------------; PrintF: cld push ax push es push di mov ax, 0B800h mov es, ax mov di, [lastPlace] PutC: lodsb cmp al, 0 je Done mov [es:di], byte al inc di mov [es:di], byte 0Fh inc di jmp PutC Done: mov [lastPlace], di pop di pop es pop ax ret P.S. - Please don't undermine the term "simple". It took forever for me to find a good modular way to do it that seemed easy. Also a review of ASM since I haven't really programmed in God knows how long.

Dex- 05-27-2008

Thanks rhyno_dagreat, i am sure it will come in handy .

Dex- 05-27-2008

I have made this for DexOS so you can put device and vendor ID in CLI and test for card. www.dex4u.com/demos/CardFind.zip

rhyno_dagreat- 05-27-2008

Thanks man! I'll check it out tomorrow after I wake up. I am thinking about making a program that will go through each PCI device and print out the numbers of the DeviceIDs and VendorIDs on the screen. I've already started, so it should be done by tomorrow if I'm lucky.

rhyno_dagreat- 06-07-2008

Tomorrow came a little later than expected. :lol: Sorry... I got wrapped up in things around here. However I tested it, and it worked! :D

Dex- 06-08-2008

Cool 8) .

Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.