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

[colorforth] How I got colorforth to boot. part two


colorForth for the Compaq pentium 4
by Raymond Arthur St. Marie II ray.stmarie@xxxxxxxxx

These files, along with Masm32v8, build a colorforth for the Compaq
 Presario Pentium 4 with colorforth display set to 1024X768.
 This is a hack of a hack. The original file was Chuck Moore's
 Color.com version 0.1 dated july 22 2001. Terry Loveall made the
 changes that he explains below and I hacked those changes as I
 describe here.

ras0412110600 note
 Send this file later today to Tim Neitz for his archive.
 These files will reside along with Terry's under the windows-cf-tools
 folder there and will provide a working colorforth for the Compaq and
 possibly others. Colorforth chess will also be included in that
 folder as it is a version of this code. Thanks, Tim for the space.
 ( ras0601291208, is embarrased to notice that this has not happenned
 yet. Tim has openned a file in his archive for me, labeled Raystm2, but
 I have not sent him the files as yet. This I will correct immediately.)

Changes to these files for the archive. You can ingore the blurb below
 about needing a new linker as the linker supplied with MASM32v8 works
 fine. So I've changed the gc4.bat file back to not needing the \link
 folder. I did this so that someone who tried it and did not read this
 first would get a build without incident.


ras0410?when? note
 Sent these files to Howerd Oakford at inventio.com
 so that he could use it as an example for him to port his
 cfdos3v1 colorforth front end to work on my Compaq. The problem
 being that Compaq's and Dell's won't boot his code. He knows
 how to fix this and I await his code. ( note need to ask Howerd for
this )


ras0408170810 c4-3.7z
 updated line 29 to
 .equ vesa, 0x4117h ; 117h but with LinearFrameBuffer Bit on
 then I followed the instuctions of two paragraphs down
 to save this new version.


ras0408171203 c4-2.7z
 updated the color.asm with a bug fix in line 360
 360    jl   @f ; flag nz ; Bug-fix! original was "js"

This prompted the need to update the floppies and create a zip archive
 for earlier versions of the files color.com color.lst any old files from
 original creation and especially c4.com. These were put into a zipfile
 called c4-1.zip
 the system was rewritten with
 c:\>debug c4.com w100 0 0 7e
 c:\>q
 This put the first 36 blocks of c4.com onto the disk
 then all disks were copied to update each other and
 a new zip file named c4-2.zip was created



ras0407300641 c4-1.7z

I was able to boot to colorForth today, using this package, on a Pentium 4
 Hewlet Pacard\Compaq Presario off the shelf model sr1010nx which comes with
 just about everything on the motherboard as controllers.
 ( video, sound, modem, ethernet - you know the stuff you normally
 need cards for ) 2.8 gig intel celeron, with little modification
 to the original loveall-cmcf code.

The reason for choosing this version was for Terry Loveall's floppy
 mods ( non-dma). When I originally downloaded this version and tryed to
 boot, it was obvious to me that the floppy was working fine but the
 display would not.

Returned all changes Terry made to the modifications for 800X600 video margins
 in color.asm and gen.asm. back to original 1024*768
 Please see Terry Loveall's original mods to
 this package included below in the fourth paragraph
 after the date: "08/06/02 Terry Loveall".


Since Mr. Loveall's version came with a way to rebuild ... :)
 Note: I had to download a different linker to get the build.
       Which means that I had to alter the gc4.bat re-builder file
       to use the new linker. LINK ver 5.12.8078 did not know how to
       handle 2 of the directives that ML fed to LINK. Seeing how
       simple the link statement was in the gc4.bat, I guessed that the
       problem was the version of LINK and not with the ML output.
       After all, the color.obj file was created without error.
       Mr. Loveall recomends the LINK 5.31.009. I found LINK 5.60.339
       while searching for the 5.31.009, tryed it and it worked.
       LINK 5.12.8078 had a problem with ML command /t which means that
       it won't recognize the .tiny memory model and that's all I
       needed to know. 5.12.8078 also had a problem with /Z2 ???? I still
       don't know what that means.

       program         version                 changes
       ML.exe          6.14.8444       worked fine and came with...
       LINK.exe        5.12.8078       but that didn't work so i used
       LINK.exe        5.60.339        which i found on the web and

               put it in a new folder "c:\masm32\bin\link\" and
               unpacked it and built the c4.com file properly
               when i changed a line in ...

       gc4.bat         c4-800x600-p2bd-03  displayed here with changes


                       @echo off
                       @echo assembling c4.com with listing
