Advertisement
Advertisement
β‘ Community Insights
Discussion Sentiment
60% Positive
Analyzed from 403 words in the discussion.
Trending Topics
#cflags#bin#https#usr#local#uses#set#table#run#bit
Discussion Sentiment
Analyzed from 403 words in the discussion.
Trending Topics
Discussion (5 Comments)Read Original on HackerNews
https://notes.eatonphil.com/exploring-plpgsql-forth-like.htm...
I give that an A+ for perseverance, but I would have hoped to see something that uses the strengths of SQL more.
For example, there could be a table with the decode ROM (https://www.cpcwiki.eu/index.php/MOS_6502#The_Decode_ROM_.28...) that could be used to drive the logic.
Have a main loop that uses the inputs of that ROM to look up the output bits and update a table, and add triggers that handle each βmicro-opβ. A SQL engine could run those triggers in parallel until they hit a race condition, but those can be avoided a bit by having separate tables for each register.
Even better would be if there were tables with every logic gate and wire in the original CPU, using a trigger to move the signals around. That would be a good test of the trigger handling in a SQL engine.
https://t3x.org/t3x/0/sim65kit.html
https://t3x.org/kimuno/
Pocket calc as 6502 code
https://t3x.org/kimuno/kimcalc.html
T3x0 compiler to build the emulator:
https://t3x.org/t3x/0/index.html
I've got to run under OpenBSD/i386 but it needs a bit of tweaks in the Makefile. On the target section:
Do the same in the bin/tx0.sh and bin/build.sh just in case. In my system I set the target to unix-386, and T3XDIR it's set to T3XDIR=/usr/local/t3x/lib in the Makefile and bin/tx0.sh scripts.Also, T3XBIN it's set to BINDIR= /usr/local/t3x/bin
Then I ran:
But it was still broken. Then, I edited /usr/local/t3x/bin/tx0 and setTX3DIR is above, and ditto with the four CFLAGS flags I posted.
Just the ones at lines 38-42.
OFC set PATH to /usr/local/t3x0/bin:$PATH in ~/.profile:
Yeah, it's tricky, but from now on everything will just compile with where 'foo' it's a foo.t file.This was compiled under an Atom n270 CPU based netbook. I think the author uses a Pentium III machine. If T3X0 can do a MOS 6502 emulation that well, you can try expanding s65/sim65 to cover the Apple I emulation.
And, as a plus, it might run fast on DOS 386 machines if s65/sim65 it's compiled a native binary.