nedoPC.org

Community of electronics hobbyists established in 2002

...
Atom Feed | View unanswered posts | View active topics It is currently 14 Aug 2018 19:28



Reply to topic  [ 273 posts ]  Go to page Previous  1 ... 12, 13, 14, 15, 16, 17, 18, 19  Next
[Ternary] Tunguska the ternary emulator 
Author Message
Maniac

Joined: 17 Sep 2012 14:36
Posts: 277
Location: 81.170.128.52
Reply with quote
I just uploaded the GTK code to the CVS. I didn't want to risk a hard drive breakdown or something undoing all my work. It's not remotely workable at the moment though.

Oh, and Tunguska is a year old now. It's 15,558 lines of code now. I think that is pretty decent for a hobby project.


20 Dec 2008 17:39
Profile
Retired

Joined: 03 Aug 2003 23:37
Posts: 1481
Location: Moscow
Reply with quote
Yes, very good progress for one year :) Thank you!


22 Dec 2008 02:40
Profile
Maniac

Joined: 17 Sep 2012 14:36
Posts: 277
Location: 81.170.128.52
Reply with quote
I haven't had a lot of time to work on Tunguska lately, but I have added a new feature to the CVS today (which is really to make both the transfer to faster integer based internal logic, and the GTK interface easier to implement): Change hooks to memory cells.

Previously, every device (the screen and so on) had to scan their memory range after every instruction to see if the data has changed, but now the trytes themselves will tell their respective peripherals that they have changed.


18 Mar 2009 14:43
Profile
Maniac

Joined: 17 Sep 2012 14:36
Posts: 277
Location: 81.170.128.52
Reply with quote
I should have done this a long time ago, but I just added much needed malloc() and free() functions to the 3cc memory image. So you can now take advantage of dynamic memory allocation! You can make linked lists, and trees, and all sorts of things!

They are pretty crude, and can only allocate a maximum of 1000 chunks at 27 words each at the moment, but... it works!

I may change the chunk size and count later (probably up to 10,000 or something, since that's approximately 40% of the addressable memory, which seems a fair number)


21 Mar 2009 08:42
Profile
Maniac

Joined: 17 Sep 2012 14:36
Posts: 277
Location: 81.170.128.52
Reply with quote
I've been working a little on the 3CC memory image for Tunguska. I've added basic disk I/O now, and I'm working on a very simple file system loosely based on the one used in RT-11 (neither are in the CVS yet).

Other features I'm planning are:
A DEBUG command like the one in DOS (that can display memory and process assembly directly in the memory)
File management commands (when the file system is done, obviously)
A simple BASIC interpreter to replace the command prompt


03 Apr 2009 12:55
Profile
Retired

Joined: 03 Aug 2003 23:37
Posts: 1481
Location: Moscow
Reply with quote
Once again - very good news! :) Could you please explain me how can I connect to CVS from Ubuntu? I've got it installed into VirtualBox in Windows now.


06 Apr 2009 02:25
Profile
Maniac

Joined: 17 Sep 2012 14:36
Posts: 277
Location: 81.170.128.52
Reply with quote
I don't know how detailed help you need.

Create a folder somewhere you want to build Tunguska, and create a text file called Makefile, and copy the following lines into it:

Code:
TARGETS=tunguska_sources tunguska_3cc tunguska_memory_image_sources memory_image_3cc
all: co
co:
        cvs -d:pserver:anonymous@tunguska.cvs.sourceforge.net:/cvsroot/tunguska login
        cvs -z3 -d:pserver:anonymous@tunguska.cvs.sourceforge.net:/cvsroot/tunguska co -P $(TARGETS)

build:
        make -C tunguska_3cc clean all
        make -C tunguska_sources clean all
        make -C memory_image_3cc clean all


Then you open a console (or terminal or whatever they're called), go to this directory, and run "make co build"

And it will check out and build the source tree. It may ask you for a password at some point, but it's safe to just press enter.


----

Heh, I just downloaded the CVS onto my old laptop. It runs a pretty old version of slackware, so I had to really coerce it into compiling at all, and it's so slow I only get about 100 thousand operations per second (I can get almost 3,000 on my workstation)


06 Apr 2009 12:35
Profile
Maniac

Joined: 17 Sep 2012 14:36
Posts: 277
Location: 81.170.128.52
Reply with quote
I've completed the experiment with all host integer logic in Tunguska, and it turned out to be a failure.

The current mode of operation is faster. It may still be possible to use some of the algorithms to fix the bottlenecks in the current implementation though.


17 Apr 2009 04:21
Profile
Retired

Joined: 03 Aug 2003 23:37
Posts: 1481
Location: Moscow
Reply with quote
Well, negative experience is very important too :) Now you know what way does not make code faster.


18 Apr 2009 11:12
Profile
Maniac

Joined: 17 Sep 2012 14:36
Posts: 277
Location: 81.170.128.52
Reply with quote
It's still a theoretically interesting concept, since it is much denser than array coded ternary arithmetic.

To code a n wide word in regular binary, you require 2*n bits. But the host integer method only requires n*log(3)/log(2) bits (rounded up).

So, to represent 20 ternary digits with the regular algorithms, you need 40 bits, but with the host integer method you only need 32.


19 Apr 2009 15:10
Profile
Maniac

Joined: 17 Sep 2012 14:36
Posts: 277
Location: 81.170.128.52
Reply with quote
I'm seriously considering a major overhaul of the core code of Tunguska. It would be largely backwards-compatible with current Tunguska assembly code (and thus also 3CC code), but use 9 digits per word instead of 6, and add more instructions and address modes.

There are fundamental problems with Tunguska as it is right now. Most of them stem from how it was written completely ad-hoc, with no real aim or sense of direction. It is therefore poorly modularized, impossible to fork, really difficult to modify, etc. It superficially looks somewhat neat, but it really is quite a mess.


12 Jun 2009 12:57
Profile
Admin
User avatar

Joined: 09 Jan 2003 00:22
Posts: 16824
Location: Colorado
Reply with quote
Do you plan to keep OLD Tunguska in "frozen" state like Tunguska-1 and develop NEW Tunguska as Tunguska-2? I still want to do something interesting with "old good" Tunguska ;)


13 Jun 2009 13:09
Profile WWW
Maniac

Joined: 17 Sep 2012 14:36
Posts: 277
Location: 81.170.128.52
Reply with quote
Yeah, that's how I had it planned.

Classic Tunguska a working and pretty stable system, so it doesn't make sense to throw all that work away to start over with new bugs and instabilities.


13 Jun 2009 14:37
Profile
Admin
User avatar

Joined: 09 Jan 2003 00:22
Posts: 16824
Location: Colorado
Reply with quote
I got last sources, but it failed to compile - it looks like it requires "gtksourceview-2.0", that my Slackware-12.2 doesn't have...


08 Aug 2009 18:18
Profile WWW
Admin
User avatar

Joined: 09 Jan 2003 00:22
Posts: 16824
Location: Colorado
Reply with quote
Shaos wrote:
I got last sources, but it failed to compile - it looks like it requires "gtksourceview-2.0", that my Slackware-12.2 doesn't have...


I took it from here in source code
http://ftp.acc.umu.se/pub/gnome/sources ... eview/2.0/


08 Aug 2009 18:24
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 273 posts ]  Go to page Previous  1 ... 12, 13, 14, 15, 16, 17, 18, 19  Next

Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.