retro: ok, it work for me now, except...

Tom Novelli tcn@clarityconnect.com
Thu, 29 Jul 1999 20:07:55 -0400


Ok, I'll try to cover everything in this reply:
keymaps
graphics
interfacing assembler routines to Forth

On Thu, Jul 29, 1999 at 10:31:57AM -0400, Paul Dufresne wrote:

1) Keymaps:
> But it was in default keyboard, although I did edit options file
> to have dvorak keyboard layout.

Oops, I'm using a symlink for that now.  From the kernel/ directory, do a
"ln -sf ../keymaps/kbd_dv.map keymap".  I need to document that.

2) Graphics:
> Also I did try grmode, colorbars and textmode. (bforth.fo)
> grmode goes in some graphics mode but with garbage (mostly vertical
> lines). And there you can't see what you type. clrscr does not remove
> all the garbage (vertical lines stay, but some garbage do disappear).
>
> colorbars do very ugly colorbar in the garbage and only from the
> 1/3 up of the screen to the middle.
> 
> textmode come back to textmode but not a normal one.
> the ok prompt now have one or two small horizontal black lines
> in them.

That's not good.. textmode is supposed to restore the registers exactly as
the were before.. obviously it's not doing that.  There are some
idiosyncracies in the attribute controller (port 3c0/3c1)... if you don't
have the right I/O delays and extra port reads, that could explain your
problems.  I only got it working in the 'bochs' emulator, which doesn't care
about timing.  The ET4000 card in my 486 doesn't show ANYTHING.

On Thu, Jul 29, 1999 at 11:52:29AM -0400, Paul Dufresne wrote:
> First before someone go search to far to find why the strange
> textmode, I'd like to add that the problem only come if you do
> something in grmode. I means if you do grmode then do textmode,
> the text looks fine, but if you do grmode, then clrscr or
> colorbars and then textmode, then you'll see that all letters
> have a small horizontal miss in the middle and a lot of letters have
> some white dots on the rightmost column that should not be there.
> I have a Cirrus Logic GD542x video card, should be plain VGA compatible.

SVGA cards are port-compatible with VGA, not just BIOS-compatible... right? 
You only need specialized code to use high-resolution modes.  And most of
the chipsets are similar, they're just extensions to the VGA.

You can display text in graphics mode, using 'gputc' in display.inc.  What
you type doesn't show up automatically yet.. I have to re-organize the
display code... this ties in with the "virtual consoles" stuff we talked
about a couple months ago, along with whatever windowing system I eventually
write.  I'm not ready to do all that.  A text/graphics splitscreen is all I
want to start with... like an improved Apple-II 'hi-rez' mode. :)

> Maybe I'll try to understand your stuff in bforth.fo (if I can
> find back vgadoc).

VGADOC - look under http://tunes.org/~qz/borg.qzx.com/
(loads of good stuff there)

3) Interfacing with Forth:
> Second, what's the trick to export stuff to the Forth? I mean in
> the past you would have put a global <name of procedure> and end
> it with e<name of procedure>. But now there is no global stuff anymore.
> The only thing is that exported to Forth stuff have uppercase name and
> still finish by e<name of procedure>. Is it just the e<name of
> procedure> that does the trick or is it the uppercase too?

Ahh, you have to add it to the dictionary yourself now :)  It's in
words.inc.  There's a macro to make it easy, and you can use any character
except whitespace.

;; In your .asm or .inc file:
ASDF:
	<assembler code>
eASDF

;; In words.inc:
entry	ASDF, "asdf", 0

"asdf" is the name used in Forth.. right now it's case-sensitive, but it
won't be hard to add a case-insensitive option (just write a 'stricmp'
function).  The last parameter, 0, is for flags.  F_IMM specifies an
immediate word (it always executes immediately, even when you're compiling a
word definition).  F_COM specifies a compile-only word, which causes an
error in interpreter mode.  F_COM|F_IMM is used for words like IF and THEN,
which generate special machine code.

> So I guess I should do something similar with serial.asm and
> rename it serial.inc and add serial.inc at the end of pmode.inc.
> Is it so?

Yup.  Don't bother renaming it, though.  Leave it as serial.asm.  Once I
finish the XCOM loader we can use modules again.

-- 
Tom Novelli <tcn@tunes.org>
http://bespin.tunes.org/~tcn