#include <iostream>
#include <dos.h>
#include <stdio.h>
#include "clib/hwapi.h"
#include "amd186.h"
Go to the source code of this file.
Functions | |
void | REP_INSB (int port, void *dest, int numBytes) |
Wrapper for REP INSB instruction. | |
void | REP_INSW (int port, void *dest, int numWords) |
Wrapper for REP INSW instruction. | |
void | REP_OUTSB (int port, void *src, int numBytes) |
Wrapper for REP OUTSB instruction. | |
void | REP_OUTSW (int port, void *src, int numWords) |
Wrapper for REP OUTSW instruction. | |
void | usleep (unsigned us) |
Wait some microseconds. | |
void | AMD_TestPios () |
Test the mapping between SC12 and AMD PIO pins. | |
void | AMD_SetPioData (unsigned long mask, unsigned long data) |
Set the AMD PIO Data register. | |
void | AMD_SetPioDir (unsigned long mask, unsigned long dir) |
Set the AMD PIO Direction register. | |
void | AMD_SetPioMode (unsigned long mask, unsigned long mode) |
Set the AMD PIO Mode register. | |
void | AMD_SetPcsWaitStates (int waitstates) |
Set PCS0-3 Chipselect Waitstates. | |
void | AMD_StartDma (int channel, DmaInfo *dma) |
Initiate a DMA Transfer. | |
void | AMD_StopDma (int channel) |
Immediately Stop a DMA Transfer. | |
void | AMD_GetDmaInfo (int channel, DmaInfo *dma) |
Get information about current DMA Transfer. | |
void | AMD_EnableDrq (int channel, int onoff) |
|
Definition at line 464 of file amd186.cpp. References AMD_SetPioDir(), and AMD_SetPioMode(). Referenced by RC_Init(), SCI_ReadReg(), SCI_WriteReg(), VS_PlayMpegAsync(), and VS_Reset(). |
|
Get information about current DMA Transfer. \note: in order to read the DMA status reliably, a running transfer will be interrupted while the registers are read. This might be an issue, if you do something very timing critical!
Definition at line 424 of file amd186.cpp. References DmaInfo::control, DCON_DMIO, DCON_SMIO, DCON_ST, DCON_START, DCON_STOP, DmaInfo::dstMem, DmaInfo::dstPort, DmaInfo::length, PCB_D0CON, PCB_D0DSTL, PCB_D0SRCH, PCB_D0SRCL, PCB_D0TC, PCB_D1CON, PCB_D1DSTL, PCB_D1SRCH, PCB_D1SRCL, PCB_D1TC, DmaInfo::srcMem, and DmaInfo::srcPort. Referenced by timerHandler(), and VS_IsPlaying(). |
|
Set PCS0-3 Chipselect Waitstates. Note that you cannot modify the PCS5 and 6 waitstates. The SC12 hardware manual says that they must remain set to 3 waitstates.
Definition at line 350 of file amd186.cpp. References PCB_PACS. |
|
Set the AMD PIO Data register. Please see the AMD186ED user manual before using this function. Always remember that there is a strange mapping between the SC12 PIO pins and the real AMD ones
Definition at line 212 of file amd186.cpp. References PCB_PDATA0, and PCB_PDATA1. |
|
Set the AMD PIO Direction register. Please see the AMD186ED user manual before using this function. Always remember that there is a strange mapping between the SC12 PIO pins and the real AMD ones
Definition at line 258 of file amd186.cpp. References PCB_PDIR0, and PCB_PDIR1. Referenced by AMD_EnableDrq(). |
|
Set the AMD PIO Mode register. Please see the AMD186ED user manual before using this function. Always remember that there is a strange mapping between the SC12 PIO pins and the real AMD ones
Definition at line 304 of file amd186.cpp. References PCB_PIOMODE0, and PCB_PIOMODE1. Referenced by AMD_EnableDrq(). |
|
Initiate a DMA Transfer. Please read chapter 9 of the AMD 186ED user manual before using this function (the DMAInfo structure should be quite self-explanatory then)
Definition at line 372 of file amd186.cpp. References DmaInfo::control, DCON_DMIO, DCON_SMIO, DCON_START, DCON_STOP, DmaInfo::dstMem, DmaInfo::dstPort, DmaInfo::length, PCB_D0CON, PCB_D0DSTH, PCB_D0DSTL, PCB_D0SRCH, PCB_D0SRCL, PCB_D0TC, PCB_D1CON, PCB_D1DSTH, PCB_D1DSTL, PCB_D1SRCH, PCB_D1SRCL, PCB_D1TC, src, DmaInfo::srcMem, and DmaInfo::srcPort. Referenced by RC_Init(), timerHandler(), and VS_PlayMpegAsync(). |
|
Immediately Stop a DMA Transfer.
Definition at line 403 of file amd186.cpp. References DCON_START, DCON_STOP, PCB_D0CON, and PCB_D1CON. |
|
Test the mapping between SC12 and AMD PIO pins. This function doesn't need to be called by a user program, and is only useful if there's a new, incompatible revision of the @chip. (as they always promise ;)
Definition at line 182 of file amd186.cpp. References AMD_GetPioDir(), pfe_enable_pio(), PIO_IPD, PIO_IPU, and PIO_O0. |
|
Wrapper for REP INSB instruction.
Definition at line 32 of file amd186.cpp. |
|
Wrapper for REP INSW instruction.
Definition at line 63 of file amd186.cpp. |
|
Wrapper for REP OUTSB instruction.
Definition at line 94 of file amd186.cpp. References src. |
|
Wrapper for REP OUTSW instruction.
Definition at line 125 of file amd186.cpp. References src. |
|
Wait some microseconds. This function has been tested on an IPC@Chip SC12 at 20MHz, and is not very accurate. You can time the actual delay by using the ZTimer functions.
Definition at line 159 of file amd186.cpp. Referenced by SCI_ReadReg(), SCI_WriteReg(), and VS_Reset(). |