Author Topic: accel68k - a 68k Basic IDE for your 68k calculator  (Read 16465 times)

0 Members and 1 Guest are viewing this topic.

Offline blue_bear_94

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 801
  • Rating: +25/-35
  • Touhou Enthusiast / Former Troll / 68k Programmer
    • View Profile
accel68k - a 68k Basic IDE for your 68k calculator
« on: May 04, 2013, 09:24:09 pm »
Announcing accel68k - Your Future IDE for TI-89 Basic

The development will not be in full force until AP tests are over, but I'd like to give you a preview of what is happening:

- This IDE will use custom editing routines to ensure that key delays don't vex you anymore! In fact, the whole editing is overhauled in order to give a streamlined editing experience!
- It will also give a range of refactoring features, including Local consolidation.
- It will be full screen and (hopefully) use the small font as well.
- It will be a hybrid of TI-Basic and C. To be precise, the editor itself will be in C, and the frontend (file selection, switching) will be in TI-BASIC.
- It will require lots of knowledge about the EStack and the VAT, so help is appreciated!

This will be my most ambitious 68k project of all, and I will furnish you with screenshots when I get the visual interface functional.

Edit Got the skelly code for the backend attached!
Edit II New skelly code and key layout pic!
Edit III Holy shoot! That scan was huge! Now it's only 40% size.
« Last Edit: May 06, 2013, 07:56:17 pm by blue_bear_94 »
Due to dissatisfaction, I will be inactive on Omnimaga until further notice. (?? THP hasn't been much success and there's also the CE. I might possibly be here for a while.)
If you want to implore me to come back, or otherwise contact me, I can be found on GitHub (bluebear94), Twitter (@melranosF_), Reddit (/u/Fluffy8x), or e-mail (if you know my address). As a last resort, send me a PM on Cemetech (bluebear94) or join Touhou Prono (don't be fooled by the name). I've also enabled notifications for PMs on Omnimaga, but I don't advise using that since I might be banned.
Elvyna (Sunrise) 4 5%
TI-84+SE User (2.30 2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User? (1.02)
Bag  東方ぷろの

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: accel68k - a 68k Basic IDE for your 68k calculator
« Reply #1 on: May 05, 2013, 03:05:00 am »
Quote
This IDE will use custom editing routines to ensure that key delays don't vex you anymore!
FWIW, OS key delays can be easily manipulated through OSInit* functions declared in kbd.h ( http://debrouxl.github.io/gcc4ti/kbd.html ). The KerNO crash protection does it. Also, OSdequeue() + kbd_queue() are fast enough for most purposes, most TICT programs use them. TI-Chess has its own keyboard reading code, but does de-bouncing (effectively limiting the input rate to 4 or 5 keypresses per second anyway) and most of all, maybe AMS' AUTO_INT_1 handler is not called at all, making OSdequeue() + kbd_queue() inoperative.

Quote
- It will be full screen and (hopefully) use the small font as well.
You'll probably want to use fast character / string drawing routines, like the TICT eBook reader (ebook) and several others are doing.

Quote
- It will be a hybrid of TI-Basic and C.
Mixed BASIC / C execution is a world of slowness (for calling C from BASIC, as shown by the overhead of calling flib/flib2, vertel and suchlike libraries) and hurt (for calling BASIC from C, due to all the errors it can throw if something goes wrong). Some file explorers, such as TICT-Explorer, do not even attempt to provide this functionality, given how hard doing it correctly is: they just paste the invocation to the Home Screen Line and bail out.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline blue_bear_94

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 801
  • Rating: +25/-35
  • Touhou Enthusiast / Former Troll / 68k Programmer
    • View Profile
Re: accel68k - a 68k Basic IDE for your 68k calculator
« Reply #2 on: May 05, 2013, 08:48:00 am »
Well, I have decided that I will use my own keyboard layout for editing and make the user hold down modifier keys, so I'll have to kill interrupts and use direct keyboard access. And since I will only call C from BASIC (not the other way around), I'll try doing so, and if it's too slow, then I'll make the frontend C as well. (By the way, why would this happen?)
By the way, where are the fast drawing routines?

P. S. I've never heard of the OSInit functions. Thank you for telling me that!
« Last Edit: May 05, 2013, 08:55:28 am by blue_bear_94 »
Due to dissatisfaction, I will be inactive on Omnimaga until further notice. (?? THP hasn't been much success and there's also the CE. I might possibly be here for a while.)
If you want to implore me to come back, or otherwise contact me, I can be found on GitHub (bluebear94), Twitter (@melranosF_), Reddit (/u/Fluffy8x), or e-mail (if you know my address). As a last resort, send me a PM on Cemetech (bluebear94) or join Touhou Prono (don't be fooled by the name). I've also enabled notifications for PMs on Omnimaga, but I don't advise using that since I might be banned.
Elvyna (Sunrise) 4 5%
TI-84+SE User (2.30 2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User? (1.02)
Bag  東方ぷろの

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: accel68k - a 68k Basic IDE for your 68k calculator
« Reply #3 on: May 05, 2013, 09:13:58 am »
Quote
Well, I have decided that I will use my own keyboard layout for editing and make the user hold down modifier keys, so I'll have to kill interrupts and use direct keyboard access.
Using your own keyboard layout definitely wouldn't require using direct keyboard access, but changing the way modifier keys are handled looks harder to do without using direct keyboard access, indeed.

Quote
And since I will only call C from BASIC (not the other way around), I'll try doing so, and if it's too slow, then I'll make the frontend C as well. (By the way, why would this happen?)
It happens because of the need of creating twins from archived variables, etc.

Quote
By the way, where are the fast drawing routines?
In the source code of the programs I mentioned, which is why I mentioned them ? ;)
The latest version should be in ebook. The setup routine reads the font data directly from the OS area, accounting for AMS 1.xx, AMS 2.xx/3.xx, and PedroM, which require different methods to retrieve this information.

Quote
P. S. I've never heard of the OSInit functions. Thank you for telling me that!
You should spend some more time browsing the GCC4TI documentation, which I've linked above and is in my signature anyway ;)
I've learnt lots of things that way. By now, the number of documented ROM_CALLs has probably reached a thousand (out of 15xx on the most recent versions), the remainder of undocumented things being mostly made of useless / hard to use functions (although some of my '2002-2003 contributions are probably still missing, I added them myself years later to GCC4TI). Beyond that, there are other routines in the library.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline blue_bear_94

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 801
  • Rating: +25/-35
  • Touhou Enthusiast / Former Troll / 68k Programmer
    • View Profile
Re: accel68k - a 68k Basic IDE for your 68k calculator
« Reply #4 on: May 05, 2013, 09:36:25 am »
Does the slowness from calling C from BASIC happen even if the C program run isn't archived, or is the slowness from creating twins of other archived variables?
Due to dissatisfaction, I will be inactive on Omnimaga until further notice. (?? THP hasn't been much success and there's also the CE. I might possibly be here for a while.)
If you want to implore me to come back, or otherwise contact me, I can be found on GitHub (bluebear94), Twitter (@melranosF_), Reddit (/u/Fluffy8x), or e-mail (if you know my address). As a last resort, send me a PM on Cemetech (bluebear94) or join Touhou Prono (don't be fooled by the name). I've also enabled notifications for PMs on Omnimaga, but I don't advise using that since I might be banned.
Elvyna (Sunrise) 4 5%
TI-84+SE User (2.30 2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User? (1.02)
Bag  東方ぷろの

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: accel68k - a 68k Basic IDE for your 68k calculator
« Reply #5 on: May 05, 2013, 11:20:43 am »
Some overhead for launching a native code program occurs even when the target program is unarchived (which opens the door to data losses in the event of a crash / power loss, of course). It is very likely that launching an unarchived ASM program is faster than launching an archived ASM program, due to the overhead of creating a twin, though I don't remember benchmarking that aspect.

TI tried to make it hard to launch a native code program from another native code program. The net result was the development of such radical approaches as patching the OS to completely disable the silly RAM execution protection (HW2Patch, HW3Patch and tiosmod+amspatch; modern versions of PreOS do it as well, but it's not as easy to detect as an OS patch). Being the maintainer of / a contributor to some of the program launchers led me to explicitly advocate, for at least half a decade, to just rely on OS patches for disabling the RAM execution protection.
It just makes programmers' lives easier, and has marginal impact on users: not only users have to patch the OS just once (each time they transfer a new OS version, but that's a pretty infrequent operation), but as far as 89T users are concerned, there is simply no other sane way to achieve multi-chunk programs with two-way control transfers between chunks. Everybody is happier (programs are easier to make and smaller) when the silly RAM execution protection is disabled, as shown by the http://tict.ticalc.org/downloads/launchmultiple.tar.bz2 PoC.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline blue_bear_94

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 801
  • Rating: +25/-35
  • Touhou Enthusiast / Former Troll / 68k Programmer
    • View Profile
Re: accel68k - a 68k Basic IDE for your 68k calculator
« Reply #6 on: May 05, 2013, 11:28:49 am »
Some overhead for launching a native code program occurs even when the target program is unarchived (which opens the door to data losses in the event of a crash / power loss, of course). It is very likely that launching an unarchived ASM program is faster than launching an archived ASM program, due to the overhead of creating a twin, though I don't remember benchmarking that aspect.

Well, speed is critical only in the editor, so as long as the editor's speed remains unaffected, I'll probably be fine with some degree of slowness.
Due to dissatisfaction, I will be inactive on Omnimaga until further notice. (?? THP hasn't been much success and there's also the CE. I might possibly be here for a while.)
If you want to implore me to come back, or otherwise contact me, I can be found on GitHub (bluebear94), Twitter (@melranosF_), Reddit (/u/Fluffy8x), or e-mail (if you know my address). As a last resort, send me a PM on Cemetech (bluebear94) or join Touhou Prono (don't be fooled by the name). I've also enabled notifications for PMs on Omnimaga, but I don't advise using that since I might be banned.
Elvyna (Sunrise) 4 5%
TI-84+SE User (2.30 2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User? (1.02)
Bag  東方ぷろの

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: accel68k - a 68k Basic IDE for your 68k calculator
« Reply #7 on: May 05, 2013, 06:56:13 pm »
Sounds like an interesting project, good luck with it! :D

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline blue_bear_94

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 801
  • Rating: +25/-35
  • Touhou Enthusiast / Former Troll / 68k Programmer
    • View Profile
Re: accel68k - a 68k Basic IDE for your 68k calculator
« Reply #8 on: May 06, 2013, 06:34:49 pm »
Also, maybe the fast font drawing routines Lionel mentioned in his post should be added to the GCC4TI libraries?

Meanwhile, I'm figuring out how to use these font routines  :banghead:.
« Last Edit: May 06, 2013, 06:58:17 pm by blue_bear_94 »
Due to dissatisfaction, I will be inactive on Omnimaga until further notice. (?? THP hasn't been much success and there's also the CE. I might possibly be here for a while.)
If you want to implore me to come back, or otherwise contact me, I can be found on GitHub (bluebear94), Twitter (@melranosF_), Reddit (/u/Fluffy8x), or e-mail (if you know my address). As a last resort, send me a PM on Cemetech (bluebear94) or join Touhou Prono (don't be fooled by the name). I've also enabled notifications for PMs on Omnimaga, but I don't advise using that since I might be banned.
Elvyna (Sunrise) 4 5%
TI-84+SE User (2.30 2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User? (1.02)
Bag  東方ぷろの

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: accel68k - a 68k Basic IDE for your 68k calculator
« Reply #9 on: May 29, 2013, 08:18:45 am »
Due to e-mail notifications being broken for weeks, I missed quite a number of posts on Omnimaga, starting with this topic...

Have you found out how to use the "faststr" routines, by examining e.g. ebook ? There needs to be a setup phase before you can use the drawing routines.

Quote
Also, maybe the fast font drawing routines Lionel mentioned in his post should be added to the GCC4TI libraries?
Indeed, the "faststr" family of routines could and should have been added to TIGCC a decade ago...
However, since he became the only active member of the team, the TIGCC maintainer was a major roadblock to advancing the library and documentation. He explicitly refused my "faststr" series, my "fastitoa" series, someone else's fast fread / fwrite, and various other (potential) contributions which would have been useful to users; even among the contributions that he accepted in principle, he let lots of work languish, for instance a contribution making sprite routines faster and smaller while supporting an additional drawing mode.
GCC4TI broke the community free from his counter-productive stranglehold, but let's be realistic, GCC4TI occurred too late to have any meaningful impact on the activity in the TI-68k native code programming community. I did integrate a subset of my work to GCC4TI, but not the faststr and fastitoa series.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline blue_bear_94

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 801
  • Rating: +25/-35
  • Touhou Enthusiast / Former Troll / 68k Programmer
    • View Profile
Re: accel68k - a 68k Basic IDE for your 68k calculator
« Reply #10 on: May 29, 2013, 04:52:34 pm »
Yep, it's true that few people program in C for the 68k series.
Due to dissatisfaction, I will be inactive on Omnimaga until further notice. (?? THP hasn't been much success and there's also the CE. I might possibly be here for a while.)
If you want to implore me to come back, or otherwise contact me, I can be found on GitHub (bluebear94), Twitter (@melranosF_), Reddit (/u/Fluffy8x), or e-mail (if you know my address). As a last resort, send me a PM on Cemetech (bluebear94) or join Touhou Prono (don't be fooled by the name). I've also enabled notifications for PMs on Omnimaga, but I don't advise using that since I might be banned.
Elvyna (Sunrise) 4 5%
TI-84+SE User (2.30 2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User? (1.02)
Bag  東方ぷろの

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: accel68k - a 68k Basic IDE for your 68k calculator
« Reply #11 on: May 30, 2013, 01:50:55 am »
Yup, it's been that way since 2006-2007, and GCC4TI in 2009+ didn't change much the outcome, though nearly all active developers use GCC4TI instead of the unmaintained TIGCC, for obvious reasons.

Did you make the faststr routines from ebook work in your program ? :)
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline blue_bear_94

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 801
  • Rating: +25/-35
  • Touhou Enthusiast / Former Troll / 68k Programmer
    • View Profile
Re: accel68k - a 68k Basic IDE for your 68k calculator
« Reply #12 on: May 30, 2013, 05:58:49 am »
Yes; however, I also need one that word-wraps.
Due to dissatisfaction, I will be inactive on Omnimaga until further notice. (?? THP hasn't been much success and there's also the CE. I might possibly be here for a while.)
If you want to implore me to come back, or otherwise contact me, I can be found on GitHub (bluebear94), Twitter (@melranosF_), Reddit (/u/Fluffy8x), or e-mail (if you know my address). As a last resort, send me a PM on Cemetech (bluebear94) or join Touhou Prono (don't be fooled by the name). I've also enabled notifications for PMs on Omnimaga, but I don't advise using that since I might be banned.
Elvyna (Sunrise) 4 5%
TI-84+SE User (2.30 2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User? (1.02)
Bag  東方ぷろの

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: accel68k - a 68k Basic IDE for your 68k calculator
« Reply #13 on: May 30, 2013, 09:44:20 am »
Is the slowdown from calling C/ASM from BASIC due to having to search through the VAT like on Z80 calcs? I remember that calling ASM programs from Z80 BASIC was very slow because of that and it would get worse and worse as your RAM got lower, so people relied on Flash APPS that installed ASM libs via parser hooks instead, which was much faster.

Offline blue_bear_94

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 801
  • Rating: +25/-35
  • Touhou Enthusiast / Former Troll / 68k Programmer
    • View Profile
Re: accel68k - a 68k Basic IDE for your 68k calculator
« Reply #14 on: May 30, 2013, 05:29:04 pm »
Is the slowdown from calling C/ASM from BASIC due to having to search through the VAT like on Z80 calcs? I remember that calling ASM programs from Z80 BASIC was very slow because of that and it would get worse and worse as your RAM got lower, so people relied on Flash APPS that installed ASM libs via parser hooks instead, which was much faster.
Even if it were so, we still wouldn't be able to sign flashapps that would work on TI-89s without patches.
Due to dissatisfaction, I will be inactive on Omnimaga until further notice. (?? THP hasn't been much success and there's also the CE. I might possibly be here for a while.)
If you want to implore me to come back, or otherwise contact me, I can be found on GitHub (bluebear94), Twitter (@melranosF_), Reddit (/u/Fluffy8x), or e-mail (if you know my address). As a last resort, send me a PM on Cemetech (bluebear94) or join Touhou Prono (don't be fooled by the name). I've also enabled notifications for PMs on Omnimaga, but I don't advise using that since I might be banned.
Elvyna (Sunrise) 4 5%
TI-84+SE User (2.30 2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User? (1.02)
Bag  東方ぷろの