File: sdd1.hpp

package info (click to toggle)
libretro-bsnes-mercury 094%2Bgit20160126-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 9,632 kB
  • sloc: cpp: 109,056; ansic: 3,097; makefile: 638; xml: 11; sh: 1
file content (40 lines) | stat: -rw-r--r-- 862 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
struct SDD1 {
  MappedRAM rom;
  MappedRAM ram;

  void init();
  void load();
  void unload();
  void power();
  void reset();

  uint8 read(unsigned addr);
  void write(unsigned addr, uint8 data);

  uint8 mmc_read(unsigned addr);

  uint8 mcurom_read(unsigned addr);
  void mcurom_write(unsigned addr, uint8 data);

  uint8 mcuram_read(unsigned addr);
  void mcuram_write(unsigned addr, uint8 data);

  void serialize(serializer&);

private:
  uint8 sdd1_enable;  //channel bit-mask
  uint8 xfer_enable;  //channel bit-mask
  bool dma_ready;     //used to initialize decompression module
  unsigned mmc[4];    //memory map controller ROM indices

  struct {
    unsigned addr;    //$43x2-$43x4 -- DMA transfer address
    uint16 size;      //$43x5-$43x6 -- DMA transfer size
  } dma[8];

public:
  #include "decomp.hpp"
  Decomp decomp;
};

extern SDD1 sdd1;