home .. forth .. colorforth mail list archive ..

[colorforth] General Colorforth Help


I wonder if there is anybody out there who might be able to help me.

A few months back I had been trying to find a version of Colorforth that worked on my machine (P150, 64Meg Ram, S3Trio64+ video with 1 meg Ram) but without success. Even Richard Collins' S3 specific version seems to fail to deliver the goods. The best I got, that is other than the machine resetting, is the programme loading (I assume the system is up and running as "save " often seems to work) with a blank screen. Chuck Moore's own color.com gets me this far even though the video is for 2 megs of ram.

So I decided to take the source apart and build it up for myself from scratch. This is taking some time (!) as I am not a programmer and didn't have any prior knowledge of MASM (or indeed 386s or operating systems etc). However, of course, in doing so I've learnt quite a bit about MASM, getting in Protected Mode, the A20 thing, floppy drivers, CPUs etc.

Present situation: I've just finished ploughing through boot.asm (resetting vesa and hp, vp to 114h, 800 and 600) and have just reached the subroutine "ati0" in gen.asm. I think I understand the "dev"/"north" routine but now am a bit stuck. 

So the specific questions:

i) In ati0 I don't understand the lines: 
or dword ptr [EAX-4], 2 ; Enable memory
add  AL, 24h-8 ; look for prefetch

Actually, I haven't really  got my head round the rest of ati0 either so any help there would be appreciated. The trouble for me is translating all those hex numbers 8000xxxxh etc. into something concrete. Even trawling through the web hasn't really helped as there isn't much detailed info on PCI about.

ii) On my machine ati0 seems to set displ to 0E0000000h and this seems to match up with the values given by programs that I've downloaded that investigate the pci bus. Without continuing to assemble the rest of the color.asm program how can I write a subroutine to send a pixel to the screen by using the values in frame and displ (as the subroutine "switch" seems to do)? I've tried poking to the memory location in displ but that doesn't seem to work - I know I can throw things directly at the screen via 0A0000h but I guess this isn't the way colorforth works. (Sorry - major lack of understanding about video displays here!)

My theory is if I know how I can throw things at the screen using the values in displ/frame then I should be able to write a little debugging code that helps me investigate why the original version of the program leaves my screen blank.

iii) On some of the adapted versions of Colorforth the program is put together by assembling color.asm and then affixing something like color.blk to it. This made me think that if I am trying to assemble the original source from colorforth.com (i.e. color.asm, gen.asm, boot.asm) then the resulting color.com is missing something to run properly.

Apologies for the long message but any help would be gratefully received.

Simon Steptoe






---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com