Journal of Retro Native Forth
Volume II, Started April 20, 2003

April 20, 2003
--------------
Well, I'm working on the RETRO-NG codebase again; it's starting to improve (which is a good thing!)

Today I revamped the assembler, simplifying the code quite a bit. I also added an IF/THEN construct which works fairly well (logic support at last!) Later I'll bring over RETRO5's logic words and start more complete testing. I'll backport this into RETRO5 (that should please some people who need logic support)

I'm looking into another redesign of the web site, this will NOT come out until I actually release RETRO6 as a working solution (i.e. when it replaces RETRO5)

There is now a forum as well as the Wiki, other bits will come as well. (There will be a wiki, polls, etc; all in a consistant interface). The forum replaces the discussion board.

I'm considering adding a binary runtime option to RETRO6. It'll let you load a compiled application (e.g. from RETRO/C) and run it. Maybe. No promises though.

More later...
[9 hours later]
Still working on IF/THEN, there are a few bugs to be worked out yet...

[5 hours later]
Continuing to work on IF/THEN - these are annoying bits of code!
I'm also starting to move the math words into Forth instead of assembly.

[30 minutes later]
Completed move of all math words (except '+') into Forth

I'll clean up the words/ directory to remove all the old, unused ASM code now.


April 21, 2003
--------------
I finished cleaning up the forth/words/ directory, no unused code now :-)

Still trying to get IF/THEN working... This is a pain in the neck. Once it works it'll be pretty good, but until then it's just annoying.

Here's a basic idea of what needs to be implemented:
: if $72 1, here ;
: then here swap ! ;


April 22, 2003
--------------
Still havn't finished IF/THEN, but I'm starting several new things (including Common Driver Interface specifications and support, a BLOCK editor, and some tools to manage BLOCKS.) Most of this code will be written in Forth. I'll also start to enhance the interface...


April 23, 2003
--------------
Well, IF/THEN don't crash anymore, though they always return the same result...
Here's the current code:
: ?branch ? [ $72 1, ] ;
: >mark [ here 0 , ] ;
: >resolve [ here over - swap ! ] ;
: if [ ?branch >mark ] ;
: then >resolve ;
: a if drop emit then . ;

As you can see, I added support for [ ] as well. Kind of useful IMO.

I'm starting work on a small book (tutorials, developer's guide, articles) about Retro. I'll call it Retro Native Forth Handbook. It'll be a pretty big task, but that's ok with me.

Maybe I'll submit my code to the #forth people and see if they can help me get it working...


April 24, 2003
--------------
Well, I'm finally releasing a snapshot of the new RETRO. Be warned, it's no where near complete, but works fairly well for allowing development. I'll release 3.3.2 soon as well.

I am also posting a copy of the first draft proposal of the new site design today, I hope everyone will like it.

What's high on the priority chart?
1) IF/THEN
2) Return stack
   >R R> R@ R!
3) Common Driver Inititive compatible drivers
  a) Floppy
  b) ATA/IDE
  c) SCSI
  d) VGA/SVGA/VESA
  e) Keyboard
  f) Parallel Port
  g) Printers
  h) Serial Ports
  i) USB
5) Applications
  a) Improved BLOCK editor
  b) Basic drawing program
  c) Terminal

This will take a while, but should be doable given enough time...

I have an ugly, but workable block editor in place now (eventually it should be quite usable). You have to select a block, then you can edit, load, save, view, or delete it. 'Words' is also implemented again, though I should try to factor out some of the added code into Forth.


[Later on]
I've moved these words into the assembler: ? cmove fill
The assembler instruction set is growing, but the assembly code is still pretty hairy. (Just try to grasp it quickly!) Hopefully I can improve it before I release the next build. I decided to stop using version numbers and just rely on build numbers instead. It's easier that way...

The web site has a new layout too.

[A few hours later]
cmove has been moved back into the nasm primitives, it was too long to implement in the assembler. I added a word 'bytes' that helped me clean up the longer definitions quite a bit.

