debrouxl / gcc4ti

GCC4TI is a complete and mature GPL SDK for the TI-89, TI-89T, TI-92+ and TI-V200 (collectively known as TI-68k) calculators in the C and ASM languages.
https://github.com/debrouxl/gcc4ti
Other
86 stars 16 forks source link

Add back Virtual TI support as an option. #12

Closed Jonson26 closed 4 years ago

Jonson26 commented 4 years ago

Since TiEmu Straight up refuses to work on Windows 10 it would be nice to have this option back. (I tested VTI and it works perfectly fine.)

debrouxl commented 4 years ago

Well, VTI support was one of the things we added back to GCC4TI before the first public release, because it was the right thing to do at the time and it's an even better thing now: https://github.com/debrouxl/gcc4ti/commit/07c2e16f86a168c2a8fd1aefff853bf9336129dd ... Therefore, we need to find out why doesn't this option show up for you :)

Jonson26 commented 4 years ago

My bad, I just couldn't find the config. Thanks a lot. Now it works like a charm! :-)

debrouxl commented 4 years ago

Great. You're welcome :)

As long as one's aware of the well-documented accuracy limitations and bugs of VTI, and not trying to do precisely one of the fairly numerous things which are not emulated by VTI (and whose lack of emulation by VTI can make developers inadvertently believe that some programs which simply crash real calculators work), it's possible to work with VTI. Old-timers did exactly that for years, before TIEmu became usable.

FTR, VTI basically emulates only HW1 89 and HW1 92+ with a sprinkling of HW2. No HW2+ hardware execution protection (so don't try to debug your own program launcher with VTI, friends don't let friends do that), no V200 support, no 89T support. There are also several bugs and limitations in the emulation of the 68000 processor itself. The three best-known ones are used by HW3Patch's to try and prevent the really inexperienced developers from looking inside HW3Patch's operation, but that can't stop any remotely competent developer. Namely, the nonexistent bits in SR, "garbage in - garbage out" on NBCD, and the lack of 68000 pipeline emulation which can show up in some twisted SMC basically never used in practice.

Last but not least: I strongly recommend using the versions of VTI improved by Julien "JM" Muchembled instead of Rusty Wagner's original version :) The only limitation with some versions of JM's version was an unwanted interaction between some features, IIRC some breakpoints and savestates, which could corrupt savestates. It didn't affect me because I didn't use savestates much, but watch out.

Jonson26 commented 4 years ago

Well, right now I'm planning to only use the high-end features such as the screen or the keyboard. ;-) TBH I don't plan on even touching stuff like greyscale for a while. As for Julien's version: I can't find it on ticalc, could you give me some directions? (And I didn't even know VTI had savestates, so...)

debrouxl commented 4 years ago

Oh, indeed, the sites from which JM's modified version could be downloaded seem to have disappeared quite a number of years ago, without being completely archived by e.g. archive.org ... Therefore, I have re-uploaded my copies of the binaries from 2001 at http://ti-pla.net/a2620821 (safer version in which breakpoints do not interfere with save states) and http://ti-pla.net/a2620822 (more featureful but buggy version). Once again, third-party re-hosting of useful content proves to be useful.

kkofler commented 2 years ago

Since TiEmu Straight up refuses to work on Windows 10

Isn't that the real problem you want to get fixed instead?

Virtual TI is an emulator that has not been updated for ages. There is not even a usable IPC interface to send files to it or run commands in it, the GCC4TI IDE (and old versions of the TIGCC IDE whose code the GCC4TI IDE resurrected) does it by sending fake keypresses. And as @debrouxl has already mentioned, it does not emulate any current hardware, nor does it accurately emulate even old hardware.

Virtual TI also has no support for debugging C programs. You can only run them, but not set any breakpoints, single-step in them, etc. (Well, you can at assembly level if you know what you are doing, but neither Virtual TI itself nor GCC4TI have any functionality for making it easier for you. You do not even see named labels in the disassembly.) The GDB-enabled TiEmu builds (TiEmu+GDB) support all this (even as far as showing labels from C code in the disassembly, though you do not even need to look at the assembly to debug your C code with it).

The Virtual TI builds by JM are slightly less outdated, but also add more bugs, in particular: general instability (IIRC, they just hang up at seemingly random times, especially when using the debugger) and a completely broken UI (with overlapping widgets) when using any DPI setting other than the default (the "Large Fonts" setting as it is or used to be called in Windows).

(And finally, Virtual TI also does not support any other operating system than Windows, though you might not care about that particular limitation.)

kkofler commented 2 years ago

For the record, earlier this year (2021-03-19), a Windows user reported success with the combination (suggested by me) of:

The first link is an old enough GTK+ for TiEmu to definitely run with it, the second link is the last GDB-enabled build of TiEmu. (@debrouxl has released only a version built without GDB, which is much less useful for C developers because you cannot debug C programs with it. And it was just a single release, 3.03, I cannot find any newer one. So you are better off with my 3.02a build.)