Image Map Image Map
Page 4 of 4 FirstFirst 1234
Results 31 to 40 of 40

Thread: Adding Text display and keyboard for a homebrew Z80 CPM computer

  1. #31
    Join Date
    May 2011
    Location
    Outer Mongolia
    Posts
    2,934

    Default

    Quote Originally Posted by durgadas311 View Post
    Some "terminals" used fancy schemes to separate the video RAM and still allow CPU access (without video disturbance), but dual-ported RAM is probably the easiest.
    That's why home computer makers loved the 6502 so much; if you were willing to slave the CPU speed to the memory access requirements of video refresh its predictable 50/50 bus duty cycle gave you hitless memory arbitration for free.
    My Retro-computing YouTube Channel (updates... eventually?): Paleozoic PCs

  2. #32
    Join Date
    Aug 2017
    Location
    New Mexico, USA
    Posts
    140

    Default

    Quote Originally Posted by Eudimorphodon View Post
    If you have a memory paging mechanism it would of course be possible to put the terminal code in an alternate memory space and swap it in and out as needed to lower the impact on the TPA. Some machines with memory mapped video paged the frame buffer itself in and out. (I donít know off the top of my head any machines that used 16 bit port addresses instead; my vague recollection is thatís not entirely kosher for S-100?)
    The RAM is 128K divided into 4 banks of 32K, so in CP/M3 environment I can certainly bank away the cursor handling routine to save TPA. However, there also is the non-trivial task of writing the cursor handling routine. I've already written limited cursor routine to take care of carriage return/line feed, display of the cursor and scrolling (my hardware is too primitive to have hardware blinking cursor and hardware scrolling). working with escape sequences probably won't be that easy by comparison.

    I've grown quite fond of the 16-bit I/O addressing. Manipulating cursor is nothing more than setting up the correct values for reg B and C and write with OUT (C),A or read with IN A,(C).
    Bill

  3. #33

    Default

    It really depends on which escape sequences you intend to support. Most software is relatively limited.
    Dwight

  4. #34
    Join Date
    Aug 2017
    Location
    New Mexico, USA
    Posts
    140

    Default

    Quote Originally Posted by Dwight Elvey View Post
    It really depends on which escape sequences you intend to support. Most software is relatively limited.
    Dwight
    You may be right. I looked more into ANSI escape sequence. The cursor control seems simple to do. I've already done scrolling and clear screen functions. I probably can test it with a few CP/M screen-orientated software like WordStar, ZDE and call it good enough.
    Bill

  5. #35

    Default

    Quote Originally Posted by Plasmo View Post
    You may be right. I looked more into ANSI escape sequence. The cursor control seems simple to do. I've already done scrolling and clear screen functions. I probably can test it with a few CP/M screen-orientated software like WordStar, ZDE and call it good enough.
    Bill
    Other than common text functions like home, clear screen, CRLF and scroll. Locating to an XY is about all that is need, that I can think of.
    Dwight

  6. #36

    Default

    Regarding UTsource, I agree..Test to confirm ok, and complain when parts are defective. UTsource did a partial refund in my case.

  7. #37

    Default

    Quote Originally Posted by Plasmo View Post
    Thanks for that insight to the implementation of escape sequence. That's what I'm afraid of. Beside the software task of getting it done, I'm afraid it will eat into TPA significantly, at least for CP/M2.2. Could you tell me how big is the escape sequence routine?
    Hi Bill

    The Superbrain HBIOS comprises of four routines - INIT (sets up the hardware on soft/warm boot), CRTIN (read the keyboard; implements key mapping), CRTOUT (manages the display, incorporates escape handling) and DISK (service routines for the disk I/O processor). If we ignore DISK it is 967 bytes long. INIT is also setting up the screen and it has the screen refresh ISR that the CRTC requires, plus you'll need BIOS code to read your keyboard, so I think it is about right for the purposes of planning.

    The following escape sequences are implemented:

    • Set cursor position (x,y)
    • Erase to end of line
    • Erase to end of screen
    • Disable escape sequence processing (shows escape sequences instead of acting on them)
    • Re-enable escape sequence processing
    • Home cursor
    • Cursor forward
    • Ring bell
    • Tab
    • Cursor up
    • Clear screen
    • Cursor back


    Cursor down can be done with a return character ^N I think.

    As you can see it is pretty basic.

    Cheers
    JonB
    Last edited by JonB; September 20th, 2020 at 11:50 PM.

  8. #38
    Join Date
    Aug 2017
    Location
    New Mexico, USA
    Posts
    140

    Default

    Thank you for the valuable feedback. I've already done a few cursor routines and have about 860 bytes of free memory. So I may be able to implement most of Superbrain's escape sequences. Is that set of escape sequences sufficient to run WordStar?
    Bill

  9. #39

    Default

    Yes, but it doesn't implement scroll down which impacts performance. Scroll up is done by the <CARRIAGE RETURN> processing.

    Regarding the SB BIOS source code.. it's split in two. One part is the publicly disseminated BIOS code that Intertec shared with the machine. The other is the "hidden BIOS" for which there is no official source that I could find. This HBIOS contains the initialisation, disk and console handling service routines. I reverse engineered it, partially, and have a sort of half assed commented listing. You're welcome to a copy, but it probably won't help you unless you are using the same CRTC as the Superbrain. Besides, it's more fun writing the code yourself.

  10. #40

    Default

    FYI, RETURN is ^M and sends the cursor to the left edge of the screen (same line). LINE FEED (^J) is the traditional/simple cursor-down function. But many terminal types define a cursor down ESC sequence, which you probably also need to handle.
    - Doug

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •