Tunguska the ternary emulator

Balanced Ternary Numeral System - forum was moved from http://ternary.info

Moderator: haqreu

eudoxie
Maniac
Posts: 277
Joined: 17 Sep 2012 13:36
Location: 81.170.128.52

Re: Tunguska the ternary emulator

Post by eudoxie »

Everything but gtkui should build properly. You could either install gtksourceview, or change


all: tunguska tg_assembler tunguska-gtk

to

all: tunguska tg_assembler

in the tunguska_sources Makefile.


I haven't really worked on the GTK UI since last winter, though, and it's not really a lot to see. And between Tunguska II and various other stuff I'm working on, the GTK avenue is pretty much on ice at the moment.
I took it from here in source code
http://ftp.acc.umu.se/pub/gnome/sources ... eview/2.0/
Heh, that server is less than a kilometer from where I live...
User avatar
Shaos
Admin
Posts: 24086
Joined: 08 Jan 2003 23:22
Location: Silicon Valley

Re: Tunguska the ternary emulator

Post by Shaos »

First fix for tunguska_3cc:

Code: Select all

diff -r1.7 Makefile
13a14,15
> lex.yy.o: dosp
> 	$(CXX) $(CXXFLAGS)   -c -o $@ lex.yy.cc
eudoxie
Maniac
Posts: 277
Joined: 17 Sep 2012 13:36
Location: 81.170.128.52

Re: Tunguska the ternary emulator

Post by eudoxie »

Looks fine.

I really don't have the time to maintain the main Tunguska branch at the moment, so if you want to upload smaller patches to the CVS, you can do so without asking.
User avatar
Shaos
Admin
Posts: 24086
Joined: 08 Jan 2003 23:22
Location: Silicon Valley

Re: Tunguska the ternary emulator

Post by Shaos »

eudoxie wrote: Looks fine.

I really don't have the time to maintain the main Tunguska branch at the moment, so if you want to upload smaller patches to the CVS, you can do so without asking.
OK, thanks again!
User avatar
Shaos
Admin
Posts: 24086
Joined: 08 Jan 2003 23:22
Location: Silicon Valley

Re: Tunguska the ternary emulator

Post by Shaos »

I took it from here in source code
http://ftp.acc.umu.se/pub/gnome/sources ... eview/2.0/
Heh, that server is less than a kilometer from where I live...
That's funny :)
I got there from http://gtksourceview.sourceforge.net/downloads.html where it's named "GNOME FTP server" :)

P.S. This is my "black little-endian/big-endian combine" where PC (Intel Core 2 Duo 2.6 GHz with Slackware-12.2) and Mac (PowerPC G4 450 MHz with Debian 5.0) are connected to one monitor and one keyboard/mouse (through KVM) to make porting process easier:
Image
User avatar
Shaos
Admin
Posts: 24086
Joined: 08 Jan 2003 23:22
Location: Silicon Valley

Re: Tunguska the ternary emulator

Post by Shaos »

eudoxie wrote: Looks fine.

I really don't have the time to maintain the main Tunguska branch at the moment, so if you want to upload smaller patches to the CVS, you can do so without asking.
I did a few small changes to unify working with Tunguska apps (common share_dir.h for tunguska and tunguska_gtk, some appnames changed in Makefiles as tunguska_3cc instead of 3cc and path to apps)

P.S. Also I may suggest to add file version.h with version number of Tunguska to share it between applications to display.

P.P.S. I don't like hardcoded paths to asm like "../../tunguska_image_memory_sources" in tunguska_gtk, but I don't know better solution yet...
User avatar
Shaos
Admin
Posts: 24086
Joined: 08 Jan 2003 23:22
Location: Silicon Valley

Re: Tunguska the ternary emulator

Post by Shaos »

Last change (Added event based peripheral updating as opposed to checking if memory registers have changed after every single instruction) was done after releasing version 0.5. Do you plan to release version 0.6?
eudoxie
Maniac
Posts: 277
Joined: 17 Sep 2012 13:36
Location: 81.170.128.52

Re: Tunguska the ternary emulator

Post by eudoxie »

I wanted to wait for more changes until release, since there really isn't a terribly big difference between current CVS and 0.5. The main benefit from event driven peripherals is to makes programming easier. The end user won't benefit from it a whole lot.

I suppose we could push these new additions as 0.5.1 or something.

