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

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

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

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

Post by zxbdragon »

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 »

i'm not really sure what you're asking...
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

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: 498
Joined: Mon Dec 12, 2011 8:15 pm

Post by zxbdragon »

copy ram is working,but too complex
User avatar
miker00lz
Posts: 235
Joined: Thu Sep 23, 2010 7:28 pm

Post by miker00lz »

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: 3262
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

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

Post by Zepper »

"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: 498
Joined: Mon Dec 12, 2011 8:15 pm

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

Post by zxbdragon »

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: 498
Joined: Mon Dec 12, 2011 8:15 pm

Post by zxbdragon »

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: 3262
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Post by Zepper »

What is your native speaking language?
zxbdragon
Posts: 498
Joined: Mon Dec 12, 2011 8:15 pm

Post by zxbdragon »

Chinese.

English is very poor.
zxbdragon
Posts: 498
Joined: Mon Dec 12, 2011 8:15 pm

Post by zxbdragon »

nobody cares to ask about sth.
Post Reply