Kaettekita Mario Bros. (1988)(Nintendo)(J) FDS

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

FHorse
Posts: 231
Joined: Sat May 08, 2010 9:31 am

Kaettekita Mario Bros. (1988)(Nintendo)(J) FDS

Post by FHorse »

So the situation is this, in "Kaettekita Mario Bros. (1988)(Nintendo)(J) ", made any selection from the main menu, before arriving at the request of the exchange side of the disc, you will see a nice interlude. I have seen that there are three and they are random. When the intermission is this:
Image

everything works well, while if it is one of these two:

Image
Image
The next screen is full of graphical glitches.

Out of curiosity I tried it with Nintendulator and Nestopia and to my surprise the problem is also present with these two emulators. I continue to investigate.
Last edited by FHorse on Wed Apr 02, 2014 5:34 am, edited 1 time in total.
FHorse
Posts: 231
Joined: Sat May 08, 2010 9:31 am

Re: Kaettekita Mario Bros. (1988)(Nintendo)(J) FDS

Post by FHorse »

I think that the problem are with IRQ timer. The two interludes with the problem are using it while the other does not. I keep trying.
FHorse
Posts: 231
Joined: Sat May 08, 2010 9:31 am

Re: Kaettekita Mario Bros. (1988)(Nintendo)(J) FDS

Post by FHorse »

So this is my handler of IRQ timer:

Code: Select all

/* IRQ handler */
if (fds.drive.irq_timer_enabled && fds.drive.irq_timer_counter && !(--fds.drive.irq_timer_counter)) {
	fds.drive.irq_timer_enabled = FALSE;
	irq.high |= FDS_TIMER_IRQ;
}
What happens is that in the interlude IRQ is used to create some effects (like the billboard that falls from above). The problem is that with this handler, the IRQ generation continues even when it should not (the screen that asks for the exchange of the side of the floppy).
If at the time of generation of the IRQ I reset the internal register of the reload counter (previously set through the registers $4020 and $4021), IRQ will not be generated any more, until a new value is loaded into $4020 and $4021.

Code: Select all

/* IRQ handler */
if (fds.drive.irq_timer_enabled && fds.drive.irq_timer_counter && !(--fds.drive.irq_timer_counter)) {
	fds.drive.irq_timer_reload = 0;
	fds.drive.irq_timer_enabled = FALSE;
	irq.high |= FDS_TIMER_IRQ;
}
In this way everything works properly. I do not know if this is correct or not and unfortunately I have no way to test it on real hardware.
Black Zero
Posts: 41
Joined: Sat Jul 20, 2013 10:14 pm

Re: Kaettekita Mario Bros. (1988)(Nintendo)(J) FDS

Post by Black Zero »

Well with the changes you made I can confirm that the game works flawlessly.
It's great to finally be able to play this properly.

Great work!
zxbdragon
Posts: 492
Joined: Mon Dec 12, 2011 8:15 pm

Re: Kaettekita Mario Bros. (1988)(Nintendo)(J) FDS

Post by zxbdragon »

FHorse wrote:So the situation is this, in "Kaettekita Mario Bros. (1988)(Nintendo)(J) ", made any selection from the main menu, before arriving at the request of the exchange side of the disc, you will see a nice interlude. I have seen that there are three and they are random. When the intermission is this:
Image

everything works well, while if it is one of these two:

Image
Image
The next screen is full of graphical glitches.

Out of curiosity I tried it with Nintendulator and Nestopia and to my surprise the problem is also present with these two emulators. I continue to investigate.
Able to fill some pictures?
I tried to improve nestopia,thank you!
FHorse
Posts: 231
Joined: Sat May 08, 2010 9:31 am

Re: Kaettekita Mario Bros. (1988)(Nintendo)(J) FDS

Post by FHorse »

zxbdragon wrote:Able to fill some pictures?
I tried to improve nestopia,thank you!
Filled.
zxbdragon
Posts: 492
Joined: Mon Dec 12, 2011 8:15 pm

Re: Kaettekita Mario Bros. (1988)(Nintendo)(J) FDS

Post by zxbdragon »

thnk you ,I know,fixed!but ........
User avatar
*Spitfire_NES*
Posts: 306
Joined: Fri May 21, 2010 4:10 pm

Re: Kaettekita Mario Bros. (1988)(Nintendo)(J) FDS

Post by *Spitfire_NES* »

zxbdragon wrote:thnk you ,I know,fixed!but ........
hey zbx do you mind telling us what you did to fix this issue in nestopia? Id like to try it out myself if you do not mind sharing. :)
zxbdragon
Posts: 492
Joined: Mon Dec 12, 2011 8:15 pm

