help me! nestopia prg or wrk swap 2k,4k?

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
zxbdragon
Posts: 475
Joined: Mon Dec 12, 2011 8:15 pm

help me! nestopia prg or wrk swap 2k,4k?

Post by zxbdragon » Mon Dec 12, 2011 8:18 pm

fceu setprgxxr(xx=2,4,8,16,32) ==nestopia ?

nestopia prg or wrk not swap 2k,4k or 1k?
have solution?

User avatar
miker00lz
Posts: 235
Joined: Thu Sep 23, 2010 7:28 pm

Post by miker00lz » Mon Dec 12, 2011 8:35 pm

i'm not really sure what you're asking...

tepples
Posts: 21812
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples » Mon Dec 12, 2011 8:35 pm

I'm not sure either. My best guess is "I'm trying to add support for a mapper to a popular NES emulator for PCs. The mapper swaps PRG ROM ("prg") or PRG RAM ("wrk") in banks smaller than 8 KiB. But I don't know how to make this emulator swap such small banks. Can somebody help me?"

zxbdragon
Posts: 475
Joined: Mon Dec 12, 2011 8:15 pm

Post by zxbdragon » Mon Dec 12, 2011 10:04 pm

copy ram is working,but too complex

User avatar
miker00lz
Posts: 235
Joined: Thu Sep 23, 2010 7:28 pm

Post by miker00lz » Mon Dec 12, 2011 10:15 pm

if tepples is right about your question, what i do is break the PRG and CHR banks into 1 KB blocks. i have swap functions that takes the block size the mapper uses, the chunk to replace, and the value of the new chunk and it does the math, changing all the applicable 1 KB blocks.

instead of copying memory, load all of the PRG and CHR data into one big bank and only change pointers for each 1 KB to point to the correct place in the full array of data.

User avatar
Zepper
Formerly Fx3
Posts: 3191
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Re: help me! nestopia prg or wrk swap 2k,4k?

Post by Zepper » Tue Dec 13, 2011 4:40 am

"Translating" it...
zxbdragon wrote:fceu setprgxxr(xx=2,4,8,16,32) ==nestopia ?
FCEU uses a function setprgXXr(), where XX can be 2,4,8,16 or 32.
Like... setprg2r(), setprg32r().

He's asking if such thing is the same in Nestopia.
nestopia prg or wrk not swap 2k,4k or 1k?
have solution?
He's wondering if nestopia doesn't swap 1, 2 and 4k PRG banks.

zxbdragon
Posts: 475
Joined: Mon Dec 12, 2011 8:15 pm

Re: help me! nestopia prg or wrk swap 2k,4k?

Post by zxbdragon » Fri Dec 16, 2011 8:19 am

Zepper wrote:"Translating" it...
zxbdragon wrote:fceu setprgxxr(xx=2,4,8,16,32) ==nestopia ?
FCEU uses a function setprgXXr(), where XX can be 2,4,8,16 or 32.
Like... setprg2r(), setprg32r().

He's asking if such thing is the same in Nestopia.
nestopia prg or wrk not swap 2k,4k or 1k?
have solution?
He's wondering if nestopia doesn't swap 1, 2 and 4k PRG banks.
Your description is very exact

zxbdragon
Posts: 475
Joined: Mon Dec 12, 2011 8:15 pm

Post by zxbdragon » Thu Dec 22, 2011 12:02 am

fcemu mm code

Code: Select all

setprg4r(0x10,0x6000,0);
setprg4(0x7000,15);

setprg4(0xA000,~3);
setprg4r(0x10,0xB000,1);

How to transfer nestopia the code?

User avatar
Zepper
Formerly Fx3
Posts: 3191
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Post by Zepper » Thu Dec 22, 2011 6:22 am

What is your native speaking language?

zxbdragon
Posts: 475
Joined: Mon Dec 12, 2011 8:15 pm

Post by zxbdragon » Thu Dec 22, 2011 7:35 am

Chinese.

English is very poor.

zxbdragon
Posts: 475
Joined: Mon Dec 12, 2011 8:15 pm

Post by zxbdragon » Fri Dec 30, 2011 2:48 am

nobody cares to ask about sth.

Post Reply