[go: up one dir, main page]

Menu

#1963 RAMLink kernal doesn't override internal function ROM

v3.7
closed-fixed
GTK3
x128
2024-04-07
2023-11-04
No

When RAMLink is enabled the area $E000-$FFFF is going to look like (ramlink) kernal to the CPU even if MMU is configured to show internal function ROM. VICE doesn't handle this correctly and will let the CPU see the internal function ROM. The attached function ROM shows the difference. The ROM jumps to an RTS at $E000 and the result on a real machine is a reset loop (because kernal is in fact enabled), while VICE prints out "VICE EMULATION".

1 Attachments

Discussion

  • Jonas Hultén

    Jonas Hultén - 2023-11-04

    Sorry, I missed the config.

    3.7.1 r44603M
    (GTK3 3.24.33, GLib 2.72.4, Cairo 1.16.0, Pango 1.50.6)

    Linux 5.15.0-88-generic

    98-Ubuntu SMP Mon Oct 2 15:18:56 UTC 2023
    x86_64

     
    • Roberto Muscedere

      Which ramlink rom are you using? I did a pretty thorough test on a real RL with 2.01, but I don't remember the degree to which I tested in the internal ROM as I didn't have one.

       
      • Jonas Hultén

        Jonas Hultén - 2024-01-30

        I used 2.01 both on real HW and in VICE.

         
        • Roberto Muscedere

          Try these test programs. The won't alter your RAMLINK contents, but they will require a reboot after. If they fail, the screen will go red, but let me know where the counter stops.

           
          • Jonas Hultén

            Jonas Hultén - 2024-02-05

            RAMLink1 (RL DOS 2.01):
            C128 stops green at 3030
            C128 in C64 mode stops green at 177

            RAMLink2 (RL DOS 2.00):
            C64 stops green at 177

             
            • Roberto Muscedere

              Okay. I had a look at my testing code and I can verify it doesn't check the internal function ROM situation at all. I will modify it to do so, compare with my RL, and then adjust the VICE code to have the same behavior.

               

              Last edit: Roberto Muscedere 2024-02-07
              • gpz

                gpz - 2024-02-08

                Is that code in the test bench? :)

                 
                • Roberto Muscedere

                  I don't know if it is in the testbench, but it is available in "testprogs/RAMLink".

                   
            • Roberto Muscedere

              Here is an updated tester that will check the internal ROM as well. I worked on my RL. It should go up to 4166. I will start making the changes to VICE.

               
              • Jonas Hultén

                Jonas Hultén - 2024-02-10

                It goes to 227 on my C128 and then turns border red.

                 
                • Roberto Muscedere

                  Which RAMLink? 1 or 2? I assume when you say "1" you mean the HW rev 1, as listed on the bottom of the unit.

                   
                  • Jonas Hultén

                    Jonas Hultén - 2024-02-11

                    Ah, no that's a misunderstanding. I just numbered them 1 and 2 myself.

                    RAMLink1 (in the C128) is a revision 2D
                    RAMLink2 (in the C64) is a revision H

                     
                    • Roberto Muscedere

                      Okay, test 227 checks if the internal function rom at $8000 is open-circuit, which it is on my RL. Can you enter the "monitor" and type in "m 48000" a couple of times to see if the values are inconsistent? Can you do the same with "m 88000" (which is for the external function rom)?

                       
                      • Jonas Hultén

                        Jonas Hultén - 2024-02-11

                        m 48000 is completely stable, since I have an internal function ROM. That's how I found this problem in the first place. I developed an internal function ROM and found that it didn't work with the RAMLink because that shadowed the internal function ROM on my machine (but not in VICE). m88000 is a bit random since I currently don't have an external function ROM connected.

                        If you intended me to test without an internal function ROM I don't understand what you are looking for. This is strictly an issue with internal function ROM in combination with RAMLink.

                         
                        • Roberto Muscedere

                          Okay. Your original message didn't state you were using an internal function rom, just that you noticed a problem in emulation.
                          Regardless, this actual made me find a problem in VICE when it comes to internal function roms; when off, it doesn't show an open-circuit, which I fixed.
                          My tester, rlhw128, only works if you don't have an internal function rom as it looks for open-circuit conditions as most people with a RL will have. However, just out of curiosity, your internal function rom should work as long as it is mapped to the $8000-$DFFF area.
                          From what I know about the RL in 128 mode, it works by "overriding" the signals from the kernal ROM (ie. forces 1's to 0's and 0's to 1's electrically). I don't know if this is a good idea in practice or if it can damage the ROMs over time. In the case of internal roms, it will override as well when the address is $E000-$FFFF. Proper RL operation may depending on the driving strength of the device you used. I don't think the RL designers considered this as they probably just modeled their solution using the operational parameters of the kernal ROM chip itself.
                          I've submitted the changes under r44987.

                           
  • Roberto Muscedere

    • assigned_to: Roberto Muscedere
     
  • Roberto Muscedere

    • status: open --> pending-fixed
     
  • Roberto Muscedere

    Can I close this bug?

     
    • Jonas Hultén

      Jonas Hultén - 2024-03-27

      No, the bug isn't fixed. I downloaded revision 45040 and tried the test case I provided. It still prints VICE EMULATION. So the problem remains. This is how I start VICE (with a valid RAMLink image) to reproduce it.

      ~/temp/vice-edge/vice/src/x128 -80 -directory ~/temp/vice-edge/vice/data -pal +confirmonexit -intfrom int_test.bin -intfunc 1 -ramlink -ramlinkbios ramlink201.bin -ramlinkmode 1 -ramlinksize 8 -ramlinkimage ramlink_scratch.rl -ramlinkimagerw

       
      • Roberto Muscedere

        Can you try with "-cartramlink ramlink2.bin" instead of "-ramlink -ramlinkbios ramlink201.bin" instead?

         
        • Jonas Hultén

          Jonas Hultén - 2024-04-02

          That worked, so the other option to start with RAMLink needs to be removed then. You can close this ticket.

           
  • Roberto Muscedere

    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.