It is currently Thu Oct 18, 2018 4:39 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 72 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
PostPosted: Sun Jun 17, 2018 2:17 pm 
Offline

Joined: Thu Nov 24, 2011 7:16 am
Posts: 205
In the next few days I will release the rom demo of Shadow of the Beast for NES.

The truth is that it has taken a lot of time away from other projects because I got hooked on making it work despite my limitations and the limitations of the machine. A team of professionals would have polished it without much trouble.

In fact, the rom contains some flaw, much more visible in emulator, but functional in a real NES console through everflash, etc ...

I'm very excited about it, but I want to leave it here to continue with the remodeling of my most important project: The Banketh

Image

_________________
Projects:
Shadow of the Beast (port)
The Sword of Ianna
The Banketh - The Video Game

My website: RetroNES


Top
 Profile  
 
PostPosted: Thu Jul 12, 2018 2:52 pm 
Offline

Joined: Thu Nov 24, 2011 7:16 am
Posts: 205
ROM: http://www.retrones.net/sites/default/f ... BHB%5D.nes

It has been developed with support from the NESlib library of Shiru. The multidirectional scroll is a modification of the original engine of Doug Fraker, which has also been adapted to work with the mapper MMC3 (to achieve plane effects). I found the music by chance in a forum dedicated to famitraker, and it was developed by MovieMovies1 for the mapper MMC5. Obviously, I have adapted it to work in the MMC3.

It works perfectly on a real NES using flashcard and other methods.

If you want to use it on PC or smartphone, the VirtuaNES emulator is recommended.

_________________
Projects:
Shadow of the Beast (port)
The Sword of Ianna
The Banketh - The Video Game

My website: RetroNES


Last edited by Diskover on Thu Jul 12, 2018 10:26 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Thu Jul 12, 2018 4:20 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 2304
Location: DIGDUG
This ROM fails in 5 of the 6 emulators I tried. It worked in JNES 1.1, with a few errors.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Thu Jul 12, 2018 4:32 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 6887
Location: Canada
It isn't quite working for me on my PowerPak either. Seems playable but some of the graphics are displaying the wrong tiles, and the scroll splits seem broken every second frame? (Seen as interlaced lines in the picture below.)

I dunno what your goals are, but it's probably worth trying to do this in a way that plays nice with most emulators? Unless you're specifically trying to exploit something technical that only the "real thing" can do, you're probably relying on some specific quirk of the implementation of MMC3 used by your flashcart which may or may not be present on an actual MMC3. (Clearly my PowerPak's simulation of an MMC3 differs from the one you used on your flashcart.) If you write code that is more within the boundaries of the well known parts of the MMC3 though, it should run on more emulators too.

Otherwise, I am excited to see this ready for public viewing. :)


Attachments:
sotb_powerpak_powermappers_mmc3.jpg
sotb_powerpak_powermappers_mmc3.jpg [ 331.88 KiB | Viewed 1535 times ]
Top
 Profile  
 
PostPosted: Thu Jul 12, 2018 9:45 pm 
Offline

Joined: Fri Apr 07, 2017 5:02 pm
Posts: 15
Seems to work fine on my Everdrive. Did not work on FCEUX when I tried immediately after I downloaded.


Top
 Profile  
 
PostPosted: Thu Jul 12, 2018 10:22 pm 
Offline

Joined: Thu Nov 24, 2011 7:16 am
Posts: 205
I recommend using the VirtuaNES emulator or in a real NES using flashcard

http://virtuanes.s1.xrea.com/bin/virtuanes097e.zip

I spent a lot of time trying to solve the errors in the other emulators, but it has been impossible for me.

The problem is when I activate the instruction asm ('cli'); for the interruption of the MMC3 to work.

Guide me through the dougeff MMC3 tutorial https://nesdoug.com/2016/01/15/24-mmc3- ... hing-irqs/

_________________
Projects:
Shadow of the Beast (port)
The Sword of Ianna
The Banketh - The Video Game

My website: RetroNES


Last edited by Diskover on Thu Jul 12, 2018 11:52 pm, edited 2 times in total.

Top
 Profile  
 