this line changed       ml /AT /Fl /Sg /Bl.\link\link.exe /nologo color.asm
                       if exist color.obj del color.obj
                       copy /b color.com+color.blk c4.com

The line begining ml includes -  " Bl.\link\link.exe " - and i added the
 \link in the middle to get ml to include the new linker. ( i've
changed this back since using MASMv8)

Next I opened a command prompt window and used debug to write the c4.com
 file to a freshly formatted floppy with these debug commands:
       c:\"c4.com's dir"\> debug c4.com
       -w100 0 0 144
       -q
w writes a file
100 starts the writing from the current file's ( c4.com) execution point.
0 is the "A:\>" drive
0 is the location on the drive to start writing ( boot sector)
144 is the hex number of sectors? to write- why did i pick 144?
       anything i tryed less than 144 did not clear the blocks past 63
       with out leaving a bunch of garbage on the disk that the editor
       could not get passed easily without displaying a repeating green
       sequence that i took to mean the editor was trying it's
       darnedest to Huffman decode garbage, not concidering, and as I
       write this, still not knowing if the garbage was necessary to
       colorForth in any way or form.
       (whew!. As it turns out, it's not necessay to colorforth.)

This paragraph is for newbies like myself,
 a couple of notes on the execution of gc4.txt.

Do yourself a favor before you rebuild color.com -- delete it.
 The original is still safe in the zip file -
 you did save the zipfile, right?
 Also, execute gc4.bat from a command prompt.
 This way, you can pay attention to the fact that if
 your linker won't build this file you won't be confused by the fact
 that the "copy" part of gc4.bat executes properly with the original
 color.com file.
( I was wonderin' why those changes wern't takin' place !?!?)

Enjoy the color.lst file that is generated automatically.
 I imagine that the .lst file may be a window into the hex code Mr.
 Moore uses in the source.


 08/06/01 Terry Loveall    loveall@xxxxxxxxx

Readme for colorForth at 800x600 with ATI AGP video graphics and non-DMA floppy.
 Modified from the latest (dated July 22,2001) written by Chuck Moore.
 Thanks Chuck.

THIS SOFTWARE COMES WITH NO WARRANTY. USE AT YOUR OWN RISK.

Chuck's version (dated July 22, 2001 in the first line of color.asm) has a
 length error. There is an 'org (1200h-1)*4' at the end of color.asm that
 should read 'org (0c00h-1)*4' due to having the value of 'icon' re-defined
 from 4800h to 3000h. This also changes the length and starting location of
 the color.blk file (included). Corrected in this version.

Color.asm and gen.asm have all references of 1024 and 768 consolidated with
 variable names, thanks to Chuck' baseline modifications. His other baseline
 mod is to improve the scope of the floppy I/O by using non-DMA. The floppy
 changes are primarily located in boot.asm. There have been other various small
 changes made to the kernel and source blocks. See baseline or this package
 for further details.

This mod package has had left and right margin values changed to fit 25 lines
 of 40 characters into an 800x600 display. Leaving the margins as in 1024x768
 produces truncated chars on my machine (Asus P2B-D, ATI Rage128 AIW), YMMV.

The modifications for 800x600 video margins are in color.asm and gen.asm.

Search for the string ';;' to find all changes.

( note from RAS - these ';;'s are what i returned to original settings to
       get the system running on pentium4)

The file color.blk has the original 1024x768 code in it. You will have
 to use the editor and change any references to 1024 and 768 to 800
 and 600 and then 'save' these changes to disk. This will give you the
 opportunity/motivation to familiarize yourself with the editor and
 the block source code. Don't forget to rescale the values in 'logo'
 and 'screen' in block 30.

The file gc4.bat will assemble color.com and create the c4.com file
 from color.com and color.blk.

For colorForth operation, programming and the most recent baseline
 see http://colorforth.com/.

This colorForth kernel is generated by MASM 6.11c and link.exe 5.31.009.
 Any version of MASM 6.1x should work. For a free version of MASM goto:
 http://www.pbq.com.au/home/hutch/masm.htm.

( Final note from RAS: The MASM version 8 does not have a linker
problem, so you can disregard the changing of link that I wrote about
above. It's just there for historical reasons.)

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