-
-
Notifications
You must be signed in to change notification settings - Fork 488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use some kind of retro fantasy CPU instead? #1007
Comments
Make a virtual machine, and have at it. |
I've started my fantasy console project exactly because tic-80 uses modern languages that kinda break immersion (there is only 64k of mem, but you can allocate 4Gb on heap if you need). So this would be a major overhaul of TIC-80 and a lot of problems with rebalancing other things around it. |
Why not just have dedicated instructions that call the different TIC-80 APIs? And have a dedicated instruction to return from a program's loop (a.k.a. a |
Well, you can, of course. But it's not how CPUs work. |
Hm, actually you can have some plausible magic instructions. |
You can have a C virtual machine with Python (or other high level language) peripherals |
To me, the thing that breaks immersion in TIC-80 is the unlimited computing power. PICO-8 specifies how many operations you are allowed in each frame, and it's a fairly low number, so games run exactly the same on a powerful desktop computer or in a web page on a mobile phone. With TIC-80, some heavy games run significantly better on desktop than on weaker platforms. If I just target desktop CPU, then it's possible to do things that are unrealistic in a retro computer. |
@nesbox seems like you're back to TIC-80, what do you think about this idea? Another issue I see about assembler / binary are the cartridge limits. 64k of LUA code can do so much more than 64k of assembler. |
I think all of these are valid points; I'd be all for having a fantasy computer that used an actual instruction set. However, that may be out of the scope of this project, as switching away from Lua would break all of the existing programs. It would be cool to see that in another project though! |
Actually, TIC-80 supports multiple languages, with Lua being the default
one if you omit the "script:" tag in the code. A "script: asm" would be the
need to switch out of Lua into assembly mode.
…On Mon, Nov 9, 2020, 4:18 PM Ray Redondo ***@***.***> wrote:
I think all of these are valid points; I'd be all for having a fantasy
computer that used an actual instruction set. However, that may be out of
the scope of this project, as switching away from Lua would break all of
the existing programs. It would be cool to see that in another project
though!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1007 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHFK2N2JTAKRSMRXVPI47RLSPCBFPANCNFSM4KSFC34A>
.
|
@Anrock I like this idea and don't see any problems to embed an assembler to TIC. |
|
|
Of course I'm sure you all have seen: |
@Anrock I spoke too soon in the other thread... sounds like nesbox is entirely onboard with the idea... you'd write assembly in the editor... and compiling assembly is a lot simpler than a whole compiler/linker toolchain for a higher level language... of course no one is stopping you from doing that outside TIC-80 and just pasting the assembly into TIC-80... and cartridges would be binary... so you'd essentially have 64kb of ROM say... Of course writing in assembly is a LOT different TIC-80 experience, but I suppose some would find it fun. :) Or perhaps you want to use a higher level language and still just be subject to those post compilation "hard limits"... one problem is that the "hard limits" you'd find (96kb total RAM) are going to be very, very, very different than the "hard limits" someone using JavaScript or Wren or Lua are going to find. IE, TIC-80 DCPU-16 would be almost an entirely different beast from TIC-80 Lua. @nesbox Is there a reason we need to design our own CPU from scratch vs using some CPU architecture already in existence? Why couldn't we just say drop in a DCPU-16 directly or some such? N/m, I think it's out because of the limit of only 64K words of "total address space"... so that's 128kb but that doesn't leave room both both the 96kb of data AND 64kb of code. So we need something with a 32-bit (or at least 18 bit) address bus... |
So are those of you asking for this wanting/expecting to write your actual cartridges in pure assembly? |
This is arbitrary decision, I believe. We can settle on canonical CPU like just as we're having LUA as canonical language, but nobody is forbidding implementation of any other CPU binary interpreter just as we have Moonscript and other languages.
Not necessarily. There are (at least) two not mutually-exclusive options here
Yes. |
This comment was specifically referring to my taking back of my "we could just use DCPU-16 [as is]"... because it's Von-Neumann. I'm aware that a Harvard architecture makes the most sense since then it gives us 64kb of addressable RAM that we could page our real 96kb memory in and out of.
You could but writing assembly that has to keep track of which 16kb segments (for example) is currently paged in or out sounds pretty annoying to me (though I guess perhaps it's old hat to some). I'm mostly used to ARM m0 and Arduino where that's not a problem I have to worry about. Doing something like a If we went Harvard we could just not think about the program code at all and have 64kb of mappable RAM, which seems like more breathing room.
No. There are no "existing cartridges" running on a fantasy CPU - thus nothing to break. I think this architecture will be quite different (in severals ways) than what the other VM runtimes are doing - and it doesn't necessarily require that the hardware they see changes one bit. IE, remapping RAM makes sense in a 64kb constrained "fantasy CPU" environment, it makes far less sense in the other scripting environments - so I'm not sure it would need to be exposed there at all - they would maintain their existing 32-bit address bus 96kb view of the world. More on this in the other thread. |
Is Lua canonical? Either way I don't think there will be a separate award for "canonical CPU"... Tic-80 is a platform with many "runtimes"... if Lua is canonical, then it is canonical period (as I think of it). If we start adding fantasy runtimes they'd just be another supported runtime, I don't think there would be a "default". Unless first becomes default just because it's first... but that doesn't mean a lot IMHO. |
I'm closing all the fantasy CPU/68000 issues I opened. I think the interest level is too low, the complexity too high, and the payoff not nearly worth it given that we can have something very similar (and much better in many ways) with WASM support - so that's where I'm focusing all my attention. If anyone else wants to pick this up and run with it in the future you can find all the threads linked above. @StinkerB06 I wonder what you think about WASM... As this isn't my issue and is the originator I will leave it open as a request. |
For those interested in playing within a far more "fantasy CPU" context, WASM support was just merged: #1772.
No CPU limits, but I'm not sure that's a direction the project is super interested in either. |
Take a look at MEG-4 Fantasy computer, which has a virtual CPU and supports ASM:
|
Using modern scripting languages for retro game design in a fantasy console is kind of cheating.
What ideas do you have for a "TIC-80 CPU"? What kind of architecture would it be based off? Would it be original? I'm not saying you should replace the Lua, JS, Wren, etc. scripting languages in TIC-80, I'm just saying adding a fantasy CPU architecture to TIC-80 with an assembler based around it would be an exciting addition.
The text was updated successfully, but these errors were encountered: