Xemu [doxygen]  hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
Macros | Enumerations | Functions | Variables
dma65.c File Reference
#include "xemu/emutools.h"
#include "dma65.h"
#include "xemu/cpu65.h"
#include "rom.h"
Include dependency graph for dma65.c:

Go to the source code of this file.

Macros

#define DEBUGDMA(...)   DEBUG(__VA_ARGS__)
 
#define DMA_ADDR_INTEGER_PART(p)   ((p)>>8)
 
#define DMA_SOURCE_SKIP_RATE   ((int)(dma_registers[0x08] | (dma_registers[0x09] << 8)))
 
#define DMA_TARGET_SKIP_RATE   ((int)(dma_registers[0x0A] | (dma_registers[0x0B] << 8)))
 
#define DMA_ADDR_FRACT_PART(p)   ((p) & 0xFF)
 
#define DMA_ADDRESSING(channel)   ((DMA_ADDR_INTEGER_PART(channel.addr) & channel.mask) + channel.base)
 
#define MEM_LIST_MASK   0xFFFF
 
#define MEM_ADDR_MASK   0xFFFFF
 
#define DMA_READ_SOURCE()   (XEMU_UNLIKELY(source.is_io) ? DMA_SOURCE_IOREADER_FUNC(DMA_ADDRESSING(source)) : DMA_SOURCE_MEMREADER_FUNC(DMA_ADDRESSING(source)))
 
#define DMA_READ_TARGET()   (XEMU_UNLIKELY(target.is_io) ? DMA_TARGET_IOREADER_FUNC(DMA_ADDRESSING(target)) : DMA_TARGET_MEMREADER_FUNC(DMA_ADDRESSING(target)))
 
#define DMA_READ_LIST_NEXT_BYTE()   DMA_LIST_READER_FUNC(((list_addr++) & MEM_LIST_MASK) | list_base)
 

Enumerations

enum  dma_op_types {
  COPY_OP, MIX_OP, SWAP_OP, FILL_OP,
  COPY_OP, MIX_OP, SWAP_OP, FILL_OP
}
 

Functions

void dma_write_reg (int addr, Uint8 data)
 
int dma_is_in_use (void)
 
int dma_update (void)
 
int dma_update_multi_steps (int do_for_cycles)
 
void dma_init_set_rev (unsigned int revision, const Uint8 *rom)
 
void dma_init (unsigned int revision)
 
void dma_reset (void)
 
Uint8 dma_read_reg (int addr)
 

Variables

Uint8 dma_status
 
Uint8 dma_registers [16]
 
int dma_chip_revision
 
int dma_chip_revision_is_dynamic
 
int dma_chip_revision_override
 
int dma_chip_initial_revision
 

Macro Definition Documentation

◆ DEBUGDMA

#define DEBUGDMA (   ...)    DEBUG(__VA_ARGS__)

Definition at line 51 of file dma65.c.

◆ DMA_ADDR_FRACT_PART

#define DMA_ADDR_FRACT_PART (   p)    ((p) & 0xFF)

Definition at line 113 of file dma65.c.

◆ DMA_ADDR_INTEGER_PART

#define DMA_ADDR_INTEGER_PART (   p)    ((p)>>8)

Definition at line 110 of file dma65.c.

◆ DMA_ADDRESSING

#define DMA_ADDRESSING (   channel)    ((DMA_ADDR_INTEGER_PART(channel.addr) & channel.mask) + channel.base)

Definition at line 115 of file dma65.c.

◆ DMA_READ_LIST_NEXT_BYTE

#define DMA_READ_LIST_NEXT_BYTE ( )    DMA_LIST_READER_FUNC(((list_addr++) & MEM_LIST_MASK) | list_base)

Definition at line 183 of file dma65.c.

◆ DMA_READ_SOURCE

Definition at line 140 of file dma65.c.

◆ DMA_READ_TARGET

Definition at line 141 of file dma65.c.

◆ DMA_SOURCE_SKIP_RATE

#define DMA_SOURCE_SKIP_RATE   ((int)(dma_registers[0x08] | (dma_registers[0x09] << 8)))

Definition at line 111 of file dma65.c.

◆ DMA_TARGET_SKIP_RATE

#define DMA_TARGET_SKIP_RATE   ((int)(dma_registers[0x0A] | (dma_registers[0x0B] << 8)))

Definition at line 112 of file dma65.c.

◆ MEM_ADDR_MASK

#define MEM_ADDR_MASK   0xFFFFF

Definition at line 137 of file dma65.c.

◆ MEM_LIST_MASK

#define MEM_LIST_MASK   0xFFFF

Definition at line 136 of file dma65.c.

Enumeration Type Documentation

◆ dma_op_types

Enumerator
COPY_OP 
MIX_OP 
SWAP_OP 
FILL_OP 
COPY_OP 
MIX_OP 
SWAP_OP 
FILL_OP 

Definition at line 68 of file dma65.c.

Function Documentation

◆ dma_init()

void dma_init ( unsigned int  revision)

Definition at line 647 of file dma65.c.

◆ dma_init_set_rev()

void dma_init_set_rev ( unsigned int  revision,
const Uint8 rom 
)

Definition at line 620 of file dma65.c.

◆ dma_is_in_use()

int dma_is_in_use ( void  )

Definition at line 303 of file dma65.c.

Here is the caller graph for this function:

◆ dma_read_reg()

Uint8 dma_read_reg ( int  addr)

Definition at line 693 of file dma65.c.

◆ dma_reset()

void dma_reset ( void  )

Definition at line 674 of file dma65.c.

◆ dma_update()

int dma_update ( void  )

Definition at line 315 of file dma65.c.

◆ dma_update_multi_steps()

int dma_update_multi_steps ( int  do_for_cycles)

Definition at line 610 of file dma65.c.

◆ dma_write_reg()

void dma_write_reg ( int  addr,
Uint8  data 
)

Definition at line 244 of file dma65.c.

Variable Documentation

◆ addr

int addr

Definition at line 119 of file dma65.c.

◆ base

int base

Definition at line 120 of file dma65.c.

◆ col_counter

int col_counter

Definition at line 128 of file dma65.c.

◆ col_limit

int col_limit

Definition at line 128 of file dma65.c.

◆ dma_chip_initial_revision

int dma_chip_initial_revision

Definition at line 59 of file dma65.c.

◆ dma_chip_revision

int dma_chip_revision

Definition at line 56 of file dma65.c.

◆ dma_chip_revision_is_dynamic

int dma_chip_revision_is_dynamic

Definition at line 57 of file dma65.c.

◆ dma_chip_revision_override

int dma_chip_revision_override

Definition at line 58 of file dma65.c.

◆ dma_registers

Uint8 dma_registers[16]

Definition at line 55 of file dma65.c.

◆ dma_status

Uint8 dma_status

Definition at line 54 of file dma65.c.

◆ enabled

int enabled

Definition at line 90 of file dma65.c.

◆ enhanced_dma

int enhanced_dma

Definition at line 91 of file dma65.c.

◆ is_io

int is_io

Definition at line 124 of file dma65.c.

◆ is_modulo

int is_modulo

Definition at line 123 of file dma65.c.

◆ mask

int mask

Definition at line 121 of file dma65.c.

◆ row_counter

int row_counter

Definition at line 128 of file dma65.c.

◆ row_limit

int row_limit

Definition at line 128 of file dma65.c.

◆ saved_revision

int saved_revision

Definition at line 93 of file dma65.c.

◆ step

int step

Definition at line 122 of file dma65.c.

◆ used

int used

Definition at line 128 of file dma65.c.

◆ value

int value

Definition at line 128 of file dma65.c.