@Namespace(value="ale::stella") @NoOffset @Properties(inherit=ale.class) public class Cartridge extends Device
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
Cartridge(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
BytePointer |
about()
Query some information about this cartridge.
|
int |
bank()
Get the current bank.
|
void |
bank(short bank)
Set the specified bank.
|
int |
bankCount()
Query the number of banks supported by the cartridge.
|
static Cartridge |
create(byte[] image,
int size,
StellaProperties props,
Settings settings) |
static Cartridge |
create(ByteBuffer image,
int size,
StellaProperties props,
Settings settings) |
static Cartridge |
create(BytePointer image,
int size,
StellaProperties props,
Settings settings)
Create a new cartridge object allocated on the heap.
|
byte[] |
getImage(int[] size) |
ByteBuffer |
getImage(IntBuffer size) |
BytePointer |
getImage(IntPointer size)
Access the internal ROM image for this cartridge.
|
void |
lockBank()
Lock/unlock bankswitching capability.
|
boolean |
patch(short _address,
byte value)
Patch the cartridge ROM.
|
boolean |
save(Pointer out)
Save the internal (patched) ROM image.
|
boolean |
save(Serializer out)
MGB: Added to drop warning on overloaded save() method.
|
void |
unlockBank() |
install, load, name, peek, poke, reset, systemCyclesReset
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public Cartridge(Pointer p)
Pointer(Pointer)
.public static Cartridge create(@Cast(value="const uint8_t*") BytePointer image, @Cast(value="uint32_t") int size, @Const @ByRef StellaProperties props, @Const @ByRef Settings settings)
image
- A pointer to the ROM imagesize
- The size of the ROM imageprops
- The properties associated with the gamesettings
- The settings associated with the systempublic static Cartridge create(@Cast(value="const uint8_t*") ByteBuffer image, @Cast(value="uint32_t") int size, @Const @ByRef StellaProperties props, @Const @ByRef Settings settings)
public static Cartridge create(@Cast(value="const uint8_t*") byte[] image, @Cast(value="uint32_t") int size, @Const @ByRef StellaProperties props, @Const @ByRef Settings settings)
@StdString public BytePointer about()
@Cast(value="bool") public boolean save(@Cast(value="std::ofstream*") @ByRef Pointer out)
out
- The output file stream to save the image@Cast(value="bool") public boolean save(@ByRef Serializer out)
public void lockBank()
public void unlockBank()
public int bank()
public int bankCount()
@Cast(value="bool") public boolean patch(@Cast(value="uint16_t") short _address, @Cast(value="uint8_t") byte value)
address
- The ROM address to patchvalue
- The value to place into the address@Cast(value="uint8_t*") public BytePointer getImage(@ByRef IntPointer size)
size
- Set to the size of the internal ROM image data@Cast(value="uint8_t*") public ByteBuffer getImage(@ByRef IntBuffer size)
Copyright © 2022. All rights reserved.