Re: Kaettekita Mario Bros. (1988)(Nintendo)(J) FDS

Post by zxbdragon »

*Spitfire_NES* wrote:
zxbdragon wrote:thnk you ,I know,fixed!but ........
hey zbx do you mind telling us what you did to fix this issue in nestopia? Id like to try it out myself if you do not mind sharing. :)
from nestopia plus! svn

void Fds::Unit::Timer::Advance(uint& timer)
{
timer |= STATUS_PENDING_IRQ;

if (ctrl & CTRL_REPEAT)
count = latch;
else
ctrl &= ~uint(CTRL_ENABLED);
//以下来着FHorse 修正Kaettekita Mario Bros. (1988)(Nintendo)(J)
//如有问题请注销以下代码。可能受影响的游戏billboard 等。
latch = 0;
}
Recently was perfect fk23c, no time to pipe the FDS BUG

Next time don't call my name wrong!!! I am zxbdragon or dragon2snow,not zdx
User avatar
*Spitfire_NES*
Posts: 306
Joined: Fri May 21, 2010 4:10 pm

Re: Kaettekita Mario Bros. (1988)(Nintendo)(J) FDS

Post by *Spitfire_NES* »

apologies zxbdragon! I added in the latch part and it fixes it correctly! Thank you! :lol:

I noticed you said nestopia plus SVN. Do you have a code repository or is that just a part of your name for the release? Id love to merge in some of your updates! I'm trying currently to get fds conversion of dracula II to work in nestopia.

Anyhow thanks for all your help. Id love to see some of what you have working and new!
zxbdragon
Posts: 492
Joined: Mon Dec 12, 2011 8:15 pm

Re: Kaettekita Mario Bros. (1988)(Nintendo)(J) FDS

Post by zxbdragon »

*Spitfire_NES* wrote:apologies zxbdragon! I added in the latch part and it fixes it correctly! Thank you! :lol:

I noticed you said nestopia plus SVN. Do you have a code repository or is that just a part of your name for the release? Id love to merge in some of your updates! I'm trying currently to get fds conversion of dracula II to work in nestopia.

Anyhow thanks for all your help. Id love to see some of what you have working and new!
dracula II fds all version working nestopia plus!
zxbdragon
Posts: 492
Joined: Mon Dec 12, 2011 8:15 pm

Re: Kaettekita Mario Bros. (1988)(Nintendo)(J) FDS

Post by zxbdragon »

zxbdragon wrote:
*Spitfire_NES* wrote:apologies zxbdragon! I added in the latch part and it fixes it correctly! Thank you! :lol:

I noticed you said nestopia plus SVN. Do you have a code repository or is that just a part of your name for the release? Id love to merge in some of your updates! I'm trying currently to get fds conversion of dracula II to work in nestopia.

Anyhow thanks for all your help. Id love to see some of what you have working and new!
dracula II fds all version working nestopia plus!
all fds2nes rom,I dumped,to nestopia working!!!
zxbdragon
Posts: 492
Joined: Mon Dec 12, 2011 8:15 pm

Re: Kaettekita Mario Bros. (1988)(Nintendo)(J) FDS

Post by zxbdragon »

this mapper very easy!!!
Attachments
QQ图片20140604113935.jpg
QQ图片20140604113935.jpg (34.86 KiB) Viewed 6938 times
QQ图片20140604113929.jpg
QQ图片20140604113929.jpg (34.21 KiB) Viewed 6938 times
User avatar
*Spitfire_NES*
Posts: 306
Joined: Fri May 21, 2010 4:10 pm

Re: Kaettekita Mario Bros. (1988)(Nintendo)(J) FDS

Post by *Spitfire_NES* »

zxbdragon wrote:
*Spitfire_NES* wrote:apologies zxbdragon! I added in the latch part and it fixes it correctly! Thank you! :lol:

I noticed you said nestopia plus SVN. Do you have a code repository or is that just a part of your name for the release? Id love to merge in some of your updates! I'm trying currently to get fds conversion of dracula II to work in nestopia.

Anyhow thanks for all your help. Id love to see some of what you have working and new!
dracula II fds all version working nestopia plus!
Can you please help me get this game working? Its a great game and id love to get your fix to add it in. :)
User avatar
tehcloud
Posts: 22
Joined: Tue Apr 23, 2013 5:25 pm

Re: Kaettekita Mario Bros. (1988)(Nintendo)(J) FDS

Post by tehcloud »

I wouldn't mind seeing that code either. If there's an svn repo you're keeping, it would be great to have access to it so that everyone can benefit from these fixes.
Post Reply