PostPosted: Thu Jul 12, 2018 10:43 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10899
Location: Rio de Janeiro - Brazil
Like rainwarrior said, unless you're intentionally exploiting hardware quirks that emulators are known to have problems with, it's a good idea to look into why it fails on so many setups. Even if it does work on real hardware (although it seems that different MMC3 implementations in flash carts are still disagreeing), and theoretically the original console has the final word, the fact that slight deviations from the real hardware are causing visible problems could mean your code is barely working, and under certain circumstances could still break.

A lot of these emulators are pretty accurate (unlike VirtuaNES, from what I could find online) and can handle all sorts of games just fine, so they should be able to handle your effects without problems too. I think the effort of making this game/demo work well across different emulators is worth it, as you'll end up with a more robust engine overall.


Top
 Profile  
 
PostPosted: Thu Jul 12, 2018 11:36 pm 
Offline

Joined: Thu Nov 24, 2011 7:16 am
Posts: 205
tokumaru wrote:
Like rainwarrior said, unless you're intentionally exploiting hardware quirks that emulators are known to have problems with, it's a good idea to look into why it fails on so many setups. Even if it does work on real hardware (although it seems that different MMC3 implementations in flash carts are still disagreeing), and theoretically the original console has the final word, the fact that slight deviations from the real hardware are causing visible problems could mean your code is barely working, and under certain circumstances could still break.

A lot of these emulators are pretty accurate (unlike VirtuaNES, from what I could find online) and can handle all sorts of games just fine, so they should be able to handle your effects without problems too. I think the effort of making this game/demo work well across different emulators is worth it, as you'll end up with a more robust engine overall.


I have not done anything particularly weird to make the game work. As I mention, when implementing the MMC3, at the moment I activate the instruction asm ('cli'); for interruptions per line to work, in most emulators it stops working. On the other hand, in VirtuaNES and in a real NES it works perfectly.

If I deactivate the instruction asm ('cli'); the game works on all

_________________
Projects:
Shadow of the Beast (port)
The Sword of Ianna
The Banketh - The Video Game

My website: RetroNES


Last edited by Diskover on Thu Jul 12, 2018 11:40 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Thu Jul 12, 2018 11:39 pm 
Offline

Joined: Thu Nov 24, 2011 7:16 am
Posts: 205
rainwarrior wrote:
It isn't quite working for me on my PowerPak either. Seems playable but some of the graphics are displaying the wrong tiles, and the scroll splits seem broken every second frame? (Seen as interlaced lines in the picture below.)

I dunno what your goals are, but it's probably worth trying to do this in a way that plays nice with most emulators? Unless you're specifically trying to exploit something technical that only the "real thing" can do, you're probably relying on some specific quirk of the implementation of MMC3 used by your flashcart which may or may not be present on an actual MMC3. (Clearly my PowerPak's simulation of an MMC3 differs from the one you used on your flashcart.) If you write code that is more within the boundaries of the well known parts of the MMC3 though, it should run on more emulators too.

Otherwise, I am excited to see this ready for public viewing. :)


The sprites work under the 8x16 configuration

From what I see, it seems that your PowerPak has not identified them that way and tries to show them as 8x8

I have an idea: this afternoon, when I leave work, I will put the game on an MMC3 board.

I think I remember that I have PRG and CHR stored in some box. I will flase, weld and try with the MMC3 of RetroStage.-

_________________
Projects:
Shadow of the Beast (port)
The Sword of Ianna
The Banketh - The Video Game

My website: RetroNES


Top
 Profile  
 
PostPosted: Fri Jul 13, 2018 5:09 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 2304
Location: DIGDUG
If you are setting and clearing interrupts 200+ times a frame, this may be the problem.

Other games don't do this, which is why no emulator author has bothered to get the accuracy perfect on such a thing.

MMC3 has a scanline counter system. I would use that. That just requires keeping interrupts ON the whole frame and just resetting a counter value several times a frame.


Also, are you using a PAL NES, diskover? That might be part of the issues that rainwarrior is having.

Quote:
I will put the game on an MMC3 board
You might have issues, if the board doesn't have 4 screen mirroring, like the ROM.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Fri Jul 13, 2018 6:13 am 
Offline

Joined: Thu Nov 24, 2011 7:16 am
Posts: 205
Yes, I am using a PAL NES

I configured this in this way to be able to do 15 screen divisions and in that way make parallax scroll effects.

