Jump to content
IGNORED

GROM / Addressing for Dummies Please


Recommended Posts

I've been populating my PEB with various cards (like SAMS, RS232, P-Code, TIPI, Speech, FDC) and I understand how to use them and how they work (at the user level) and have an FG99/F18A, but am struggling with understanding things at the GROM/Addressing level

 

I get what GROMs are, but not the whole addressing structure of the TI, if you get my meaning. 

 

I'm shortly going to be adding an HSGPL card to my PEB to play around with, but the manual assumes you already know everything about the internal structure of the TI and statements like below make my blood run cold

 

image.thumb.png.f705885243f4dc3c8f8bf9cb72a6f865.png

 

I was wondering if anyone could point me to a "TI ROM/GROM/Addressing for Dummies" please?

 

Something that will help me understand how it all hangs together (I've read the FAQ BTW)

 

Many thanks

 

 

Link to comment
Share on other sites

There's this...

 

Q: What can I do, if Bank0 becomes corrupt and I can't boot?
A: There is a trick if you have damaged the first banks: exchange the
   FLASH-EPROMs which contain the GROMs, so you will exchange banks 8
   and 0, 9 and 1 etc..... Then you can start the system and repair the
   damaged banks, which resist now at the second half (from 8... on 
   16bank-cards.)
 
   TI made a mistake in the ROM-0, some code from GROM-0 is accessed 
   via >9804, the second bank instead of the base-bank, so if you
   change the GROM-0, do it always in both banks (minimum!),
   without going through the main-screeen (power-up) between this!!!
   {otherwise you have to do the procedure as described above...{grin}}

 

...excerpt from...

 

System 99 Users Group (SNUG) * HARDWARE HELP FILE * Version: 07.09.2000

:-o

 

More stuff in parent directory:

https://ftp.whtech.com/datasheets and manuals/Hardware/SNUG/

Link to comment
Share on other sites

2 hours ago, Atari2600PAL said:

I've been populating my PEB with various cards (like SAMS, RS232, P-Code, TIPI, Speech, FDC) and I understand how to use them and how they work (at the user level) and have an FG99/F18A, but am struggling with understanding things at the GROM/Addressing level

 

I get what GROMs are, but not the whole addressing structure of the TI, if you get my meaning. 

 

I'm shortly going to be adding an HSGPL card to my PEB to play around with, but the manual assumes you already know everything about the internal structure of the TI and statements like below make my blood run cold

 

image.thumb.png.f705885243f4dc3c8f8bf9cb72a6f865.png

 

I was wondering if anyone could point me to a "TI ROM/GROM/Addressing for Dummies" please?

 

Something that will help me understand how it all hangs together (I've read the FAQ BTW)

 

Many thanks

 

 

You need my GPL HOW 2 Series

 

I also include Asssembler, Disassembler, Linker and manuals.

 

 

Edited by RXB
Link to comment
Share on other sites

Here is some basic info.  Certainly more in those refs, starting with Thierry's TI Tech Pages: GROM

 

GROM is a separate memory space, organized as 8 banks at 8K boundaries.  To access GROM, you first load an address counter, then read from a a data port.  It's very similar to VDP memory access. 

GROM chips have a starting address burned in.  When you set the address counter from 0000-FFFF, each GROM chip compares the address. Only a GROM chip which matches that address becomes active.

 

Memory Map of GROM

 

0000 17FF GROM 0  console
2000 37FF GROM 1  console
4000 57FF GROM 2  console
6000 77FF GROM 3  expansion: cartridge port or P-BOX card
..
E000 F7FF GROM 7 expansion

 

The console reserves GROM 0,1,2 for the "GPL Operating System".  Cartridges or P-Box cards can provide GROM 3-7 without conflicting with the console. 

 

The next byte you read will come from that chip at that address. Each time you read a byte, the GROM advances its address counter. 

 

GROM Base

 

GRMRD  EQU >9800      to read a byte of data
GRMWA  EQU >9C02      to set the address

 

>9800 is called the "GROM Base" in the 99/4A CPU Memory Map.

More about GROM base later. (Hint: >9804 is for an expansion bank, >9820 is Gram Karte expansion bank...)

 

Contrast the memory-mapped GROM ports to the VDP ports:


 

GRMRD  EQU >9800      to read a byte of data
GRMRA  EQU >9802      to retrieve the address, plus 1
GRMWD  EQU >9C00      to write data - useless for GROM chips
GRMWA  EQU >9C02      to write address

VDPRD  EQU >8800      to read a byte of data
VDPSTA EQU >8802      to retrieve the STATUS REGISTER
VDPWD  EQU >8C00      to write data
VDPWA  EQU >8C02      to write address

 

 

Code


This code copies char defs from GROM to VDP.   (This is the only code I've ever written to access GROM)  

 

 

SETGWA SWPB R0        least significant byte goes first
       MOVB R0,*R15
       SWPB R0
       MOVB R0,*R15
       RT

SETVWA SWPB R0          least significant byte goes first
       MOVB R0,@VDPWA
       SWPB R0
       MOVB R0,@VDPWA
       RT

CHARA1 EQU >06B4      pretend this is the part of GROM 0 with the ordinary character definitions 

* Copy uppercase character set from GROM to VDP
START  LI  R15,GRMWA         GPL keeps its GRMWA at >83FE, which is R15 of GPLWS >83E0
       LI  R0,CHARA1
       BL  @SETGWA           set the address from R0 (for GROM base relative to R15)

       PATTBL  EQU >0800  assume the VDP pattern table is at >800 
       LI  R0,PATTBL+>200  address for char 64: @ABC ... (NOTE 1)
       BL @SETVWA
       LI   R2,>100              loop counter: 32 chars of 8 bytes
LOOP   MOVB @GRMRD,@VDPWD        alternately: MOVB ->402(R15),@VDPWD
       DEC R2
       JNE LOOP
       ...

 

Unlike VDP, you can read back the GROM address. A subroutine exit would restore this previous value minus 1.   GROM has already added 1 to it.

 

Expanded GROM bases

 

>9800 is called the "GROM Base" in the 99/4A CPU Memory Map.

Add 4 to the port addresses to access GROM expansion banks. /

GRMRD2 EQU >9804   to read from active GROM in BANK 2

 

The console checks BANK 2 for valid GROMs.  If it finds any, it presents REVIEW MODULE LIBRARY as an option after the title screen.  Selecting that will change the GROM base and show what's in it.

(I've seen this message by accident, but never had any actual GROM expansion.)

 

Overriding Console GROM

 

I have no knowledge of GRAM cards for the P-Box, but I know this statement from Peripheral Expansion Box Technical Data (and other books).

"The GROM chips are poor drivers at best", which implies that another peripheral can be built to override the built-in console GROMs.

 

 

So if your GRAM KARTE or HSGPL is configured to override console GROM 0, and it's messed up, you won't be able to start up at all.

 

The comment from @GDMike about >9804 .. because of this bug, the console sometimes reads from GROM 8 when it should read GROM 0.  Inside the console it goes to GROM 0 anyway. 

 

 

* Note: TI BASIC character bias

 

TI BASIC plays a trick by translating ASCII >20 (space) to char >80 etc.  BASIC does this trick to more tightly pack VDP RAM.

This is why a PAB structure has a byte  "BASIC character bias" of >60.   If DSRs put any text on the screen, they need to add the bias to each ASCII code. 

 

See TI BASIC VDP Memory Map


 

 

 

 

 

 

 

 

  • Like 1
Link to comment
Share on other sites

Many thanks @FarmerPotato very interesting read, much appreciated

 

Before I do anything else I need to fix the keyboard on my main TI as when I powered it up I've found the matrix pin 1 isn't working (none of the characters on that pin will function)

 

Took it apart to check the connector and all looks fine, but I reseated it and put it back together (not fun because of the way I've attached the F18a VGA socket) and still doesn't work

 

I have a spare keyboard, but IIRC that's faulty, so next job is to dismantle my spare TI as a keyboard donor (am hoping it's just the keyboard anyway)

Link to comment
Share on other sites

53 minutes ago, Atari2600PAL said:

Many thanks @FarmerPotato very interesting read, much appreciated

 

Before I do anything else I need to fix the keyboard on my main TI as when I powered it up I've found the matrix pin 1 isn't working (none of the characters on that pin will function)

 

Took it apart to check the connector and all looks fine, but I reseated it and put it back together (not fun because of the way I've attached the F18a VGA socket) and still doesn't work

 

I have a spare keyboard, but IIRC that's faulty, so next job is to dismantle my spare TI as a keyboard donor (am hoping it's just the keyboard anyway)

You do have some possible solutions too, Such as Fred Kaal's https://hexbus.com/ti99geek/Projects/kbti994a/kbti994a.html usb keyboard solution or Jedimatt's https://www.jedimatt42.com/4a/ti99usbkeys, if it's not a bad 9901, and you can't fix the keyboard otherwise. FYI

Link to comment
Share on other sites

39 minutes ago, Atari2600PAL said:

Thanks @Gary from OPA & @RickyDean

 

I'm happy to say the replacement keyboard has fixed the problem!

 

Sometime I'll fit the faulty keyboard in the spare machine to double-check it's faulty and not a bad connection

 

 

Good, I would check the wire harness on that pin to see if you have continuity. Those internal wires can break easily if someone was rough on removing the keyboard in the past.

  • Like 1
Link to comment
Share on other sites

36 minutes ago, RickyDean said:

Good, I would check the wire harness on that pin to see if you have continuity. Those internal wires can break easily if someone was rough on removing the keyboard in the past.

Bingo!

 

Strangely the cable I thought was broken (pin 1) did have continuity but a couple of others didn't

 

And then the whole ribbon cable parted from the circuit board in my hand…

 

When I have time I’ll try to fit a new ribbon

 

Thanks

 

  • Like 3
  • Sad 1
Link to comment
Share on other sites

4 hours ago, RickyDean said:

Good, I would check the wire harness on that pin to see if you have continuity. Those internal wires can break easily if someone was rough on removing the keyboard in the past.

 

Yeah—that harness is stiff. I have taken the keyboard out; fixed the bad wire; re-assembled, only to break another wire. replacing that with a flexible cable is the only way to sanity!

 

...lee

  • Like 3
  • Sad 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...