Zendocon Posted September 25, 2018 Share Posted September 25, 2018 (edited) Instructions on how to do all future Intellivision programming through IntyBASIC using only an Android device and a physical keyboard. Most of what I wanted to say are in the musings at the end of the document. What I want to emphasize here, is what the purpose of the document is, and what it isn't. This is just meant to help people who might not know anything about Linux to create a simple Linux environment to do IntyBASIC development using nothing more than a phone/tablet and a physical keyboard. I am by no means an expert in Linux. There are a lot of technical inaccuracies and possible falsehoods I left in place on purpose, because the intended audience here are people who aren't interested in the technical details. What that means is, I know there are probably some revisions that will need to be made, but for any Linux "power users" here, stick to the point of getting a simple Linux environment going for Inty Development and nothing else. I certainly want to alter this document in the direction of making the process easier and more failsafe though. Anyhow, I hope this is helpful to all of you. Portable Development Environment.pdf Edited September 25, 2018 by Zendocon 5 Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted September 25, 2018 Share Posted September 25, 2018 I'll see if I can walk through your instructions to get a better idea of what a full IntyBASIC environment would look like. Quote Link to comment Share on other sites More sharing options...
+nanochess Posted September 25, 2018 Share Posted September 25, 2018 Just as a comment, you can avoid getting a Github account if you download the IntyBASIC distribution ZIP to your cellphone using the button Desktop View directly from https://github.com/nanochess/IntyBASIC. At least in my phone, clicking that ZIP file uncompresses it, and then using My Files, you move the *.cpp and *.h files to the root of Downloads folder, and copy them individually to your termux folder. cp /storage/downloads/*.cpp . cp /storage/downloads/*.h . Quote Link to comment Share on other sites More sharing options...
carlsson Posted September 25, 2018 Share Posted September 25, 2018 Great write up, but why don't you use the built-in compile functionality in Emacs, or would that not work in the Termux environment? If you want, I have previously posted intybasic-mode.el which I configure with the paths to the compiler and assembler and don't have to exit the editor. 2 Quote Link to comment Share on other sites More sharing options...
Zendocon Posted September 25, 2018 Author Share Posted September 25, 2018 Great write up, but why don't you use the built-in compile functionality in Emacs, or would that not work in the Termux environment? If you want, I have previously posted intybasic-mode.el which I configure with the paths to the compiler and assembler and don't have to exit the editor. I wanted to allow the end user to choose any text editor. I haven't been active on Atariage lately, but yes, I would personally love to have any emacs script and syntax-highlighting files you've got. 1 Quote Link to comment Share on other sites More sharing options...
carlsson Posted September 25, 2018 Share Posted September 25, 2018 While the script has support for syntax highlighting, I never bothered implementing the IntyBASIC keywords into it. Instead it currently uses syntax highlighting for 6502 assembly code, which was the origin of my script... feel free to improve upon that if you like. At the very least, you need to configure intyb-ccpath and intyb-aspath. Also note that if the compiler is successful, it moves directly to the assembler stage. I saw from your build scripts that you have more complex setups with multiple input files, more like a make file, where my approach might be better suited for projects with a single source file that includes other sources and ready made binaries. intybasic-mode.zip 2 Quote Link to comment Share on other sites More sharing options...
Zendocon Posted September 25, 2018 Author Share Posted September 25, 2018 Thank you very much for this! Although compilation and assembly within emacs is useful as well, the one thing I wanted is syntax highlighting. I didn't immediately get it working though. I did modify the two lines you mentioned. I assume the file just goes into the Home directory. Maybe I need to set permissions, like I did with my .emacs file? I looked at a .asm file from an earlier project, and emacs colored the syntax and added an "Asm" menu. I'll see if I can tweak it to do the same thing in the existing environment. Quote Link to comment Share on other sites More sharing options...
carlsson Posted September 25, 2018 Share Posted September 25, 2018 (edited) You would have to M-x load-library and the file must be in a library folder like ~/site-lisp/ or whatever it is called. Or all the Elisp code evaluated manually of course. Edited September 25, 2018 by carlsson Quote Link to comment Share on other sites More sharing options...
Zendocon Posted September 25, 2018 Author Share Posted September 25, 2018 The path to site-lisp is "/data/data/com.termux/files/usr/share/emacs/site-lisp" in this environment. I put the file there and tried M-x load-library as well as M-x load-file (I kept a copy in the home directory), but I keep getting the message that the variable values are void. Any idea why? Quote Link to comment Share on other sites More sharing options...
carlsson Posted September 25, 2018 Share Posted September 25, 2018 Not really. I've got a very old Android tablet with an USB keyboard that I haven't used for a couple of years. Maybe I'll have a look to see if it is recent enough to install the environment and have a try.(And yes, even back then I installed a mostly read-only environment of Emacs on the tablet to at least have an IRC client...) Quote Link to comment Share on other sites More sharing options...
Zendocon Posted September 25, 2018 Author Share Posted September 25, 2018 I discovered my problem from earlier. I forgot to wrap quotes around the path names. It was an elisp syntax issue. Now I can use M-x file-load and get emacs to read the file, but still nothing happens in the way of syntax highlighting. Also, with my phone and the keyboard bound to it, neither the Alt nor Cmd keys seem to be bound to Meta, so for that I would be forced to write a script to make emacs do the syntax highlighting automatically for *.bas files. 1 Quote Link to comment Share on other sites More sharing options...
carlsson Posted September 25, 2018 Share Posted September 25, 2018 The syntax highlighting lies in the (defvar intyb-font-lock-keywords) but as I wrote, I never really added the IntyBASIC keywords to the list. At the very least, labels at the leftmost column and code indented by a tab should have different colours. Funny, for most part I find syntax highlighting a form of decorating the Christmas tree while I have good use of all the other functionality but YMMV. Quote Link to comment Share on other sites More sharing options...
Zendocon Posted September 26, 2018 Author Share Posted September 26, 2018 If you don't like having to go in and out of the text editor each time you want to run the Make script, you can swipe from the left edge of the screen and start a New Session. That way, you have one session with your editor always open, and another one with just a prompt. I made a few modifications to the original document, which includes an addendum with the above information. I'll wait a little bit before posting it though. I don't want too many revisions floating around. Quote Link to comment Share on other sites More sharing options...
Zendocon Posted September 27, 2018 Author Share Posted September 27, 2018 (edited) I got the syntax highlighting working yesterday! The next step was to modify the .emacs file to add these two lines at the end: (load-file "~/intybasic-mode.el") (setq major-mode 'intybasic-mode) In addition to that, I modified the one chunk of code within intybasic-mode.el to define the IntyBASIC syntax. It's probably not perfect, but it works. Also, keep in mind that words that begin at the leftmost column of a line are treated as labels. (defvar intyb-font-lock-keywords '( ("\\(;.*\\|'.*\\)$" . font-lock-comment-face) ("[ \t]+\\(rem\\)\\b" . font-lock-comment-face) ("^\\([a-zA-Z0-9_:]+\\)\\b" . font-lock-constant-face) ("[ \t]+\\(d[csv].[bwl]?\\|signed\\|unsigned\\|const\\|dim\\|packed\\|varptr\\|bitmap\\|music\\)\\b" . font-lock-type-face) ("[ \t]+\\(org\\|stack_check\\)\\b" . font-lock-warning-face) ("[ \t]+\\(include\\|goto\\|gosub\\|return\\|if\\|then\\|elseif\\|else\\|end\\|for\\|to\\|step\\|next\\|while\\|wend\\|do\\|until\\|loop\\|exit\\|on\\|wait\\|restore\\|read\\|data\\|define\\|alternate\\|sound\\|sprite\\|cls\\|print\\|at\\|color\\|scroll\\|border\\|mode\\|screen\\|play\\|simple\\|full\\|no\\|drums\\|none\\|volume\\|repeat\\|stop\\|jump\\|voice\\|init\\|number\\|flash\\|erase\\|write\\|peek\\|poke\\)\\b" . font-lock-variable-name-face) ("[ \t]+\\(option\\|warnings\\|off\\|explicit\\|procedure\\|def\\|fn\\|asm\\|call\\|name\\|usr\\)\\b" . font-lock-builtin-face) ("[ \t]+\\(and\\|or\\|xor\\|not\\|abs\\|sgn\\|cont1\\|cont2\\|col0\\|col1\\|col2\\|col3\\|col4\\|col5\\|col6\\|col7\\|rand\\|random\\|frame\\|ntsc\\|backtab\\|up\\|down\\|left\\|right\\|button\\|b0\\|b1\\|b2\\|key\\|cont3\\|cont4\\|len\\|pos\\|mobshadow\\|first\\|last\\|playing\\|available\\)\\b" . font-lock-keyword-face) ) "Expressions to highlight in intyb-mode.") Edited July 29, 2019 by Zendocon Hide the highlighting text 1 Quote Link to comment Share on other sites More sharing options...
carlsson Posted September 27, 2018 Share Posted September 27, 2018 I believe it is good practise to indent with at least 1-2 spaces or a tab character, even if it may not be strictly required.¨ If you remove the regexp [ \t]+ at the start of the expression, you should get highlighting even without indented code. Quote Link to comment Share on other sites More sharing options...
Zendocon Posted October 1, 2018 Author Share Posted October 1, 2018 I didn't want to post too many revisions to the original document, but I think now is a good time. Changes include: An addendum for a few extra things like a Source Backup script as well as making the change to the Path permanent. A semantic correction: in several places I referred to the Home folder as the Root folder. Portable Development Environment.pdf Quote Link to comment Share on other sites More sharing options...
Zendocon Posted November 29, 2018 Author Share Posted November 29, 2018 Here is one of two Companion Volumes I created to supplement the original volume. This one is about easily maintaining multiple projects in this Linux environment. The filename ends in "3" only because I created the other Companion Volume first. That other Companion Volume discusses having a graphical environment with jzintv running in it. I've had that finished for a while now, but I'm waiting to release it until I know whether I can post somewhere the build of jzintv that works in this environment. For now though, I think this will be helpful for those of you that want to have more than one project concurrently. Portable Development Environment 3.pdf Quote Link to comment Share on other sites More sharing options...
Zendocon Posted December 6, 2018 Author Share Posted December 6, 2018 (edited) Okay. At long last, here is the Companion Volume to create a graphical environment for Termux that runs jzintv. This is necessary if you want to add JLP support to your game, since jzintv4droid doesn't support JLP. Also included here is an update to the other Companion Volume. I had to make corrections to the Run script. Finally, here are the builds of jzintv that are working in Termux. I included the modified source, the Makefile, and also the pre-compiled binaries for jzintv and as1600. Run "uname -m" to determine your device's architecture. The two devices I am using are "arm" and "aarch64." If there are any issues, do let me know right away. Enjoy! Portable Development Environment 3.pdf Portable Development Environment 2.pdf Edited April 30, 2020 by Zendocon jzintv builds taken down - the Source Archive download from the official home page builds just fine, and it's the latest version. 1 Quote Link to comment Share on other sites More sharing options...
Zendocon Posted May 24, 2019 Author Share Posted May 24, 2019 It's time for an update to these documents, now that I'm done finishing FUBAR. I had been meaning to combine the three volumes into a single volume since I posted all this originally. That and I made some more changes to the environment that I think are useful. Any questions or feedback, just let me know. Portable Development Environment Complete.pdf Quote Link to comment Share on other sites More sharing options...
Zendocon Posted June 12, 2019 Author Share Posted June 12, 2019 I made an update a couple weeks ago. Just after the Table Of Contents, I list the changes I made. There was a correction and a typo to fix, plus a few things to add. The most significant change is the Play script, to easily play all your other games in this environment. I guess I was too busy having fun with this to get around to posting the update sooner. Portable Development Environment Complete.pdf 1 Quote Link to comment Share on other sites More sharing options...
Zendocon Posted August 1, 2019 Author Share Posted August 1, 2019 Another update. I've made some corrections along the way. It's time for a release again, because a recent Termux update defeated one of the lines in a couple scripts. Portable Development Environment Complete.pdf Quote Link to comment Share on other sites More sharing options...
Zendocon Posted August 27, 2019 Author Share Posted August 27, 2019 Just as a heads-up, I made a slight change, but it's not enough to merit another upload. The package sdl-dev is no longer available, and is rolled up into sdl itself. So there's no need to download that package. That change will be reflected with the next revision I post. Quote Link to comment Share on other sites More sharing options...
Zendocon Posted September 10, 2019 Author Share Posted September 10, 2019 Here is another revision. I built the environment again from scratch using these instructions, and there were a few places were I needed to make corrections. Because of that, I renamed the file. New Portable Development Environment.pdf Quote Link to comment Share on other sites More sharing options...
Zendocon Posted December 27, 2019 Author Share Posted December 27, 2019 Here is an important update for Android phones only. My plan had been to split this document once again between phones and tablets, because there were enough differences that having information for both devices combined into a single document made it harder to follow. But now Termux is ending support for versions of Android older than 7 (Nougat), so I had to release the "phone" document right away. I'll create a "tablet" document when I get a new tablet, probably early next year. New Portable Development Environment - Phone.pdf 1 Quote Link to comment Share on other sites More sharing options...
Zendocon Posted April 30, 2020 Author Share Posted April 30, 2020 It's time to post the documentation for Android tablets. I used this for a new tablet as well as a new phone. I'll update the Phone documentation at some point to bring it up to date with this. New Portable Development Environment - Tablet.pdf Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.