Jump to content
IGNORED

Supernotes


GDMike

Recommended Posts

10 hours ago, GDMike said:

NOW, my question is, I'm using the SAMs bank >4004 (3000) area. 

 

>4004 is the register for the >2000 block. If you want the >3000 block, use register >4006.

 

10 hours ago, GDMike said:

I think the EA book says some of this runs into the def table, now, I am not reaching that far out, but SAMs mapper might since it maps the whole >3000 bank.

 

You are, indeed, “reaching that far out” because, as soon as you grab a SAMS page other than >0003, you have stomped on the whole >3000 page. On the other hand, you do not need the REF/DEF table unless you are loading/linking a program.

 

...lee

  • Like 1
Link to comment
Share on other sites

But when I changed R2 to >4006 the computer locked up. But i dont think this is supposed to be >4004. I just noticed it.

ill review my order of init procedure in my early stage of code.

 

SINIT  MOV  R11,@SAVRTN
       LI   R12,>1E00
       LI   R2,>4004
       LI   R1,>0200
       LI   R0,14
       SBO  0
LP1    MOV  R1,*R2+
       AI   R1,>100
       DEC  R0
       JNE  LP1
       SBZ  0
       MOV  @SAVRTN,R11
       RT  

Edited by GDMike
Link to comment
Share on other sites

My Start process for SAMs is

BL @ SINIT  * my code in #453

BL SAMON listed below:

 

SAMON  MOV  R11,@SAVRTN
       LI   R12,>1E00
       SBO  1
       MOV  @SAVRTN,R11
       RT   *R11

and the mapped page:

LI R1, >1100

BL @MAPPG  * listed below

 

MAPPG  MOV  R11,@SAVRTN
       LI   R12,>1E00
       SBO  0
       LI   R3,>401E          * MUST HAVE A VALUE IN R1
       MOV  R1,*R3            * PRIOR!
       SBZ  0
       MOV  @SAVRTN,R11
       RT   *R11

 

 

 

Link to comment
Share on other sites

HMMM. well since i changed the SINIT routine, everything BOMBS out.

I suppose SINIT was never working.

I tried changing the order of using SAMON first AND then SINIT and it bombed.

I understood that SINIT turned on the card so I thought it should be first to run.

Ive also heard that mapping should be done first too, I'll do that now.

 

Link to comment
Share on other sites

I am no expert in TI Assembler but taking your code here is what I think you want.

You need to set a value in all the registers that makes the card map TI RAM to the low end of the SAMS card.

So all 16 registers must be touched.

 

ADDR     VALUE      SAMS REGISTER

----------------------------------------------

>0000    0000   ->   4000

>1000    0100   ->   4002

>2000    0200   ->   4004

>3000    0300   ->   4006   ( later you will only change this one to have pages mapped into >3000)

etc..

 

Apologies for all the comments but you are having enough bad luck with this that I want to be clear.

 

I create MAP3K so that you just put the page number in the low byte of BANK and call MAP3K.

This way you will always be able to check which bank you have paged into CPU space.

 

Hope it provides some insight.

I know there is a SAMSINI routine in one of the papers I downloaded from the resource section a year ago.  Since my code is untested it might be wise to check that out.

 

 EDIT SEE NEXT POST:

 

 

  • Like 1
Link to comment
Share on other sites

Yes and Originally I thought this was doing that, Either I pasted this wrong or something? But I was given this code by @Falcor4, ill go back to his email and dbl check, BUT maybe I was using a differnt address back then and he might have been implying that this would init that bank?

thats prob what happened, I thought originally it would init the card though.

my bad for not looking close enough.

sorry,

Link to comment
Share on other sites

Found it!  This uses a CI instruction to test that we got to the last REGISTER

************************************************
* SUBROUTINES SECTION
*
* AMSINI SETS AMS CARD TO "POWER-UP" CONDITION
*
AMSINI LI   R12,>1E00    AMS CRU BASE
       SBO  0            TURN ON AMS
       LI   R1,>FEFF     (THIS IS ->0101)
       LI   R0,>4000     START OF MEMORY
AMSLP  AI   R1,>0101     ADD 1 PAGE
       MOV  R1,*R0+      MOVE 2 BYTES TO MEM-MAPPER
       CI   R0,>4020     ALL DONE?
       JLT  AMSLP        NO, INIT MORE
       RT                RETURN

 

Link to comment
Share on other sites

Here is the document. 

 

And I think my sub-routine is still valid.

 

***************************************************************************
BANK   0000               * SAMS bank that we have paged into CPU RAM >3000

* SUBROUTINE to put BANK into SAMS register that maps a SAMS bank into CPU RAM >3000
MAP3K  MOV  R11,@SAVRTN
       LI   R12,>1E00      * CRU address of SAMS
       SBO  0              * Turn on SAMS card 
       MOV  @BANK,@4006    * move the BANK we want into the register for CPU addr >3000
       SBZ  0
       MOV  @SAVRTN,R11
	   RT
	   
