Jump to content
IGNORED

Horizon RAMdisk ROS and CFG Development


Recommended Posts

I don't see any code in TurboForth that actually tests for the presence of the SAMS card. The comments in the code just state that the SAMS card is required. Here's the last initializing code I have (probably not Mark's latest):

;[ initialise SAMS card if fitted
        li r12,>1e00                ; sams CRU base
        sbo 0                       ; enable access to mapper registers
        sbz 1                       ; disable mapping while we set it up
        li r0,>4004                 ; register for >2000
        li r1,>f8f8                 ; map bank >f8 into >2000
        mov r1,*r0+                 ; do it
        li r1,>f9f9                 ; map bank >f9...
        mov r1,*r0+                 ; ...into >3000
    ; now set up the banks for high memory...
        li r0,>4014                 ; register address
        li r1,>fafa                 ; register value
        li r2,6                     ; loop count
sams    mov r1,*r0+                 ; write to the register
        ai r1,>0101                 ; next register value
        dec r2                      ; finished?
        jne sams                    ; loop if not
        sbo 1                       ; enable mapping
        sbz 0                       ; lock the mapper registers
;] 

...lee

Link to comment
Share on other sites

I don't see any code in TurboForth that actually tests for the presence of the SAMS card. The comments in the code just state that the SAMS card is required. Here's the last initializing code I have (probably not Mark's latest):

 

Thanks Lee. Here is the routine I am using for detection. It turns on the card, reads one of the map registers, changes that register, then compares the two values. If the value is different, I make the assumption the SAMS is present. This routine is only called for CRU address 0x1E00, so cards like the IDE or RAMdisk should not be impacted. (Even if one was found here, I restore the value before turning off the card).

 

I noticed Willsy's code modifies both the MSByte and LSByte in the mapper address, whereas I am modifying only the Lsbyte. Does the SAMS discard the LSByte? That might explain things, especially if the mapped page is held in the MSByte.

 

 

 

*
* SuperAMS maps in 4K chunks
*
PLAYWS BSS 32
SAMSDT DATA PLAYWS,$+2
* A000 - page >A in transparent(unmapped mode / SBZ 1)
       CLR  R1                0=no ams
       LI   R12,>1E00
       SBO  0
       MOV  @>4014,R5
       INCT @>4014
       C    @>4014,R5         equal? ROM or nothing
       JEQ  NOAMS
       SETO R1
 
       MOV  R5,@>4014
NOAMS  SBZ  0
       MOV  R1,@0(R13)        RETURN callers R0
       RTWP
 
Link to comment
Share on other sites

For reference, I located Brad Snyder's XB Packer SAMS detection routine. I'll look at this later today along with any additional ideas folks come up with.

 

 

* the following AMS detect per a suggestion by Jeff White
 
       SBO   0                mapper on
       CLR   @>4014           map same page to two different addresses
       CLR   @>4016
       SBZ   0                mapper off
       SBO   1                map mode
       MOV   @>B000,R7        save value there now
       CLR   @>B000           start from known value
       MOV   @FF,@>A000       write >FFFF
       MOV   @>B000,R6        get value
       MOV   R7,@>B000        replace old value, in case there is no AMS
       SBZ   1                pass mode
       C     R6,@FF
       JEQ   SETOK1           match?, if so continue
Link to comment
Share on other sites

Just to rule it out, do you know for sure the SAMS card is functional? Are here any other potentially conflicting cards?

 

It is strange that both methods fail on the actual hardware yet work with Classic99, particularly the Brad Snyder method which is used in his software.

 

I will read Thierry's page in the meantime for any potential clues.

Link to comment
Share on other sites

THIERY´s IDE:

 

I felt boring, so I digged it out, and set it from CRU >1F00 to >1E00 :)

so it was recognized as AMS/SAMS-Card (?) I think just by the address? hmmmm

So the DSRs seem not to be detected, or to misinterpreted...

 

BTW, I read out the IDE´s DSRs with Fred´s tool, maybe for a better recko:

 

 

post-41141-0-99837300-1438126022_thumb.jpgpost-41141-0-31796500-1438126031_thumb.jpgpost-41141-0-36778100-1438126040_thumb.jpg

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...