java.lang.Object
libsidplay.components.cart.Cartridge
libsidplay.components.cart.supported.REU

public class REU extends Cartridge

16 MB RAM Expansion Unit emulation. No REU of this size was ever produced, but 1541U and VICE nevertheless can emulate one.

The real REUs that were manufactured had the following sizes:

  • 1700: 128 kB
  • 1750: 512 kB
  • 1764: 256 kB
  • 1750 XL: 2 MB
The 1750 REU uses 256 kb chips. The 1750 XL is a mod on 1750, where a custom circuit detects the next 2 higher bits of the bank register (bits 3 and 4 above 0-2), and uses these to do bank-switching between four 512 kB banks. Consequently, it was not possible to read those bits from the BANK register, and overflow of the REU RAM address can't switch to next 512 kB bank, but loops back to the start of each 512 kB window.

We are not emulating the wrap-around features of the REU chips yet. We are emulating a fictional REU with full 8-bit wide BANK register. We do emulate the verify-related bugs.

REU images are pure RAM dumps with no internal structure.

Autor:
AL
  • Felddetails

    • REGISTER_STATUS

      private static final int REGISTER_STATUS
      Siehe auch:
    • REGISTER_COMMAND

      private static final int REGISTER_COMMAND
      Siehe auch:
    • REGISTER_BASEADDR_LOW

      private static final int REGISTER_BASEADDR_LOW
      Siehe auch:
    • REGISTER_BASEADDR_HIGH

      private static final int REGISTER_BASEADDR_HIGH
      Siehe auch:
    • REGISTER_RAMADDR_LOW

      private static final int REGISTER_RAMADDR_LOW
      Siehe auch:
    • REGISTER_RAMADDR_HIGH

      private static final int REGISTER_RAMADDR_HIGH
      Siehe auch:
    • REGISTER_BANK

      private static final int REGISTER_BANK
      Siehe auch:
    • REGISTER_BLOCKLEN_LOW

      private static final int REGISTER_BLOCKLEN_LOW
      Siehe auch:
    • REGISTER_BLOCKLEN_HIGH

      private static final int REGISTER_BLOCKLEN_HIGH
      Siehe auch:
    • REGISTER_INTERRUPT

      private static final int REGISTER_INTERRUPT
      Siehe auch:
    • REGISTER_ADDR_CONTROL

      private static final int REGISTER_ADDR_CONTROL
      Siehe auch:
    • REGISTER_INTERRUPT_UNUSED

      private static final int REGISTER_INTERRUPT_UNUSED
      Siehe auch:
    • REGISTER_ADDR_CONTROL_UNUSED

      private static final int REGISTER_ADDR_CONTROL_UNUSED
      Siehe auch:
    • wrapAround

      protected static int wrapAround
      AND mask depends of the RAM expansion size.
    • dmaActive

      protected boolean dmaActive
      REU currently actively performing DMA
    • ram

      protected byte[] ram
      REU RAM region (max. 16 MB)
    • ba

      protected boolean ba
      Current state of the bus available signal
    • ff00

      protected boolean ff00
      Is FF00 REU DMA trigger enabled
    • status

      protected byte status
      Misc. REU register
    • command

      protected byte command
      Misc. REU register
    • interrupt

      protected byte interrupt
      Misc. REU register
    • addrControl

      protected byte addrControl
      Misc. REU register
    • baseAddr

      protected int baseAddr
      DMA operation C64 address
    • shadowBaseAddr

      protected int shadowBaseAddr
      DMA operation C64 address
    • ramAddr

      protected int ramAddr
      DMA operation REU address
    • shadowRamAddr

      protected int shadowRamAddr
      DMA operation REU address
    • dmaLen

      protected short dmaLen
      DMA operation length
    • shadowDmaLen

      protected short shadowDmaLen
      DMA operation length
    • reuOperation

      protected REU.Command reuOperation
      Currently active command
    • dmaEvent

      protected final REU.DMAEvent dmaEvent
    • dmaBeginEvent

      protected final Event dmaBeginEvent
    • dmaEndEvent

      protected final Event dmaEndEvent
    • io2Bank

      private final Bank io2Bank
  • Konstruktordetails

  • Methodendetails

    • interrupt

      protected void interrupt()
      REU interrupt enable/disable
    • getIO2

      public Bank getIO2()
      Beschreibung aus Klasse kopiert: Cartridge
      Acquire the IO2 bank.
      Setzt außer Kraft:
      getIO2 in Klasse Cartridge
      Gibt zurück:
      The bank responding to IO2 line.
    • reset

      public void reset()
      Beschreibung aus Klasse kopiert: Cartridge
      Bring the cart to power-on state. If overridden, remember to call the superclass method.
      Setzt außer Kraft:
      reset in Klasse Cartridge
    • changedBA

      public void changedBA(boolean state)
      Beschreibung aus Klasse kopiert: Cartridge
      Callback to notify cartridge of current state of BA signal on the system bus. The boolean value is active high.
      Setzt außer Kraft:
      changedBA in Klasse Cartridge
      Parameter:
      state -
    • installBankHooks

      public void installBankHooks(Bank[] cpuReadMap, Bank[] cpuWriteMap)
      Beschreibung aus Klasse kopiert: Cartridge
      If the cartridge needs to listen to write activity on specific banks, it can install the requisite hooks into the bank here.
      Setzt außer Kraft:
      installBankHooks in Klasse Cartridge
      Parameter:
      cpuReadMap -
      cpuWriteMap -
    • beginDma

      protected void beginDma()
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Cartridge
    • getModelName

      private String getModelName()