Work on improving the interface is under way. The look is based loosely on the website and supports a nice header at the top of the screen and a footer on the bottom. It eats a few lines of screen space, but looks good so I'll keep it.

I'm about half done my first draft of the Common Driver Interface Specification. Once it's done I'll redo the drivers to comply with it. (It'll make code sharing with other OSes a lot easier).

[8:03PM]
Just about done for the day; I've rewritten the BLOCK editor. It now has a colored background, looks nicer, and offers more editing features than Cards. I'll backport it into RETRO5.3.3.2 and enable Cards to use some of the new features. Once I finish the updates to the ATA driver I'll add support for loading and saving BLOCKS to a hard drive. It's pretty easy to use right now. (And a lot simpler than Cards)


April 25, 2003
--------------
Further interface enhancements. Now colors can be changed (I'll have two or three color themes to choose from in the next release)

The block editor uses the color themes as well.


April 27, 2003
--------------
Added >R R> R@ from Tom Novelli (not working yet)
Also added MACRO and FORTH to switch dictionaries - thanks again to Tom for pointing out this omission. (They don't seem to work properly either) I'll try to fix these later on.

I readded CREATE DOES> so you can use them now -- another nice addition
CONSTANT and VARIABLE are now implemented in Forth

Added:
  ALIGNED ALIGN ALLOT CELL+ CELLS CHAR+ CHARS ARRAY
I rewrote PAD as a side effect, it's better now.

ARRAY is quite useful - try something like:
  10 array foo
  2 foo
to obtain the address of the third element of the array.

I also added INSERT-LINE into the block editor, it's not perfect, but helps quite a bit.

Maybe I could implement the return stack in an array? I'll try later - it's 1:34AM here and I'm getting tired...


April 28, 2003
--------------
The return stack still isn't working, though I'm making a little progress on it.

INSERT-LINE works properly now

Fixed a few bugs in the alignment words

Began work on the new graphics subsystem. We'll eventually support: TEXT, 8, 16, and 32 bits.
Screen resolution will be predetermined... (80x25, 320x200, 640x400, 800x600); Color depths will be changable at runtime.

Further source cleanup too. A little redundancy is gone; I'm hoping the overhauls will prove helpful.

I should come up with a better scheme for handling the drawing words.



Hmm, 640x400 is working pretty good, though a few problems remain. As soon as I work out the details I should be able to do 320x200, 640x400, 640x480, 800x600 in 8-bit color without any problems. I'll add a nice 'select max res' menu to the bootup sequence (DOS/Fat12 loader only) You can set the screen resolution by doing something like: 
   640 480 setres
If it doesn't work, try:
   ati clear
and reset the resolution if needed. Increasing the mode makes everything look a lot nicer. For now you can edit system/headers.1 to choose the max resolution (I've only tested up through 640x480)

The key problem is that text only occupies half the screen. I'll have to work out a fix for this later on. At least it looks better than 320x200!


The 624 utility (in retro6/util, download and install the util6.zip package) can be used to compress the kernel+startup by roughly 50%. The resulting image is still bootable :-) Don't try it with the raw diskimage though.



April 29, 2003
--------------
Further refinements to the UI and scrolling down in console. It's not automatic yet, but works flawlessly other than that. More changes to the color-depth driver code and some refinements to the Forth part of the video drivers.

Oh, and the problems with High-res have been fixed now. We can finally do 640x480!


March 01, 2003
--------------
Final tweaks to the VESA driver, it autodetects VESA support now. SCROLL is now tied into the system! Yes, a scrolling console is now working flawlessly (though slow!). I'll make an optional smoothscroll later.

I started some work on the textmode driver, it'll take a while to implement, but will ensure compatibility with nearly everything.

I'm still working on the Common Driver Interface Specification; once I complete it, I'll redo the ATA/IDE driver and keyboard driver to be compatible with it. The Video drivers will still be RETRO specific (though I'll use parts of them to implement a CDIS VGA driver)

The compiler is now nearly identical to Tom Novelli's old RETRO4b one; it works a little better than the one I had been using.
