Re: Gens4All with Z80 Emulation
Posted: Mon Oct 25, 2021 7:59 pm
Thanks man. This incredible work.
Ian Micheal wrote:as normal that should work use iso make tools once you get the files from abovr un scramble the 1St_read.bin normal stuffKmusDC wrote:Hello bro, excellent contribution, good to see updates for this magnificent emulator. I would like to know how to convert it to an iso for dreamshell. Greetings
Code: Select all
void pvr_tex_lmemset32(pvr_ptr_t dst, int l, size_t len) {
//Set PVR DMA registers
volatile int *pvrdmacfg = (int*)0xA05F6888;
pvrdmacfg[1] = pvrdmacfg[0] = 0;
//Convert read/write area pointer to DMA write only area pointer
void *dmaareaptr = ((uintptr_t)dst & 0xffffff) | 0x11000000;
sq_set32(dmaareaptr, l, len);
}
My qacr[0]/qacr[1] value is just the precalculated result of what's written to QACR0/QACR1. Also, all that needs to be done to generate the QACR value for a given pointer is "(unsigned int)ptr >> 24". The extra shifting and masking is unnecessary.Ian Micheal wrote:How does this related toCode: Select all
//Set QACR registers volatile int *qacr = (int*)0xFF000038; qacr[1] = qacr[0] = 0x11;
Code: Select all
/* Set store queue memory area as desired */ QACR0 = ((((unsigned int)sbuf->vramData)>>26)<<2)&0x1c; QACR1 = ((((unsigned int)sbuf->vramData)>>26)<<2)&0x1c;
That's not SQ stuff. It's for controlling how the SH4's cache is accessed.Ian Micheal wrote: In your sh4 libCode: Select all
#define NONCACHED(a) (typeof (&(a)[0]))(((unsigned int)(a)) | (1 << 29)) #define CACHED(a) (typeof (&(a)[0]))(((unsigned int)(a)) & ~(1 << 29)) #define OCI_BANK0(a) (typeof (&(a)[0]))(((unsigned int)(a)) & ~(1 << 25)) #define OCI_BANK1(a) (typeof (&(a)[0]))(((unsigned int)(a)) | (1 << 25))
Code: Select all
void dc_txr_dma_cpy(void *dest, void *src, int n)
{
long i = n/32;
char *ptr=dest;
do
{
asm("ocbp @%0" : : "r" (ptr));
ptr += 32;
} while (-- i);
pvr_txr_load_dma(dest, src, n,0,NULL,0);
}
Code: Select all
TapmN SQ ```32x32 blits (blits/sec): 3276.8 4275.57 3091.32 4371.4 ```
Code: Select all
``` Pvr DMA 32x32 blits (blits/sec): 3056.72 3934.68 2868.35 3927.13 ```