nedoPC.org

Community of electronics hobbyists established in 2002

...
Atom Feed | View unanswered posts | View active topics It is currently 28 May 2020 10:02



Reply to topic  [ 4 posts ] 
cpu3502: a 5-trit balanced ternary cpu 
Author Message
Senior
User avatar

Joined: 04 Jan 2016 10:15
Posts: 142
Location: Russia, S.- Peterburg
Reply with quote
Assembler, disassembler, and emulator, with operations largely inspired by the 8-bit MOS 6502 CPU, adapted for ternary.

1. https://github.com/thirdcoder/cpu3502.git

Quote:
A 5-trit balanced ternary central processing unit simulator
Build Status npm version
Includes an assembler, disassembler, and emulator, with operations largely inspired by the 8-bit MOS 6502 CPU, adapted for ternary.


2. https://github.com/thirdcoder/tritmapped-terminal.git

Quote:
Tricolor tritmapped 45x28 character 9x14 terminal display


3. https://libraries.io/github/thirdcoder/cpu3502

Quote:
Includes an assembler, disassembler, and emulator, with operations largely inspired by the 8-bit MOS 6502 CPU, adapted for ternary.
Run npm test and examine test.js for example usage and supported functionality.
Dependencies


4. Онлайн запуск виртуального троичного процессора cpu3502 http://thirdcoder.github.io/tca5


Attachments:
File comment: tca5
A 5-trit computer system emulator

CPU: 3502
Video: tritmapped-terminal
Audio: memory-mapped beeper
Timer: interrupt-based programmable frequency
To use, run npm start or try the live demo.

cpu3502_ter.png
cpu3502_ter.png [ 29.5 KiB | Viewed 1285 times ]

_________________
"Где просто, там ангелов со сто, а где мудрено, там ни одного" (С)
20 Nov 2018 03:46
Profile WWW
Senior
User avatar

Joined: 04 Jan 2016 10:15
Posts: 142
Location: Russia, S.- Peterburg
Reply with quote
Визуальное представление тритов

https://github.com/thirdcoder/tritmapped-canvas

Quote:
Displays a visual representation of balanced-ternary using three colors (trichromatic, comparable to monochrome on binary systems, but with red/black/green instead of black/white). The display is "tritmapped" (comparable to bitmapped), meaning each trit (base 3 digit) represents a pixel.


Посмотреть онлайн - http://thirdcoder.github.io/tritmapped-canvas/


Attachments:
color_trit.png
color_trit.png [ 108.19 KiB | Viewed 1281 times ]

_________________
"Где просто, там ангелов со сто, а где мудрено, там ни одного" (С)
20 Nov 2018 13:16
Profile WWW
Senior
User avatar

Joined: 04 Jan 2016 10:15
Posts: 142
Location: Russia, S.- Peterburg
Reply with quote
Тест эмулятора троичного процессора cpu3502

Quote:
A 5-trit balanced ternary central processing unit simulator
Build Status npm version
Includes an assembler, disassembler, and emulator, with operations largely inspired by the 8-bit MOS 6502 CPU, adapted for ternary.
Run npm test and examine test.js for example usage and supported functionality.


Code:
> cpu3502@1.3.0 test /home/vladimir/work_SETUN/REPO/thirdcoder/cpu3502
> babel-node test.js

TAP version 13
# halts
initial flags= undefined
XOP di.operation -39 undefined

pc= 0  opcode= -118 disasm= HALTZ
misc -39
flags: RHUVSDCIL
flags: i0 A=0(^@), X=0, Y=0
Halted with status 0
# branch instruction decoding
branch opcode=BRSNZ, flag=0/S, direction=1/N compare=0/Z
emit 101
emit 11111
assembled 1 lines into 2 trytes
{ family: 1, flag: 0, compare: 0, direction: 1 }
ok 1 should be equal
ok 2 should be equal
ok 3 should be equal
...
...
...
 'LDA #%ii1i0',
  'DNOP A',
  'DNOP #%iiiii',
  'DNOP 29524',
  'BNE #-1',
  'BEQ #+2',
  'BRDEZ #-3',
  'HALTN',
  'HALTP',
  'LDA #%1iii0',
  'STA 0',
  'PTI A',
  'TAX',
  'LDA (29282),Y',
  'LDA 29282,X',
  'LDA 29282,Y',
  'JMP 4444',
  'JSR 5555',
...
...
1..240
# tests 240
# pass  240

# ok


_________________
"Где просто, там ангелов со сто, а где мудрено, там ни одного" (С)


20 Nov 2018 13:30
Profile WWW
Admin
User avatar

Joined: 09 Jan 2003 00:22
Posts: 18585
Location: Silicon Valley
Reply with quote
Смахивает на Тунгуску:

http://tunguska.sourceforge.net/docs.html

Там тоже был сэмулирован троичный процессор по мотивам 6502 с графическим экраном...

P.S. Сам автор Тунгуски на этом форуме про неё писал: http://www.nedopc.org/forum/viewtopic.php?f=62&t=93

_________________
:eugeek: https://twitter.com/Shaos1973


10 May 2020 10:32
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 4 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.