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 dependency graph for dma65.c:

Go to the source code of this file.

Macros

#define DEBUGDMA(...)   DEBUG(__VA_ARGS__)
 
#define DMA_ADDRESSING(channel)   ((channel.addr & channel.mask) | channel.base)
 
#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_WRITE_SOURCE(data)
 
#define DMA_WRITE_TARGET(data)
 
#define DMA_READ_LIST_NEXT_BYTE()   DMA_LIST_READER_FUNC(((list_addr++) & 0xFFFF) | 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_update (void)
 
int dma_update_multi_steps (int do_for_cycles)
 
void detect_rom_date (Uint8 *p)
 
void dma_init_set_rev (unsigned int revision, Uint8 *rom_ver_signature)
 
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_initial_revision
 
int rom_date = 0
 

Macro Definition Documentation

◆ DEBUGDMA

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

Definition at line 48 of file dma65.c.

◆ DMA_ADDRESSING

#define DMA_ADDRESSING (   channel)    ((channel.addr & channel.mask) | channel.base)

Definition at line 77 of file dma65.c.

◆ DMA_READ_LIST_NEXT_BYTE

#define DMA_READ_LIST_NEXT_BYTE ( )    DMA_LIST_READER_FUNC(((list_addr++) & 0xFFFF) | list_base)

Definition at line 114 of file dma65.c.

◆ DMA_READ_SOURCE

Definition at line 96 of file dma65.c.

◆ DMA_READ_TARGET

Definition at line 97 of file dma65.c.

◆ DMA_WRITE_SOURCE

#define DMA_WRITE_SOURCE (   data)
Value:
do { \
if (XEMU_UNLIKELY(source.is_io)) \
DMA_SOURCE_IOWRITER_FUNC(DMA_ADDRESSING(source), data); \
} while (0)

Definition at line 98 of file dma65.c.

◆ DMA_WRITE_TARGET

#define DMA_WRITE_TARGET (   data)
Value:
do { \
if (XEMU_UNLIKELY(target.is_io)) \
DMA_TARGET_IOWRITER_FUNC(DMA_ADDRESSING(target), data); \
} while (0)

Definition at line 104 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 58 of file dma65.c.

Function Documentation

◆ detect_rom_date()

void detect_rom_date ( Uint8 p)

Definition at line 415 of file dma65.c.

Here is the caller graph for this function:

◆ dma_init()

void dma_init ( unsigned int  revision)

Definition at line 465 of file dma65.c.

◆ dma_init_set_rev()

void dma_init_set_rev ( unsigned int  revision,
Uint8 rom_ver_signature 
)

Definition at line 439 of file dma65.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dma_read_reg()

Uint8 dma_read_reg ( int  addr)

Definition at line 502 of file dma65.c.

◆ dma_reset()

void dma_reset ( void  )

Definition at line 488 of file dma65.c.

◆ dma_update()

int dma_update ( void  )

Definition at line 215 of file dma65.c.

◆ dma_update_multi_steps()

int dma_update_multi_steps ( int  do_for_cycles)

Definition at line 405 of file dma65.c.

◆ dma_write_reg()

void dma_write_reg ( int  addr,
Uint8  data 
)

Definition at line 175 of file dma65.c.

Here is the caller graph for this function:

Variable Documentation

◆ addr

int addr

Definition at line 81 of file dma65.c.

◆ base

int base

Definition at line 82 of file dma65.c.

◆ col_counter

int col_counter

Definition at line 90 of file dma65.c.

◆ col_limit

int col_limit

Definition at line 90 of file dma65.c.

◆ dma_chip_initial_revision

int dma_chip_initial_revision

Definition at line 54 of file dma65.c.

◆ dma_chip_revision

int dma_chip_revision

Definition at line 53 of file dma65.c.

◆ dma_registers

Uint8 dma_registers[16]

Definition at line 52 of file dma65.c.

◆ dma_status

Uint8 dma_status

Definition at line 51 of file dma65.c.

◆ enabled

int enabled

Definition at line 90 of file dma65.c.

◆ is_io

int is_io

Definition at line 86 of file dma65.c.

◆ is_modulo

int is_modulo

Definition at line 85 of file dma65.c.

◆ mask

int mask

Definition at line 83 of file dma65.c.

◆ rom_date

int rom_date = 0

Definition at line 55 of file dma65.c.

◆ row_counter

int row_counter

Definition at line 90 of file dma65.c.

◆ row_limit

int row_limit

Definition at line 90 of file dma65.c.

◆ step

int step

Definition at line 84 of file dma65.c.

◆ used

int used

Definition at line 90 of file dma65.c.

◆ value

int value

Definition at line 90 of file dma65.c.

DMA_TARGET_MEMWRITER_FUNC
#define DMA_TARGET_MEMWRITER_FUNC
Definition: xemu-target.h:16
DMA_ADDRESSING
#define DMA_ADDRESSING(channel)
Definition: dma65.c:77
m65-memcontent-generator.data
data
Definition: m65-memcontent-generator.py:119
DMA_SOURCE_MEMWRITER_FUNC
#define DMA_SOURCE_MEMWRITER_FUNC
Definition: xemu-target.h:14
XEMU_UNLIKELY
#define XEMU_UNLIKELY(__x__)
Definition: emutools_basicdefs.h:125