Comments (31)
from m100le.
Just catching up on these... yes, we'll tokenize the .BA once we lock down the next version, 'M100LEm'.
from m100le.
The 8201 BASIC is somewhat different than the m100. Drawing characters to x,y doesn't exist in the same way. There's a few other things... so a direct 1:1 conversion isn't possible. The 8201 is my first love for these units, so I have to get a version running on it :)
I have a solution for the X,Y problem in issue #11. You already are setting variables to store the coordinate. I was thinking the variables could simply be the VT52 strings for cursor placement. That should work on any of the Kyocera sisters. I am eager to get it working, once we know that random access reads can work properly on the 8201.
from m100le.
Nice idea! I've been reluctant to dig into that one as I used PRINT @
statements everywhere :).
from m100le.
Now that I think the program should work on the NEC portables, I'm looking into how to tokenize to a M100LE.BA.NEC file. I already have tokenizing working well enough for the Model 100 and Tandy 102/200 at https://github.com/hackerb9/tokenize .
One problem I'm running into is that VIrtual T sometimes garbles .BA files when saving from the NEC 8201A emulation, so I don't have a baseline of what the output should look like.
from m100le.
Hmm, interesting. What would it take to get a baseline?
from m100le.
Would you be willing to load the M100 code into your NEC 8201A and then post the .BA file in this thread? I believe the tokenization is the same for all the NEC portables, but we should probably check that.
from m100le.
Yep, for sure! I've got a bit more bandwidth to look back at this stuff (for a little while anyway :)). I'll try and have it up in the next few days.
from m100le.
Ok, that's cool! The code runs!!!
Though it's not reading the .CO properly...
Amazing progress!
from m100le.
FLJFP
.... Wasn't that the "word" when the wordlist wasn't properly initialized by CMPRSS and so it was just looking at a copy of the NEC ROM?
Please try downloading the .CO file directly. If that works, please send me the output of running CMPRSS so we can debug it. If the .CO file doesn't work, then I'm curious if the program even works with the old .DO format. (It should if there is no .CO file).
It's not possible you have an old copy of CMPRSS.DO, right?
from m100le.
Would you be willing to load the M100 code into your NEC 8201A and then post the .BA file in this thread? I believe the tokenization is the same for all the NEC portables, but we should probably check that.
Bah, I must be bad at reading. Just to confirm what I've done (hopefully it's what you were looking for :) ):
- Download M100LE.DO
- copy to 8201a
- load the .DO into basic
- save the .BA to RAM
- attach the .BA here. Attached as .txt and .zip incase something muddled it as Github received.
On to the next part...
from m100le.
Ok - TLDR -- It works :)
- downloaded the current text version of CMPRSS.DO
- loaded it into basic and saved it out as CMPRSS.BA
- ran CMPRSS.BA on the current version of WL2022.DO
- which created WL2022.CO
- ran the current version of M100LE.BA
- stopped execution to get the value of TW$ (today's word), which resulted in DANDY
- also, something seemed to be going on as when I entered "PRINT TW$" in addition to printing the word, it seemed to start executing basic code and generated an error message. It also did this the first time I attempted to clear the screen with CLS. - the second CLS attempt worked, and then was able to cleanly print the value of TW$ without issue.
Running CMPRSS.BA to generate WL2022.CO
Also -- I had previous issues attempting to delete WL2022.CO -- the 8201a would freeze and a hard reset was needed. That doesn't happen now.
from m100le.
Also -- I had previous issues attempting to delete WL2022.CO -- the 8201a would freeze and a hard reset was needed. That doesn't happen now.
from m100le.
(Oops, clicking wrong buttons as I'm too sleepy)
Hurray that CMPRSS works (at least partially)! It would be good to know if it is able to compress on the fly over the serial port instead of using WL2022.DO.
The .txt worked with no file mangling; no need for the .zip.
The file you had a hard time deleting makes me more sure that I should finish up bug #37 before the cut to 0.m.
from m100le.
I think I mentioned this in a different issue, but if not, it's good to note that I have discovered using Virtual T that there are only two different tokenized BASIC formats across all the Kyotronic sister-computers.
Platform | BASIC Tokenization |
---|---|
NEC PC-8201 NEC PC-8201A NEC PC-8300 |
N82 BASIC |
Kyocera Kyotronic-85 TRS-80 Model 100 Tandy 200 Tandy 102 Olivetti M10 (Italy) |
Tandy BASIC |
After I finish the Kyocera Kyotronic-85 port, I may come back to looking at documenting the N82 BASIC tokenization so I can extend my tokenizer to automatically create .NEC.BA files.
A Makefile is now included (ever since the Olivetti M10 pull request). This makes it easy (on a UNIX-like system, anyhow) to re-create the M100LE.BA file. It uses my tandy-tokenize program to do the tokenization. Typing make
is all that is needed to generate M100LE.BA, M100LE+comments.BA, and M100LE.DO.
Apple MacOS should come with make
, so it should work there. On the other hand, I'm not sure if Apple MacOS even includes libfl, which is needed to compile my tokenizer from C. Microsoft Windows may work as well, if WSL is installed from the Appstore. I don't have access to either, so I can't say for sure.
from m100le.
Interesting. That makes sense. The WEB82201 technical documents page only references converting between the two so it looks like the other orgs. decided Tandy basic was fine.
And I discovered that since Lion, OSX doesn't come with developer tools installed. My last Macbook Pro had it but I guess I haven't done any mac dev work since then :( Downloading now :)
from m100le.
Interesting. That makes sense. The WEB82201 technical documents page only references converting between the two so it looks like the other orgs. decided Tandy basic was fine.
And I discovered that since Lion, OSX doesn't come with developer tools installed. My last Macbook Pro had it but I guess I haven't done any mac dev work since then :( Downloading now :)
No dev tools? Wow, it's been a while since I used MacOS.
Are they still using "homebrew" for package management? You might need to "brew install flex" for my tokenizer. If you compile it, please upload the executable so I can add it to the available downloads.
from m100le.
Well, I thought I'd give your cleaner/tokenizer a try. I installed Flex using Brew then went and attempted build tandy-tokenize...
Sadly, I got this error:
brad@Brads-MacBook-Pro-16 tokenize % sudo make
Password:
gcc -o tandy-tokenize lex.yy.c -lfl
ld: library not found for -lfl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [tandy-tokenize] Error 1
brad@Brads-MacBook-Pro-16 tokenize %
Looks like the Mac is missing that library. Thoughts on how I can add it manually? I would have thought it would have come in with the Flex package... I missed something?
from m100le.
Yeah, libfl is supposed to come with flex. Did you install flex using brew install flex
? (If you don't have brew, please see brew.sh).
By the way, still working on the NEC PC-8201A tokenizer. Had some hiccups, but making progress.
from m100le.
Yep, had brew installed previously. Updated it then added Flex as you describe :(
from m100le.
I wonder if brew installs library files in weird places. Does locate libfl
give you any information on MacOS?
Try brew --prefix
to find the lib directory that contains libfl.
from m100le.
Got this:
brad@Brads-MacBook-Pro-16 / % locate libfl
/Applications/LibreOffice.app/Contents/Frameworks/libflatlo.dylib
/Applications/VLC.app/Contents/MacOS/plugins/libflac_plugin.dylib
/Applications/VLC.app/Contents/MacOS/plugins/libflacsys_plugin.dylib
/Applications/VLC.app/Contents/MacOS/plugins/libflaschen_plugin.dylib
/Applications/VLC.app/Contents/MacOS/plugins/libfloat_mixer_plugin.dylib
/Applications/VirtualT.app/Contents/Resources/lib/libfltk.1.3.dylib
/Applications/VirtualT.app/Contents/Resources/lib/libfltk_images.1.3.dylib
/usr/local/Cellar/flex/2.6.4_2/lib/libfl.2.dylib
/usr/local/Cellar/flex/2.6.4_2/lib/libfl.a
/usr/local/Cellar/flex/2.6.4_2/lib/libfl.dylib
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/libflowmanager.rb
brad@Brads-MacBook-Pro-16 / %
from m100le.
So, it looks like brew stashed it in /usr/local/Cellar/flex/2.6.4_2/lib but didn't add that to the standard library directory path. What about the results for pkg-config --libs libfl
?
from m100le.
pkg-config wasn't installed - added it via brew:
brad@Brads-MacBook-Pro-16 / % sudo pkg-config --libs libfl
Package libfl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libfl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libfl' found
brad@Brads-MacBook-Pro-16 / %
from m100le.
I don't know why locate wouldn't have found it, but people on the net claim that brew creates symlinks to every installed library in a standard directory. Could you please try brew --prefix
and check if there is a lib directory in there, with libfl inside?
If not, could you try brew --prefix libfl
and see if that works any better?
from m100le.
Interesting and confusing.
Nothing here... |
Didn't like that one... |
I did find this. |
And I've been searching online a little bit too. Found this one snippet that seems to indicate a minor change to the tandy-tokenize makefile is required -lfl -> -ll
https://stackoverflow.com/a/56087296
I know nothing about this level of scripting so I'm not sure if this even makes sense in our context. Would updating that makefile and running it do what's needed?
from m100le.
Interesting! I think you're right that using -ll
would work on MacOS. Moreover, that stackoverflow answer reminds me that it would be less work to just include my own main()
routine than to try to adapt the Makefile to use -ll some places and -lfl elsewhere.
On a side note, this is not a level of scripting that I think you'd find rewarding to learn. Normally one wouldn't have to deal with this kind of fiddly stuff as the library should just be found automatically by the compiler. If it is in an unusual place, pkg-config should have worked as that's a standard part of flex (and many other libraries). I wonder if this is a bug in the Brew formula or is just a difference in the way MacOS likes to operate that I'm not familiar with yet. Not that it matters, of course. I'll just implement a main() routine and we can circumvent all these shenanigans.
from m100le.
Okay, I've updated my tokenize project so that it no longer requires libfl. Please try compiling it now on MacOS. A simple, make
should be all you need. If you run make test
it'll try some of the sample programs and make sure the output matches what a real (or virtual) Model T generated.
from m100le.
Cool. I love the idea of having one input generate all the outputs we need and appreciate your work on this! I've been working on a simple Python script to dump out all lines containing GOTO and GOSUB statements so that I can track them as I try and condense the code. Scripting is harder than it looks!
I tried running the new version and bumped into problems :(
Make produced a tandy tokenize
file. I make-installed it. It seems to run, but the output files aren't loading into VirtualT as they're being reported as 'Ill formed BASIC files'. I will try and load one into my m102 tomorrow in case VirtualT is being weird and the files are fine (it's getting late and I don't want to do something dumb :) ).
Command was tandy-tokenize < M100LE+comments.DO > M100LE+comments.BA
Output as a .zip ->
M100LE+comments.BA.zip
Also, when I attempted a make
in my working directory to produce +comments.BA, .DO, .BA files from the source .DO, the comment cleaner would work, but the output files were a bit mangled. Then tandy tokenize
would run over that...
created:
Archive.zip
from m100le.
I've been working on a simple Python script to dump out all lines containing GOTO and GOSUB statements so that I can track them as I try and condense the code.
Oh, did you know about adjunct/jumpdestinations
? It also handles THEN linenum with implicit GOTO and some other weird references to line numbers that I added even though I don't think we use (like ON p GOSUB x, y, z and RESTORE linenum). I think it should work for everything except commands which take a range of numbers (LIST, EDIT, RENUM).
You may want to try using the adjunct/jumpdestinations -c | sort -n
to see a sorted count of how many different references there are to a certain destination.
from m100le.
Whoa! I see what you mean about the comment cleaner mangling the output files.
0 CLEAR 512
1 DIM WD$(5): RD
2 DIM HI$(5) RRENT HINT SYMBOLS
3 DIM SO$(6,5)
4 DIM UL$(6): rline
5 DIM DA(12): RRAY
6 R OF DAYS FOR EACH MONTH INTO THE ARRAY DA()
That is not what it does on my system, so I'm guessing the problem is I relied on some feature of GNU sed that MacOS's default sed doesn't support. It looks like you can't just brew install gnu-sed
and have it magically work because brew wants to call it gsed
. I'll fix my script to use that if it exists.
from m100le.
Related Issues (20)
- Use random instead of sequential access to wordlists HOT 5
- Handle European style DATE$ HOT 17
- Wordlists need to be updated to resynch with the official Wordle HOT 2
- Fix RAM Directory for 8201 and T102 HOT 12
- Do not assign to MID$() for NEC compatibility HOT 5
- Maybe tighten code HOT 8
- Use reverse video to show Right Letter & Right Place HOT 2
- Maybe show Right Letter, Wrong Place differently HOT 17
- Update README HOT 14
- Create an implementation details page for devs HOT 1
- CMPRSS should not create a WL20xx.CO if it fails
- Allow sloppy date HOT 1
- Kyocera Kyotronic-85 support HOT 3
- Olivetti M10 support HOT 6
- New York Times changed the wordlist, again HOT 6
- Feature: Allow player to request a hint HOT 2
- Feature: Player analytics
- Feature: Add [D]ISP WD option to right panel options
- Revert showing ? for wrong place if letter is right elsewhere HOT 3
- adjunct/removecomments should be replaced HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from m100le.