RTerm P1 for R16K1S60

  • LBPHacker
    8th Jul 2016 Developer 8 Permalink

    Hey there everyone, LBPHacker here again.

     

    This is going to be a quick one, the save itself is pretty self explanatory.

     

     

    So this is a text screen for my computer with

    • 32x24 characters
    • Movable cursor (automatically advances when a character is written)
    • 4-bit foreground and background colour
    • Downward scrolling

     

    The communicaton protocol:

    • 0x00cc: write character [cc] at current cursor position, advance cursor
    • 0x1ppp: set cursor position to [ppp] (ppp is a 10-bit value, its lowest 5 bits are the X component and the highest 5 bits are the Y component, valid in [0x000, 0x2FF])
    • 0x20bf: set background colour to [b] and foreground colour to [f] (b and f are 4-bit values, bits from highest to lowest order: intensity, red, green, blue)
    • 0x3000: scroll down by a single line; discard the topmost line and fill the space at the bottom with spaces using the current background colour (you'd have to send 24 of these to clear the screen)

     

     

    This thing above is the same with a keyboard, which

    • Has Shift and Caps lock (Shift turns off automatically after modifying a single key)
    • Sends simple character codes (not keycodes) when a key is pressed depending on Shift and Caps lock state
    Edited 2 times by LBPHacker. Last: 10th Jul 2016
  • gunpowderTR
    9th Jul 2016 Member 3 Permalink

    can you give the source code in the save program for studying?

    Edited once by gunpowderTR. Last: 9th Jul 2016
  • drrs
    9th Jul 2016 Member 0 Permalink

    This is amazing, I can't wait to play around with it.

  • QuanTech
    10th Jul 2016 Member 1 Permalink
    test post
    ../../../a
    Edited 151 times by QuanTech. Last: 29th Jul 2020
  • The8BitPotato
    10th Jul 2016 Member 0 Permalink

    Does the assembler use decimal or hex? I've never used assembly language before.

    Edited once by The8BitPotato. Last: 10th Jul 2016
  • cmk20
    10th Jul 2016 Member 2 Permalink

    I agree with GunPowder can we get the examle source for refrence?  For those who want some refrence now heres a script by SopaXorzTaker (I did NOT make this)

     

    https://gist.github.com/SopaXorzTaker/26fcc318bdc3781727ba748ccb3194ff

     

    EDIT:

    Well I just noticed something in that script if you use the printInt function add the line

    decimals: dw "0123456789"

    to the bottom of your script


    Nvm The Author Fixed It

    Edited 3 times by cmk20. Last: 11th Jul 2016
  • LBPHacker
    10th Jul 2016 Developer 0 Permalink

    snip Trying to post code snip

     

    RTerm P1 tech demo code

    RTerm P2 tech demo code

     

    Hold on, I'm not sure how much good uncomment assembler code will do. Now they are commented.

    Edited 8 times by LBPHacker. Last: 10th Jul 2016
  • gunpowderTR
    10th Jul 2016 Member 0 Permalink

    @LBPHacker (View Post)

     thanks for the code!

    @cmk20 (View Post)

     thanks to you too btw!

    Edited once by gunpowderTR. Last: 10th Jul 2016
  • cmk20
    10th Jul 2016 Member 0 Permalink

    @LBPHacker (View Post)

    Thanks for the code that helps imensily :D

     

    Just one question how do you encode the cursor postion? (Or any of the numbers above) Im new to hex, I found a converter online but im not sure how to imput the numbers correctly it always messes up some how...

     

    Holy (Censored) I Fgured It Out! Heres A Tutorial For Newbies (LbpHacker If You See This Add It To Your Post Nobody People Like Me Don't Understand It)

     

    So Heres What To Do

    1. Go To An Online Decimal To Binary Converter (I Use http://www.binaryhexconverter.com/decimal-to-binary-converter) And Imput Your Y Value For This Example I'll Use 5 It Converts To  00000101
    2. Now Remove Extra Zeros From The Front So There Are Only 5 Numbers In Our Example's Case It Will Look Like This 00101
    3. Now Repeat Steps 1 and 2 But With Your X Value For The Example We Will Use 6 (Wich Becomes 00110)
    4. Now Go To A Binary To Hex Converter I Used (http://www.binaryhexconverter.com/binary-to-hex-converter)
    5. Next Put The Y's Binary First And Add The X's To The End For The Example It Would Look Like This 0010100110
    6. Finaly Convert It And The Hex Value Outputed Is Your Cursor Pos, In Our Example's Case The Code Is A6 Wich Turns Into 0x10A6 (Simply Add 0x1 To The Front, However Be Carefull If The Hex Code Has Less Than 3 Digits You Must Add 0's To The Front To Make It Three Long Here's An Example: Raw Hex Is A Wich Would Become 0x100A)

     

    I Hope This Helps It Confused Me Pretty Much All Day While I was Trying To Write A Calculator Program (You Can Expect To See It Out Some Time This Week :D)

    Edited 4 times by cmk20. Last: 11th Jul 2016
  • oldmud0
    10th Jul 2016 Member 0 Permalink

    Where is the assembler?