* Usage example:
*      MOV >FF00,@BANK
*      BL   @MAP3K
    

 

SAMSCARD DEMO.ASM

  • Like 1
Link to comment
Share on other sites

oK DOKEY.  @theBF, Ive changed my SINIT routine to include that one you made for me. Thank you!

I saw no CHANGES in behavior, but i think it must like it or it wouldve bombed.

Im still getting my "001" page #..ill investigate more..

this could take awhile. as I looked for 4 hours yesterday trying to isolate it. I know that it happens after page down 5 times and EVERY 5th page down it repeats. AFTER my PAGE DOWN routine.

 

Edited by GDMike
Link to comment
Share on other sites

 

1 minute ago, GDMike said:

oK DOKEY.  @theBF, Ive changed my SINIT routine to include that one you made for me. Thank you!

I saw no CHANGES in behavior, but i think it must like it or it wouldve bombed.

Im still getting my "001" page #..ill investigate more

 

Cool.

And my MAP3K needs a DATA directive before the '0000'.   

Too much Forth. :)

 

  • Like 1
Link to comment
Share on other sites

Lee, thx for the info regarding using that>3000 Sam's paging. Originally, I thought I'd be switching Sam's off when I was done using the mapped data, then I found that I'm just as happy not switching off at all, but then occured that maybe I'm screwing something up some since I'm getting this"001" page error. 

I'm still looking for that bug...

I removed all references to Sam's and I'm still getting the error on the page going from page four to Page five , then turning into page 1,  the data is correct it moves page 4 to page 5 page 5 Page 6 and so on.

still looking

Edited by GDMike
Link to comment
Share on other sites

Here's the latest bug, like I said. I turned off the page number generator and get nothing but blanks for page #, until the 5th page down.

Still looking...but, hey. SAMs works!!

I'm closing in on it. I get page 5 displayed and then I hit a BL routine to refresh the screen. Now I've researched that refresh routine and found nothing, but I'll look again..

Edited by GDMike
Link to comment
Share on other sites

19 minutes ago, GDMike said:

Lee, thx for the info regarding using that>3000 Sam's paging. Originally, I thought I'd be switching Sam's off when I was done using the mapped data, then I found that I'm just as happy not switching off at all, but then occured that maybe I'm screwing something up some since I'm getting this"001" page error. 

I'm still looking for that bug...

I removed all references to Sam's and I'm still getting the error on the page going from page four to Page five , then turning into page 1,  the data is correct it moves page 4 to page 5 page 5 Page 6 and so on.

still looking

There is an important thing to know here.

Turning on SBO 0   turns on the card and exposes the registers at >4000.

Turning on SBO 1   turns on the "mapper" which pages in whatever values are in the registers. If bit 1 is off the SAMS card does not map in new pages.

 

So you do SBO 0 to write to the registers and then turn it off.

BUT we must keep SBO 1  on to make the SAMS pages go into CPU RAM space. 

  • Like 1
Link to comment
Share on other sites

I think my mappg, which is the last thing that runs is doing this. But I'm not doing a SAMOFF after I'm done..

I'll verify the mappg.

It's actually doing a SBZ 0 at its last instruction in the MAPPG routine.

I'll change that to reflect SBO 1

Edited by GDMike
Link to comment
Share on other sites

Ok. I noticed a little speed difference that time while initializing.

But all went well, all imported pages are intact. Oops, I only checked the first 4. Rerunning

I've placed a stop at the end of my refresh routine to try to catch my "001" and it didn't show up yet with the,"001" 

I'll look at where it goes from there.

Edited by GDMike
Link to comment
Share on other sites

The program would take days. It's gigantic.lol

But I think I found the culprit I was sending my cursor to the last position of POS and I think my POS was corrupted, update: that wasn't it. Still looking.

Thank you. see if I didn't have the errorr I wouldn't have corrected the other mistakes

Edited by GDMike
Link to comment
Share on other sites

SNP, Assembly version notes:

Import of all 9 pages into SAMs SNP pages. Finally. Without Error. This data is pulled off the cartridge with ctrl I(eye)

As you can see, page 10-?? is still full of garbage.

 

Page 2-900? Aren't formatted to blank spaces yet, or correctly. That's my next adventure. As it was supposed to have been done at boot up.

I'll figure that out next. 

 

Update: my init program was still using >F000 to clear.. duh...man I need more coffee. It's been a rough day.

Edited by GDMike
Link to comment
Share on other sites

Ahh. Everything is nice and clean now during pg up/down.

I was using the old Sam's address of >F000 instead of>3000 to clear. Dang mistakes I've been making. Ahh, there nothing compared to the progress I've made, with help. 

Most of the mistakes that I've had were related to Sam's. 

 

Lots of reading again when it comes to that card.

 

 

 

Edited by GDMike
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...