mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-06 15:48:05 -04:00
core, structural cleanup, fixes and improvements for type issues #2
This commit is contained in:
parent
5ab80df952
commit
f821bb7011
64 changed files with 140 additions and 150 deletions
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
#include "../pico_int.h"
|
||||
#include "../sound/ym2612.h"
|
||||
#include "../../cpu/sh2/compiler.h"
|
||||
#include <cpu/sh2/compiler.h>
|
||||
|
||||
struct Pico32x Pico32x;
|
||||
SH2 sh2s[2];
|
||||
|
|
|
@ -26,19 +26,19 @@ int DrawLineDestIncrement32x;
|
|||
|
||||
static void convert_pal555(int invert_prio)
|
||||
{
|
||||
unsigned int *ps = (void *)Pico32xMem->pal;
|
||||
unsigned int *pd = (void *)Pico32xMem->pal_native;
|
||||
unsigned int m1 = 0x001f001f;
|
||||
unsigned int m2 = 0x03e003e0;
|
||||
unsigned int m3 = 0xfc00fc00; // includes prio bit
|
||||
unsigned int inv = 0;
|
||||
u32 *ps = (void *)Pico32xMem->pal;
|
||||
u32 *pd = (void *)Pico32xMem->pal_native;
|
||||
u32 m1 = 0x001f001f;
|
||||
u32 m2 = 0x03e003e0;
|
||||
u32 m3 = 0xfc00fc00; // includes prio bit
|
||||
u32 inv = 0;
|
||||
int i;
|
||||
|
||||
if (invert_prio)
|
||||
inv = 0x80008000;
|
||||
|
||||
for (i = 0x100/2; i > 0; i--, ps++, pd++) {
|
||||
unsigned int t = *ps ^ inv;
|
||||
u32 t = *ps ^ inv;
|
||||
*pd = PXCONV(t);
|
||||
}
|
||||
|
||||
|
@ -48,9 +48,9 @@ static void convert_pal555(int invert_prio)
|
|||
// direct color mode
|
||||
#define do_line_dc(pd, p32x, pmd, inv, pmd_draw_code) \
|
||||
{ \
|
||||
const unsigned int m1 = 0x001f; \
|
||||
const unsigned int m2 = 0x03e0; \
|
||||
const unsigned int m3 = 0x7c00; \
|
||||
const u16 m1 = 0x001f; \
|
||||
const u16 m2 = 0x03e0; \
|
||||
const u16 m3 = 0x7c00; \
|
||||
unsigned short t; \
|
||||
int i = 320; \
|
||||
\
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
@* See COPYING file in the top-level directory.
|
||||
@*
|
||||
|
||||
#include "pico/arm_features.h"
|
||||
#include "pico/pico_int_offs.h"
|
||||
#include <pico/arm_features.h>
|
||||
#include <pico/pico_int_offs.h>
|
||||
|
||||
.extern Pico32x
|
||||
.extern Pico
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
#include "../pico_int.h"
|
||||
#include "../memory.h"
|
||||
|
||||
#include "../../cpu/sh2/compiler.h"
|
||||
#include <cpu/sh2/compiler.h>
|
||||
DRC_DECLARE_SR;
|
||||
|
||||
static const char str_mars[] = "MARS";
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* See COPYING file in the top-level directory.
|
||||
*/
|
||||
|
||||
#include "../pico_int_offs.h"
|
||||
#include <pico/pico_int_offs.h>
|
||||
|
||||
@ 32X bank sizes... TODO this should somehow come from an include file
|
||||
.equ SH2_ROM_SHIFT, 10 @ 0x003fffff
|
||||
|
|
|
@ -25,14 +25,14 @@
|
|||
#include "../pico_int.h"
|
||||
#include "../memory.h"
|
||||
|
||||
#include "../../cpu/sh2/compiler.h"
|
||||
#include <cpu/sh2/compiler.h>
|
||||
DRC_DECLARE_SR;
|
||||
|
||||
// DMAC handling
|
||||
struct dma_chan {
|
||||
unsigned int sar, dar; // src, dst addr
|
||||
unsigned int tcr; // transfer count
|
||||
unsigned int chcr; // chan ctl
|
||||
u32 sar, dar; // src, dst addr
|
||||
u32 tcr; // transfer count
|
||||
u32 chcr; // chan ctl
|
||||
// -- dm dm sm sm ts ts ar am al ds dl tb ta ie te de
|
||||
// ts - transfer size: 1, 2, 4, 16 bytes
|
||||
// ar - auto request if 1, else dreq signal
|
||||
|
@ -47,11 +47,11 @@ struct dma_chan {
|
|||
|
||||
struct dmac {
|
||||
struct dma_chan chan[2];
|
||||
unsigned int vcrdma0;
|
||||
unsigned int unknown0;
|
||||
unsigned int vcrdma1;
|
||||
unsigned int unknown1;
|
||||
unsigned int dmaor;
|
||||
u32 vcrdma0;
|
||||
u32 unknown0;
|
||||
u32 vcrdma1;
|
||||
u32 unknown1;
|
||||
u32 dmaor;
|
||||
// -- pr ae nmif dme
|
||||
// pr - priority: chan0 > chan1 or round-robin
|
||||
// ae - address error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue