Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>{ 0x0000, 0x1FFF, writeRAMBankEnable, NULL}, </code></pre> <p>Did you perhaps mean</p> <pre><code>{ 0x0000, 0x1FFF, &amp;memoria::writeRAMBankEnable, NULL}, </code></pre> <p>You have to include the class name when referring to a member, except within the class. And when making a pointer to a member function, you always need the class name.</p> <p>The best solution is to use the polymorphism features built into the language:</p> <pre><code>ref struct MemoryRegion abstract { virtual uint8_t Read( uint32_t address ) = 0; virtual void Write( uint32_t address, uint8_t value ) = 0; const uint32_t start_address, end_address; protected: MemoryRegion( uint32_t start, uint32_t end ) : start_address(start), end_address(end) {} }; ref struct SRAM : MemoryRegion { SRAM( uint32_t start, uint32_t end ) : MemoryRegion(start, end) {} virtual uint8_t Read(uint32_t address); virtual void Write(uint32_t address, uint8_t value); }; ref struct RAM : MemoryRegion { RAM( uint32_t start, uint32_t end ) : MemoryRegion(start, end) {} virtual uint8_t Read(uint32_t address); virtual void Write(uint32_t address, uint8_t value); }; ref struct VRAM : MemoryRegion { VRAM( uint32_t start, uint32_t end ) : MemoryRegion(start, end) {} virtual uint8_t Read(uint32_t address); virtual void Write(uint32_t address, uint8_t value); }; </code></pre> <p>and so on. Then you can make an array of handles to the base type, and fill in all kinds of behavior-specific classes:</p> <pre><code>array&lt;MemoryRegion^&gt;^ memories = gcnew array&lt;MemoryRegion^&gt;(10); memories[0] = gcnew SRAM(0xA000, 0xBFFF); // ... </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload