Jump to content
Sign in to follow this  
moulinaie

MLC/Precompiler version 1.30 with F18A support

Recommended Posts

Hello,

 

I am happy to annouce this new release of MLC that was harder to develop as there is no F18A emulator... So I had to run between the living room and the old-compurter room with my CF card to test the software. Thanks a lot to Matthew for his patience and fast replies.

 

Now MLC gives access to the GPU (TMS990 coprocessor) with intructions:

 

$GPU section to define the assembly code
GPURUN adr
GPUWAKE
GPUSLEEP
GPUSTATE

 

Access to the BitMap layer with instructions:

 

BMLSET m adr
BMLPLOT x y c
BMLDRAWTO x y c
BMLFILLRECT w h

 

Access to the timer with instruction

TIMER options
options can be:
CLEAR, READ, SUM, TOFLOAT
RESET, RUN, LOAD, INC

 

MLC with DSK images and full PDF english manual, (some videos too) can be downloaded here:

(english) http://gtello.pagesp...ge.fr/mlc_e.htm

(français) http://gtello.pagesp...ge.fr/mlc_f.htm

 

Some pictures for the F18A installation here:

(english) http://gtello.pagesp...e.fr/ti99_e.htm

(français) http://gtello.pagesp...e.fr/ti99_f.htm

 

Guillaume.

 

 

 

:

  • Like 2

Share this post


Link to post
Share on other sites

I have some very, very hacky support for the F18A GPU in Classic99 now... I don't know if it's actually useful to others though. It only runs one CPU at a time - ie: the real 9900 or the F18A GPU. It does mean you can single step GPU code, but it also means that unless the GPU code exits, the real 9900 never gets control back.

 

That's super hacky, but is it valuable enough to release?

Share this post


Link to post
Share on other sites

I have some very, very hacky support for the F18A GPU in Classic99 now... I don't know if it's actually useful to others though. It only runs one CPU at a time - ie: the real 9900 or the F18A GPU. It does mean you can single step GPU code, but it also means that unless the GPU code exits, the real 9900 never gets control back.

 

That's super hacky, but is it valuable enough to release?

 

Waow..! Of course that can be useful for me, if you don't release it, please send me a copy!

 

Guillaume.

Share this post


Link to post
Share on other sites

Yeah that would be useful for me too for TF support of the GPU. (I want to extend the TF assembler so that you can use it to write GPU code).

 

If you don't want to do a full release that's cool, but a copy via email would be appreciated. Hopefully I'll have my replacement laptop soon so I can ramp up again...

Share this post


Link to post
Share on other sites

There's no support for anything except the GPU and the 80 column mode (and 80 column was previously released). It's pretty hacky, so I don't want to do a formal release yet (it was a lot of code changes to just get this much, but the CPU code is a proper object now at least).

 