What I've been meaning to do is merge the new Tunguska II algorithms back into the Tunguska I implementation, to clean that up a bit (it's full of premature optimizations and ugliness at the moment). But that's quite a lot of work, and would most likely entail an overhaul of the entire tryte and trit classes.


--edit--

Another outstanding issue is the inconsistent speed at which Tunguska runs. There should be a delay somewhere that makes it pause for some time every 1,000 or 10,000 or so instructions so that on average, it runs at a consistent speed.
User avatar
Shaos
Admin
Posts: 24086
Joined: 08 Jan 2003 23:22
Location: Silicon Valley

Re: Tunguska the ternary emulator

Post by Shaos »

For now I plan to clean compilation warnings and to try make it working on big-endian systems...
User avatar
Shaos
Admin
Posts: 24086
Joined: 08 Jan 2003 23:22
Location: Silicon Valley

Re: Tunguska the ternary emulator

Post by Shaos »

eudoxie wrote: I wanted to wait for more changes until release, since there really isn't a terribly big difference between current CVS and 0.5.
Don't you think GTK debugger is a BIG change? ;)
eudoxie
Maniac
Posts: 277
Joined: 17 Sep 2012 13:36
Location: 81.170.128.52

Re: Tunguska the ternary emulator

Post by eudoxie »

Sure it's big, but it isn't any where near ready. Large chunks of the functionality are still missing, and it's broken outside of Slackware.
User avatar
Shaos
Admin
Posts: 24086
Joined: 08 Jan 2003 23:22
Location: Silicon Valley

Re: Tunguska the ternary emulator

Post by Shaos »

eudoxie wrote: Sure it's big, but it isn't any where near ready. Large chunks of the functionality are still missing, and it's broken outside of Slackware.
Really? Do you have some kind of TODO/BUGS list to look at?
eudoxie
Maniac
Posts: 277
Joined: 17 Sep 2012 13:36
Location: 81.170.128.52

Re: Tunguska the ternary emulator

Post by eudoxie »

I managed to fix gtkui to build properly on my system. It turned out it was my system that wasn't configured properly

No formal TODO/BUGS list, but I guess it would be a good idea to start one now that I'm not working alone.

Of the top of my head, the outstanding issues to deal with are the following:

Code: Select all

* Complete GTK+ UI:
  o A build system is partially implemented and necessary.
    The partial implementation is insecure as well. Since 
    there is no configuration utility, it needs to launch
    the assembler/compiler using $PATH, which clearly is
    a terrible security practice.
  o File management (is the user editing an assembly file, 
    a 3cc file; what syntax highlighting to use?) is
     missing.
  o Create syntax files for the gtksourceview.
  o [d]The memory inspector doesn't always use fixed width fonts.[/d]
  o More?
* Tunguska:
  o The uneven run-speed need to be fixed with scheduled delays.
  o The tryte and trit classes needs an overhaul. The design is appalling.
  o [d]symbols.bmp has an error in it, so "Z" is backwards.[/d] It hasn't been fixed because:
  o the whole text system is in need of an overhaul.
    A better character map is necessary than the current
    one. Should probably move to use SDL_gfx and it's built
    in bitmap fonts instead (that way I don't have to 
    painstakingly hand-draw any more symbols). 
  o Portability issues. 
  o There's always bit rot where newer versions of gcc/glib/whatever doesn't compile properly.
* 3cc:
  o If the character map in tunguska is updated, this need to be changed too. 
* Aassembler:
  o If the character map in tunguska is updated, this need to be changed too. 
I [d]striked[/d] some stuff. I know what the problem is, and I'll fix them as soon as I have access to a computer I trust.

I think this can roughly be thought of a roadmap to Tunguska 1.0.
User avatar
Shaos
Admin
Posts: 24086
Joined: 08 Jan 2003 23:22
Location: Silicon Valley

Re: Tunguska the ternary emulator

Post by Shaos »

Shaos wrote: P.S. This is my "black little-endian/big-endian combine" where PC (Intel Core 2 Duo 2.6 GHz with Slackware-12.2) and Mac (PowerPC G4 450 MHz with Debian 5.0) are connected to one monitor and one keyboard/mouse (through KVM) to make porting process easier
Final location:

Image
eudoxie
Maniac
Posts: 277
Joined: 17 Sep 2012 13:36
Location: 81.170.128.52

Re: Tunguska the ternary emulator

Post by eudoxie »

Nice :-)