DMA channel registers, and the DMA and CPU fills. More...
Go to the source code of this file.
Data Structures | |
| struct | DmaRegisters |
| A DMA channel's registers (DMAxSAD, DMAxDAD, DMAxCNT). More... | |
Macros | |
| #define | DMA3 ((volatile struct DmaRegisters *)REG_DMA3) |
| DMA3, the channel the game copies with, as its three registers. | |
| #define | Dma_Fill16(value, destination, size) |
| Fills size bytes at destination with the halfword value by DMA3, from a volatile copy of it on the stack. | |
| #define | Dma_Fill32(value, destination, size) |
| Fills size bytes at destination with the word value by DMA3. | |
| #define | Dma_Fill32Cell(cell, value, destination, size) |
| Dma_Fill32 through the caller's own volatile word cell, so a function that fills several blocks keeps one word for all of them and forms its address once; the word also takes the caller's place in the frame (Map_InitializePerspectiveScene's sp+28, where Dma_Fill32's would be sp+16). | |
| #define | Cpu_Fill32(value, destination, size) |
| pret's CpuFill32: repeats one word through the BIOS CpuSet service. | |
Functions | |
| static __inline__ void | Dma_Set (const volatile void *source, volatile void *destination, u32 control, volatile u32 *channel) |
| Starts a DMA transfer: stores the source, destination and control words into channel's registers with one stmia. | |
DMA channel registers, and the DMA and CPU fills.
Definition in file dma.h.
| #define DMA3 ((volatile struct DmaRegisters *)REG_DMA3) |
DMA3, the channel the game copies with, as its three registers.
Definition at line 18 of file dma.h.
Referenced by WaitFrames().
| #define Dma_Fill16 | ( | value, | |
| destination, | |||
| size ) |
Fills size bytes at destination with the halfword value by DMA3, from a volatile copy of it on the stack.
Definition at line 22 of file dma.h.
Referenced by Memory_FillHalfwordsDma(), and UiWindow_FillFromScene().
| #define Dma_Fill32 | ( | value, | |
| destination, | |||
| size ) |
Fills size bytes at destination with the word value by DMA3.
Definition at line 30 of file dma.h.
Referenced by AffineEffect_InitializeWork(), AltmillerCave_Initialize(), BattleEffect_InitializeBuffers(), BattleFx_ClearOwnedSlot(), BattleFx_InitializeSlots(), BattleFx_LoadActionEffectResources(), BattleFx_RunAnnihilation(), BattleFx_SetupResourcesAndWindow(), BattleFx_StartBufferBlend(), BattlePresentation_InitializeWorkAndResetState(), Colosso_ShowItemIcon(), Curtain_Start(), DebugText_Clear(), DisplayScroll_InitializeHBlankDma(), DisplayTransition_AllocateAndClearState(), DisplayTransition_FillTilemapAndSolidTile(), DisplayTransition_InitializeBattleEffectState(), DisplayTransition_InitializeState(), EffectSlot_Initialize(), Field_PlaceMapMarkers(), Field_RunScene(), FieldEffect_InitSparkles(), FieldFx_StartGroundParticles(), FieldFx_StartLightning(), FieldMotes_Start(), FieldObject_Create(), MapAnimation_StartChannels(), MercuryLighthouse_RestoreLights(), ObjectDispatch_Release(), OptionMenu_InitializeWork(), PaletteFade_Init(), ResourceMetadata_ClearRecord(), ResourceObject_Release(), RunSceneTransitionEffect(), Runtime_InitializeHeap(), SaveMenu_SelectSlot(), SaveState_InitializeWorkspace(), SaveState_InvalidateSlot(), SaveState_LoadSummaryRecords(), SaveState_WriteRecord(), SerialRuntime_Initialize(), Shop_InitializeCursorWork(), SolSanctum_StartFloatingLights(), System_Initialize(), SystemMenu_Initialize(), UiWindow_InitializeWork(), and WorldMap_LoadGraphics().
| #define Dma_Fill32Cell | ( | cell, | |
| value, | |||
| destination, | |||
| size ) |
Dma_Fill32 through the caller's own volatile word cell, so a function that fills several blocks keeps one word for all of them and forms its address once; the word also takes the caller's place in the frame (Map_InitializePerspectiveScene's sp+28, where Dma_Fill32's would be sp+16).
Definition at line 42 of file dma.h.
Referenced by Battle_RunEncounter(), BattleFx_SetupBlendedDisplay(), BattleFx_StartFadeOverlay(), BattlePres_RunEntryTransition(), DisplayScroll_InitObjectTable(), Graphics_ClearCharacterBlockAndPalette(), Map_InitializePerspectiveScene(), ObjectSystem_Configure(), ObjectSystem_Initialize(), and Ui_RunIconMonitor().
| #define Cpu_Fill32 | ( | value, | |
| destination, | |||
| size ) |
pret's CpuFill32: repeats one word through the BIOS CpuSet service.
Definition at line 51 of file dma.h.
Referenced by SerialTest_Run().
|
static |
Starts a DMA transfer: stores the source, destination and control words into channel's registers with one stmia.
Definition at line 62 of file dma.h.
Referenced by AltinPeak_StepPaletteAnim(), AltmillerCave_BeginRetreat(), BattleBackground_Load(), BattleEffect_InitializeBuffers(), BattleEffect_InitializeSharedScene(), BattleFx_ArmBg0HBlankDma(), BattleFx_ArmBg2AffineHBlankDma(), BattleFx_ArmPaletteHBlankDma(), BattleFx_ArmWin0HBlankDma(), BattleFx_BuildBuffer(), BattleFx_BuildWindowEdgeTable(), BattleFx_InitializeStarField(), BattleFx_RunJudgment(), BattleFx_RunParticleStreams(), BattleFx_RunTorch(), BattleFx_StartWindowHBlankDma(), BattlePres_RunEntryTransition(), BattlePres_UpdateHBlankScroll(), BattlePresentation_BuildSortedUnitEntries(), BattlePresentation_ConfigurePaletteFade(), BattlePresentation_InitializeTilePattern(), BattlePresentation_SetPaletteLevel(), BattlePresentation_UploadTileVariant(), CharacterSelector_RunRearrange(), Clear_LoadBackground(), ColorBuffer_BackupAndBrighten(), ColorBuffer_BackupAndBrightenPartial(), ColorBuffer_BackupAndDarken(), ColorBuffer_BackupAndDarkenPartial(), ColorBuffer_BackupAndHalve(), ColorBuffer_BackupAndHalveNonzero(), ColorBuffer_BackupAndScaleNonzeroThreeQuarters(), ColorBuffer_BackupAndScaleThreeQuarters(), Colosso_DrawGauge(), Colosso_LoadLettering(), CrossboneIslePillarRooms_ReadMapCell(), CrossboneIslePillarRooms_SortPillarActors(), DebugMenu_SelectItem(), DisplayBlend_StartScript(), DisplayScroll_ArmHBlankDma(), DisplayScroll_UpdateObjects(), DisplayTransition_FillTilemapAndSolidTile(), Dma_Set(), Dma_StopAllThenRunHook(), Event_MovePillar(), FieldFx_UpdateLightning(), HeatGauge_Draw(), IoWriteQueue_FlushPending(), ItemLevel_SelectAbility(), ItemLevel_SelectItem(), ItemMenu_SelectGiveQuantity(), KolimaForestBend_Initialize(), KolimaPalette_Capture(), KolimaPalette_Restore(), KolimaPalette_SaveFirst(), KolimaPalette_SaveSecond(), LuckyDice_Run(), Map_LoadAreaGraphics(), Map_ShowBg1FromBuffer(), Map_ShowWorldMap(), Map_WriteLayerCellTile(), MapAnimation_ApplyAffineFrame(), MapAnimation_PresentFrame(), MapAnimation_Update(), Menu_OpenBackdropScreen(), NameEntry_EditOwnerName(), ObjectTable_Restore(), ObjectTable_Snapshot(), OptionMenu_Open(), Palette_CopyObjectBankToBackground14(), Palette_LightenBankHighlight(), Palette_LoadBasicObjColors(), Palette_StepTowardResource(), Palette_Transform(), PaletteFade_Init(), PaletteFade_Update(), PaletteQueue_Add(), PaletteQueue_StepCycles(), PartyTalkMenu_Choose(), ReelGame_Run(), ReelGame_RunFrame(), ReelGame_TransferCanvas(), Resource_DecompressHalfwords(), RunLuckyDice(), RunReelGame(), Runtime_InstallIwramAndIrqs(), SaveState_ReadSlotAndCheckChecksum(), SerialRuntime_CollectReceivedPayloads(), SerialRuntime_PrepareSendPacket(), SerialRuntime_StepBlockTransfer(), SerialTest_Run(), ShipGlow_CyclePalette(), Shop_CreatePriceSprite(), Shop_SaveAndTintFieldPalette(), Shop_SelectQuantity(), Sound_LoadPresetParameters(), Sprite_ComposeAnimationFrame(), StatusMenu_Run(), System_CopyBuildStamp(), System_VBlankHandler(), Title_LoadBackground(), Title_LoadIntroBackgrounds(), Title_LoadSprites(), Title_ShowAnimatedSplash(), Title_ShowIntro(), Title_ShowSplashScreen(), Title_UpdateIntroSprites(), Transform_BuildLookAt(), Transform_Load(), Transform_Pop(), Transform_Push(), Transform_Store(), TretPalette_SaveSceneColors(), Ui_LoadWindowGraphics(), UiGlyph_LoadEntryWithPalette(), UiText_BuildRenderEntries(), UiText_DrawGlyph(), UiText_LoadRemappedGlyph(), UiText_ScrollCanvasUp(), UiWindow_DrawStatusBarTiles(), UiWindow_OverlayTilePattern(), UiWork_Initialize(), UiWork_InitializeWithResourceCounters(), UiWork_UploadDirtyBlocks(), Vram_CopyTile(), VramCache_Load(), WaitFrames(), WorldMap_BeginStillView(), and WorldMap_LoadGraphics().