So... I'll drop the modified Classic99.exe here -- just drop it into your install folder. There are no options, no nothing. When the GPU is running all other aspects of the emulator are frozen, so it's main value is testing SHORT routines and single step (there is a good chance that the video display won't even update). You can NOT view the extended VDP registers nor the extended VDP memory range (but you can view the GPU R0-R15, at least, it does this by faking the WP). Finally, it does NOT repurpose any of the 9900 opcodes yet except IDLE, so if you use the extended functions (like PIX) or illegal opcodes (like LWPI), it will not do the right thing.

 

But it DOES work for that much, at least, it's a start. So if all those limitations still makes it useful, here you go! :)

 

classic99_f18-ish.zip

 

Share this post


Link to post
Share on other sites

There's no support for anything except the GPU and the 80 column mode (and 80 column was previously released). It's pretty hacky, so I don't want to do a formal release yet (it was a lot of code changes to just get this much, but the CPU code is a proper object now at least).

 

So... I'll drop the modified Classic99.exe here -- just drop it into your install folder. There are no options, no nothing. When the GPU is running all other aspects of the emulator are frozen, so it's main value is testing SHORT routines and single step (there is a good chance that the video display won't even update). You can NOT view the extended VDP registers nor the extended VDP memory range (but you can view the GPU R0-R15, at least, it does this by faking the WP). Finally, it does NOT repurpose any of the 9900 opcodes yet except IDLE, so if you use the extended functions (like PIX) or illegal opcodes (like LWPI), it will not do the right thing.

 

But it DOES work for that much, at least, it's a start. So if all those limitations still makes it useful, here you go! :)

 

classic99_f18-ish.zip

 

Thanks a lot !!

I have it on my disk. I will try some things with the GPU.

 

If you go on adding things, BML, etc... please share your work, this will be much appreciated.

 

Guillaume.

Share this post


Link to post
Share on other sites

Hi,

 

I extended MLC to support two new features from the F18A:

 

- display with 30 lines in every mode (32/40/80 columns)

 

- new extended color table

 

Some examples:

 

TEXT32 L30		 ; 32 * 30
TEXT40 XC		 ; 40*24 with extended colors
TEXT80 L30 XC	 ; 80*30 with extended colors
TEXT32		 ; standard mode, no option

 

Then, when XC option is used, you can call ATTRIB to set individually the attribute of one character.

 

Example:

 

ATTRIB $A &b000011111 ; standard display and palette 15 for "A"
ATTRIB $B &b01101100 ; swap "B" vertically and horizontally, palette 12

 

Here is my TEST program for the new functions:

 

http://youtu.be/TudlwTsrdnI

 

And the source code for that:

 

$MLC F 100 10 3000

300 S$(1)="hit a key for each step"
310 S$(2)="every char its own color"
320 S$(3)="independant horizontal swap"
330 S$(4)="independant vertical swap"
340 S$(5)="sprite over characters"
350 S$(6)="independant priority on sprite"
360 S$(7)="same with transparency"
390 CALL LINK("XCOL",S$())
400 END
$CHAR
;------------------
; char 42 defined as a solid block
; for the sprite demo
;------------------

S42.FFFFFFFFFFFFFFFF
$$
$XCOL

;------------------
; INIT screen and tables
;------------------

XREGENABLE		 ; enable extended registers access for F18A
TEXT32 L30 XC	 ; 32 columns, 30 lines, extended colors
LET M 4096		 ; start of screen image in VDP RAM in this mode
CLEAR N			 ; start of color table
FILLTABLE M 960 128 ; fills screen with spaces
FILLTABLE N 256 3 ; set all attributes to palette 3
;------------------
; write digits and upper case on screen
;------------------

LET A $0		 ; first digit
FOR I 11 20
 PUTCHAR 20 I A ; writes "0123456789" at line 20
 INC A
NEXT
LET A $A		 ; first letter
FOR I 3 28
 PUTCHAR 22 I A ; writes "ABCD...XYZ" at line 22
 INC A
NEXT

;------------------
; init some pointers
;------------------

ADD M 288		 ; points at line 10 on screen
LET U 1			 ; points to the string table in call link
;------------------
; display "hit a key for each step"
;------------------

LET S 1			 ; first string
GOSUB c		
;------------------
; set different attributes to each char
;------------------

CLEAR C			 ; first color
FOR I $0 $Z		 ; loop from first digit to last upper case
 ATTRIB I C	 ; set attribute "C" to char "I"
 inc C		 ; next color
 and C &H000F ; limit to 0-15
NEXT

LET S 2			 ; next string
GOSUB c			 ; "every char its own color"
;------------------
; swap horizontally the digits
;------------------

FOR I $0 $9
 ATTRIB I &b01001111	 ; bit for X swap and color 15
NEXT
LET S 3
GOSUB c			 ; "independant horizontal swap"

;------------------
; swap vertically the upper case letters
;------------------
FOR I $A $Z
 ATTRIB I &b00101010	 ; bit for Y swap and color 10
NEXT

LET S 4
GOSUB c			 ; independant vertical swap
;------------------
; create a sprite
;------------------

SPATTERN 1 $*	 ; "*" for sprite 1
SCOLOR 1 3		 ; green color for sprite 1
SLOCATE 1 168 1	 ; create and first position
SMAX 1			 ; only one sprite in motion
INTERRUPT		 ; set interruptions for motion
SMOTION 1 0 10	 ; moves horizontally over letters
LET S 5
GOSUB c

;------------------
; make half letters have priotity on sprite
;------------------
LET A $A
REPEAT
 ATTRIB A &b10001100 ; bit priority and color 12
 ADD A 2			 ; skip one char
 COMPARE A $Z
UNTIL>

LET S 6
GOSUB c
;------------------
; same thing but chars have transparency
;------------------

LET A $A
REPEAT
 ATTRIB A &b10011100 ; bit priority + transparency and color 12
 ADD A 2			 ; skip one char
 COMPARE A $Z
UNTIL>
LET S 7
GOSUB c

;------------------
; back to normal settings and exit
;------------------

SMAX 0				 ; no sprite in motion
SDELETE 1			 ; delete my sprite
TEXT32				 ; back to normal mode
CLEAR M				 ; new screen table
FILLTABLE M 768 128	 ; filled with spaces (=CALL CLEAR)
END					 ; back to BASIC


;------------------
; this subroutine writes a centered string at line 10
;------------------

SLABEL c
FILLTABLE M 32 128		 ; fills line 10 with spaces

GETTABLE U(S) P			 ; get string S, pointed by P (len in Z)

let C 32				 ; screen width
sub C Z					 ; minus string lenght
SHIFTRA C 1				 ; (width - len)/2 to center
DEC Z
FOR I 0 Z
 GETTABLE P(I) A		 ; get next char
 PUTCHAR 10 C A		 ; and display
 INC C				 ; next column
NEXT
KEYNEW 0
RETURN
$$
$END

 

Guillaume.

Edited by moulinaie
  • Like 1

Share this post


Link to post
Share on other sites

Oh wow! That's super impressive! It's great to see the F18 being put through its paces!

Share this post


Link to post
Share on other sites

Pretty cool. Looks like some of the many tests I wrote while verifying the F18A functionality. I think I need to look into making some videos like that (I have never messed with YouTube other than as an observer).

Share this post


Link to post
Share on other sites

Hello,

 

The support for multicolor mode from Extended Basic in MLC is done.

Not yet related to the F18A, but then I will add the extended multicolor mode with the Line30 option that will bring a 64x60 display instead of 64x48.

 

Three new instructions:

 

MULTICOLOR	 to get the new mode
MCPLOT x y c	 to plot a pixel at x,y in color c
x from 0 to 63
y from 0 to 47
c from 0 to 15
MCDRAWTO x y c to draw a line in color c

 

Here is my test program (video on Youtube):

 

 

And the source code:

 

$MLC F 100 10 3000
300 CALL LINK("MULTIC")
310 CALL CLEAR
320 PRINT "Back to Basic, THAT's ALL!"
330 END
$MULTIC
XPATTERN 2		 ; move pattern table to address >1000
MULTICOLOR		 ; multicolor mode
LET M &h1000	 ; base address for patterns
;--------------------------
; First demo: MCPLOT
; plot random pixels with symetry
;--------------------------
FILLTABLE M 1536 0 ; clear all patterns!
REPEAT
 RND		 ; RND always returns the value in Z
 AND Z 31
 LET X Z	 ; X position = RND from 0 to 31
 RND
 DIV Z 24
 LET Y Z	 ; Y position = RND from 0 to 23
 RND
 AND Z 15 ; Z color = RND from 0 to 15
 MCPLOT (X,Y) Z ; up left
 LET A 63
 SUB A X
 MCPLOT (A,Y) Z ; up right
 LET B 47
 SUB B Y
 MCPLOT (X,B) Z ; down left
 MCPLOT (A,B) Z ; down right
 KEY 0
UNTIL>=
;---------------------------
; Second demo: one little line to verify correct plotting
;---------------------------
FILLTABLE M 1536 &h22 ; fill screen with color 3 (2+1), green
FOR I 0 15
 MCPLOT (I,I) I	 ; plots a diagonal in 16 colors
 KEYNEW 0		 ; wait between each plot
NEXT
;----------------------------
; Third demo: MCDRAWTO
; fill screen with color lines
;----------------------------
FILLTABLE M 1536 0	 ; clear screen
CLEAR C				 ; first color is zero
REPEAT
 FOR Y 0 47			 ; 48 lines
	 MCPLOT (0,0) C	 ; plot up left
	 MCDRAWTO (63,Y) C ; draw to a pixel on the last column
	 INC C			 ; next color
	 AND C &h000F	 ; cycle in 0-15 only
 NEXT
 FOR Y 1 47			 ; 47 lines
	 MCPLOT (63,47) C ; plot down right
	 MCDRAWTO (0,Y) C ; draw to a pixel on the first column
	 INC C
	 AND C &h000F
 NEXT
 KEY 0				 ; wait until key
UNTIL>=
;---------------------------
; last demo: SINE curve
;---------------------------
FILLTABLE M 1536 0
MCPLOT (0,24) 1
MCDRAWTO (63,24) 1		 ; X axis in black
MCPLOT (32,0) 1
MCDRAWTO (32,47) 1		 ; Y axis in black
FARRAY 0				 ; special zone, reserve some floats
FLOAT 1					 ; R0 = 1
FATN					 ; R0 = ATN(1) = PI/4
FMOVE 0 1				 ; R1 = PI/4
FLOAT 8					 ; R0 = 8
FDIV					 ; R0 = PI/4 / 8 = PI/32
FMOVE 0 2				 ; saves PI/32 in R2
FLOAT -47
FMOVE 0 1				 ; R1 = -47
FLOAT 2
FDIV					 ; R0 = -47/2
FMOVE 0 3				 ; saves -47/2 in R3
LET Q 2
LET C 1
REPEAT
 MCPLOT (0,24) C		 ; first pixel
 FOR X 1 63
	 FLOAT X			 ; R0 = X
	 FMOVE 2 1		 ; R1 = PI/32
	 FMUL			 ; R0 = X*PI/32 (if 0<X<63 then 0<R0<2PI)
	 FSIN			 ; R0=Y=SIN(X) in radians
	 FMOVE 0 1
	 FLOAT 1
	 FSUB			 ; Y-1
	 FMOVE 3 1
	 FMUL			 ; -47/2*(Y-1) turns value -1<Y<1 into 0<Y<47 for plotting
	 INTEGER Y		 ; get Y in integer
	 MCDRAWTO (X,Y) C ; and plots
 NEXT
 INC C				 ; next color
 AND C 15
 KEY 0
UNTIL>=
	
;---------------------------
; return to XBASIC
;---------------------------
XPATTERN 0			 ; patterns back to address zero
TEXT32				 ; mode TEXT 32*24
$$
$END

 

Guillaume.

Edited by moulinaie
  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...