Code:
irq:
   pha
   txa
   pha
   tya
   pha
   ldy #15            ;wait a little, loop 15 times
:   dey               ;2 cycles
   bne :-             ;3 cycles

   ldx _Scroll_Index    ;each time the irq fires, it fetches a different byte from and array
   lda _Scroll, x
   sta $2005         ;change the horizontal scroll
   lda _scrollY       ;#0 originalmente. Controlamos desplazamiento vertical de la pantalla
   sta $2005         ;vertical scroll = 0
   inc _Scroll_Index

   lda #1
   sta $e000          ; acknowledge the irq, turn off the counter
   lda #14            ; Alto en pixeles de cada linea IRQ. Tenemos 10 trozos a repartir. Hay que probar con 32
   sta $c000          ; set up the next irq, 20 scanlines   
   sta $c001
   lda #1
   sta $e001          ; turn on the scanline counter
   
   pla
   tay
   pla
   tax
   pla
   rti

_________________
Projects:
Shadow of the Beast (port)
The Sword of Ianna
The Banketh - The Video Game

My website: RetroNES


Top
 Profile  
 
PostPosted: Tue Jul 17, 2018 6:13 am 
Offline

Joined: Sun Feb 07, 2016 6:16 pm
Posts: 524
The problem is that you did not disable APU Frame Counter IRQs at power on. These are enabled by default, at least on NTSC consoles (and likely most emulators): http://wiki.nesdev.com/w/index.php/CPU_power_up_state)

Changing Mesen's code to boot with APU IRQs disabled fixes (almost) everything:
Attachment:
shadow.png
shadow.png [ 25.98 KiB | Viewed 1313 times ]
I say almost because at some very specific character positions, the background (between the clouds & ground) flashes in or out of existence for a few pixels.

This issue reminds me of this problem bananmos had with a PAL rom: viewtopic.php?p=214822#p214822
It's possible that PAL NES might boot with the "disable IRQ" flag turned on for the frame counter, which would explain both issues. (I'm unsure if any of the PAL test roms check this particular behavior)


Top
 Profile  
 
PostPosted: Tue Jul 17, 2018 11:57 pm 
Offline

Joined: Thu Nov 24, 2011 7:16 am
Posts: 205
Sour wrote:
The problem is that you did not disable APU Frame Counter IRQs at power on. These are enabled by default, at least on NTSC consoles (and likely most emulators): http://wiki.nesdev.com/w/index.php/CPU_power_up_state)

Changing Mesen's code to boot with APU IRQs disabled fixes (almost) everything:
I say almost because at some very specific character positions, the background (between the clouds & ground) flashes in or out of existence for a few pixels.)


Yes, it is a problem that I have not been able to solve and that has to do with the camera that follows the player. For 4 pixels, it is positioned in the previous nametable. I tried many things, such as delaying a few pixels, but this generated other new problems, and I gave up. Also in PAL console this small defect occurs.

It only happens when we work with MMC3 and the IRQs are on. If I deactivate it, it does not happen.

Sour wrote:
This issue reminds me of this problem bananmos had with a PAL rom: viewtopic.php?p=214822#p214822
It's possible that PAL NES might boot with the "disable IRQ" flag turned on for the frame counter, which would explain both issues. (I'm unsure if any of the PAL test roms check this particular behavior)


And what is the solution if the IRQs should always be on to make the parallax scroll effect?

_________________
Projects:
Shadow of the Beast (port)
The Sword of Ianna
The Banketh - The Video Game

My website: RetroNES


Top
 Profile  
 
PostPosted: Wed Jul 18, 2018 1:30 am 
Offline
User avatar

Joined: Thu Sep 15, 2016 6:29 am
Posts: 773
Location: Denmark (PAL)
Manually turn it on? :)


Top
 Profile  
 
PostPosted: Wed Jul 18, 2018 4:54 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 2304
Location: DIGDUG
It seems the neslib based source code on my webpage omits this bit

lda #$40
sta $4017

from crt0.s

I believe I borrowed this crt0 from the Alter Ego source code.

$4017 is the APU frame counter. Writing #$40 here disables frame count IRQs. Please add this somewhere near the top of crt0.s. Sorry for the inconvenience.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 72 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group