Author |
Message |
Mac Buster
Retired
Joined: 03 Aug 2003 22:37 Posts: 1474 Location: Moscow
|
Here is code for my first simple program for Tunguska It just fills screen with pixels of different colors, kind of simple colours test table.
P.S. Raster mode isn't so fast
|
29 Feb 2008 16:52 |
|
|
Mac Buster
Retired
Joined: 03 Aug 2003 22:37 Posts: 1474 Location: Moscow
|
Could you please add something to redirect text mode output to a regular text file ? Will be very useful for testing arithmetics functions.
|
29 Feb 2008 16:55 |
|
|
eudoxie
Maniac
Joined: 17 Sep 2012 13:36 Posts: 277 Location: 81.170.128.52
|
--edit-- browser crashed and made two identical posts.
|
01 Mar 2008 03:36 |
|
|
eudoxie
Maniac
Joined: 17 Sep 2012 13:36 Posts: 277 Location: 81.170.128.52
|
Glad you got it working... Yeah, I know. It would be possible to add more raster modes at the same resolution but with fewer colors (I'm thinking three and nine colors, 18 and 36 memory pages respectively). This would probably amp up the drawing speed quite significantly (at those modes, anyways). For the nine color mode, it would probably be possible to use some sort of palette mechanism to allow for a wider range of colors.
I guess I could add functionality to the Print Screen button, so that it when it is pressed, the screen contents are written to the terminal (much like the original functionality of Print Screen button)
|
01 Mar 2008 03:39 |
|
|
Shaos
Admin
Joined: 08 Jan 2003 23:22 Posts: 22543 Location: Silicon Valley
|
This version uses /usr/local/bin
In CYGWIN it's configured, but not compiled - can't find SDL includes...
|
01 Mar 2008 05:51 |
|
|
eudoxie
Maniac
Joined: 17 Sep 2012 13:36 Posts: 277 Location: 81.170.128.52
|
Cygwin is a special case I guess. For now, if you want to build ports, just use the CVS makefile (it seems to work, no?)
I added two new instructions to the CVS: BLS and BLT. They do page manipulation, so you can copy or set entire pages with one instruction. (Which is very useful in raster mode, since basically all the "slowness" isn't so much the screen drawing functions, but Tunguska itself not being able to process instructions fast enough)
I also added 3 color monochrome graphics as I discussed earlier.
--
I'm working on an experimental bitmap-based UI for tunguska to make it a little more inviting and easy to use. The light gray bars around the screen indicate where the raster-mode screen ends.
It's not in CVS yet, because I can't decide if I like it or not. There's something off about it, but I can't quite put my finger on it...
|
01 Mar 2008 06:36 |
|
|
Shaos
Admin
Joined: 08 Jan 2003 23:22 Posts: 22543 Location: Silicon Valley
|
Yes, it works. Another "unofficial" build for Windows is ready:
http://nedopc.org/ternary/tunguska/tung ... _1-win.zip (1.3M)
It includes colors.asm with bat-files for compilation and launching
Last edited by Shaos on 11 Nov 2012 17:40, edited 1 time in total.
|
01 Mar 2008 16:24 |
|
|
Mac Buster
Retired
Joined: 03 Aug 2003 22:37 Posts: 1474 Location: Moscow
|
I wrote yet another variation of color test for Tunguska. This one cyclicaly fill raster lines with a color. Looks like animation
|
02 Mar 2008 15:20 |
|
|
Mac Buster
Retired
Joined: 03 Aug 2003 22:37 Posts: 1474 Location: Moscow
|
What about raster graphics oriented instructions ? These ones might be very useful:
- copy to and from a raster line
- fill a raster line with a color
- perform logical operation with whole or part of raster line and data in general memory
|
02 Mar 2008 15:26 |
|
|
eudoxie
Maniac
Joined: 17 Sep 2012 13:36 Posts: 277 Location: 81.170.128.52
|
I don't think it's doable with the current addressing modes. It requires more arguments than operations can handle.
It could possibly be doable through hardware pseudo-instructions, like how the floppy-disk interface is implemented.
|
03 Mar 2008 05:22 |
|
|
Mac Buster
Retired
Joined: 03 Aug 2003 22:37 Posts: 1474 Location: Moscow
|
Well, it can be command or hardware feature as well.
P.S. In case of hardware feature it will reming me Amiga Copper custom chip that used to fill screen buffer according to data from special area called "copper list"
|
03 Mar 2008 05:33 |
|
|
eudoxie
Maniac
Joined: 17 Sep 2012 13:36 Posts: 277 Location: 81.170.128.52
|
I'm thinking it might be possible to design something like an auxiliary "coprocessor" to handle more advanced instructions, with 3 12 trit wide I/O "registers" in system memory.
Something like this:
DDD:DD0 OP
DDD:DD1/2 R1
DDD:DD3/4 R2
DDD:DCD/C R3
Then you set R1-R3 with appropriate values, and OP to the relevant operation code. You could have it do half-precision floating point arithmetics, advanced memory block operations, etc. Yeah, I'm liking the idea...
--edit--
I implemented part of this idea, and it seems to work pretty fine. Only implemented floating point arithmetics so far, but it seems to work pretty good.
|
03 Mar 2008 07:56 |
|
|
Mac Buster
Retired
Joined: 03 Aug 2003 22:37 Posts: 1474 Location: Moscow
|
Great thing! So now you probably have to move BLS and BLT from CPU command set to commands of that GPU (assuming auxiliary "coprocessor" as General data Processing Unit), right ?
|
03 Mar 2008 16:05 |
|
|
eudoxie
Maniac
Joined: 17 Sep 2012 13:36 Posts: 277 Location: 81.170.128.52
|
I don't know, I might rename them to "PGS" and "PGT". They'll have significantly less overhead than the coprocoessor operations.
Compare:
LDA #0
STA R1+1
STA R2+1
LDA #page1
STX R1
LDA #page2
STX R2
LDA #0
STA R3
LDA #%444
STA R3+1
LDA #operation
STA COOP
With
LDA #page2
PGT #page1
--edit--
Just found a way of optimizing tunguska so that it runs almost twice as fast. Before I got about 500,000 operations per second, now I get just south of 1,000,000
|
04 Mar 2008 15:34 |
|
|
Mac Buster
Retired
Joined: 03 Aug 2003 22:37 Posts: 1474 Location: Moscow
|
Wow! Very impressive
|
05 Mar 2008 15:32 |
|
|