Gens4All with Z80 Emulation
- KmusDC
- fire
- Posts: 82
- Dreamcast Games you play Online: Worms World Party, Phantasy Star Online v2, POD Speed Zone, Alien Front Online.
Re: Gens4All with Z80 Emulation
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
thanks a lot. It works perfect.
-
- drunken sailor
- Posts: 160
Re: Gens4All with Z80 Emulation
The example code I posted is equivalent to this:
I've tested it, and it definitely works on real hardware. It's possible that some/all emulators don't support it.
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))
- Ian Micheal
- Developer
- Posts: 6277
- Location: USA
- Contact:
Re: Gens4All with Z80 Emulation
Thank you TapmN! I understand now thank you have it working on hardware your a Genus you know it



- Ian Micheal
- Developer
- Posts: 6277
- Location: USA
- Contact:
- Ian Micheal
- Developer
- Posts: 6277
- Location: USA
- Contact:
Re: Gens4All with Z80 Emulation
I have been using this for years i use it few of my ports I came up with
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);
}
- Ian Micheal
- Developer
- Posts: 6277
- Location: USA
- Contact:
Re: Gens4All with Z80 Emulation
Your SQ way is faster then pvr dma block trasnfer This is my benchmark using SDL dreamhal 1.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 ```
- KmusDC
- fire
- Posts: 82
- Dreamcast Games you play Online: Worms World Party, Phantasy Star Online v2, POD Speed Zone, Alien Front Online.
-
- lithium
- Posts: 37
Re: Gens4All with Z80 Emulation
Look 8 minutes into that video. Contra Hard Corp is perfect. Sound and drums are spot on crystal clear.
-
- Similar Topics
- Replies
- Views
- Last post
-
- 24 Replies
- 18315 Views
-
Last post by al73r
-
- 2 Replies
- 6154 Views
-
Last post by majestic_lizard
-
- 9 Replies
- 8324 Views
-
Last post by KmusDC
-
- 9 Replies
- 10156 Views
-
Last post by Ian Micheal
-
- 0 Replies
- 2557 Views
-
Last post by Maztr_0n