Code Monkey home page Code Monkey logo

Comments (3)

bgri avatar bgri commented on June 1, 2024

Neat... Having it run on a K-85 would be really cool.
Now if only we had a hardware version to verify on. Not in my collection (sadly).

Oh, not sure if this helps or not - K-85 Service Manual - Memory detail at 3-41

from m100le.

hackerb9 avatar hackerb9 commented on June 1, 2024

I think I have Kyotronic-85 support working and will issue a pull request after a bit more testing. These are just notes for anyone who follows in my footsteps:

PEEK(1) == 225

It does appear that all the Kyotronic-85 sisters actually can be identified reasonably uniquely by looking at PEEK(1), which is an old technique (from the 1980s) that was used for differentiating between the Model 100 and similar machines.

Model PEEK(1) RAM Directory Address SAVEM bug? KB Count Address
Kyocera Kyotronic-85 225 63849 Yes 65387
TRS-80 Model 100 51 63842 No 65450
Tandy 102 167 63842 No 65450
Tandy 102 (UK) 167 63842 No 65450
Tandy 200 171 62034 No 64799
NEC PC-8201 148 63567 Yes 65128
NEC PC-8201A 148 63567 Yes 65128
NEC PC-8300 148 63567 Yes 65128
Olivetti M10 (Italy) 35 63849 Yes 65389
Olivetti M10 (US) 125 ? ? ?

For all machines, the Keyboard Buffer starts one byte after the Keyboard Buffer Count. The buffer holds 32 entries on all machines. Except on the M10, each entry takes two bytes. Only the second byte seems to be significant for ordinary keystrokes. On the M10, each entry takes a single byte.

SAVEM Bug and adding keystrokes to the keyboard buffer

All of the Kyotronic sisters , except the ones from Tandy Radio-Shack, have what I was calling the "BSAVE BUG". Of course, for non-NEC machines, it is actually a bug in SAVEM. It affects only CMPRSS.DO, which uses SAVEM to allocate memory in the RAM Directory for the compressed wordlists. The bug is that the program halts after a line which contains SAVEM. A solution is to put that line in a subroutine and then, from "Direct Mode", the user can type "RETURN" to continue the program. I have created a routine which will programmatically add any string to the keyboard buffer so that, as soon as the program stops, the machine will think the user has typed RETURNENTER. It works on any platform.

Subroutine to insert R$ in the keyboard buffer
8800 REM INSERT R$ INTO KEYBOARD BUFFER
8801 ' INPUT: R$, a string of <=32 char
8802 ' OUTPUT: None. Types R$ on kbd.
8805 ' TEMP: ID: Machine platform
8806 '       KC: Key count address
8807 '       KB: Keyboard buffer addrss
8808 '    I, SK: Loop iterator, skip
8809 '
8810 ID=PEEK(1)
8820 KC=-( 65128*(ID=148)                        + 65389*(ID=35 OR ID=125)               + 65387*(ID=225)               + 64799*(ID=171)                        + 65450*(ID=51 OR ID=167) )
8830 IF KC=0 THEN PRINT "Error: Keyboard buffer address not known for machine ID";ID;". Please file a bug report.": END
8840 KB=KC+1
8850 IF (LEN(R$) > 32) THEN PRINT "Error: String too long to fit in keyboard buffer: ";R$: END
8860 IF (LEN(R$) = 0) THEN RETURN
8870 SK=2 'Read every other byte
8879 ' Olivetti reads every byte
8880 IF (ID=35 OR ID=125) THEN SK=1
8889 ' "Type" into keyboard buffer.
8890 FOR I=0 TO LEN(R$)-1
8900 POKE KB+I*SK, ASC(MID$(R$,I+1,1))
8910 NEXT I
8919 ' Number of keys "typed".
8920 POKE KC, LEN(R$)
8930 RETURN

Kyotronic-85's RAM Directory address is 63849

from m100le.

bgri avatar bgri commented on June 1, 2024

So, it's like the dev. team just forgot that someone could be using BSAVE/SAVEM in code vs through direct entry? Curious that it survived existing on both platforms. I'd assume that code review would have caught it on the conversion. Maybe it is expected behaviour for the time...

Nice workaround to solve it :)

from m100le.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.