Shadow of the Beast (port)
Moderator: Moderators
Re: Shadow of the Beast (port)
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
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
Projects:
Shadow of the Beast (port)
The Sword of Ianna
The Banketh - The Video Game
My website: RetroNES
Shadow of the Beast (port)
The Sword of Ianna
The Banketh - The Video Game
My website: RetroNES
Re: Shadow of the Beast (port)
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.
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.
Last edited by Diskover on Thu Jul 12, 2018 10:26 pm, edited 1 time in total.
Projects:
Shadow of the Beast (port)
The Sword of Ianna
The Banketh - The Video Game
My website: RetroNES
Shadow of the Beast (port)
The Sword of Ianna
The Banketh - The Video Game
My website: RetroNES
Re: Shadow of the Beast (port)
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
- rainwarrior
- Posts: 8732
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Shadow of the Beast (port)
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.
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.
-
- Posts: 46
- Joined: Fri Apr 07, 2017 5:02 pm
Re: Shadow of the Beast (port)
Seems to work fine on my Everdrive. Did not work on FCEUX when I tried immediately after I downloaded.
Re: Shadow of the Beast (port)
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/
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/
Last edited by Diskover on Thu Jul 12, 2018 11:52 pm, edited 2 times in total.
Projects:
Shadow of the Beast (port)
The Sword of Ianna
The Banketh - The Video Game
My website: RetroNES
Shadow of the Beast (port)
The Sword of Ianna
The Banketh - The Video Game
My website: RetroNES
Re: Shadow of the Beast (port)
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.
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.
Re: Shadow of the Beast (port)
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.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.
If I deactivate the instruction asm ('cli'); the game works on all
Last edited by Diskover on Thu Jul 12, 2018 11:40 pm, edited 1 time in total.
Projects:
Shadow of the Beast (port)
The Sword of Ianna
The Banketh - The Video Game
My website: RetroNES
Shadow of the Beast (port)
The Sword of Ianna
The Banketh - The Video Game
My website: RetroNES
Re: Shadow of the Beast (port)
The sprites work under the 8x16 configurationrainwarrior 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.
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
Shadow of the Beast (port)
The Sword of Ianna
The Banketh - The Video Game
My website: RetroNES
Re: Shadow of the Beast (port)
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.
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.
You might have issues, if the board doesn't have 4 screen mirroring, like the ROM.I will put the game on an MMC3 board
nesdoug.com -- blog/tutorial on programming for the NES
Re: Shadow of the Beast (port)
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.
I configured this in this way to be able to do 15 screen divisions and in that way make parallax scroll effects.
Code: Select all
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
Shadow of the Beast (port)
The Sword of Ianna
The Banketh - The Video Game
My website: RetroNES
Re: Shadow of the Beast (port)
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.
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)
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.
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)
Re: Shadow of the Beast (port)
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.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.)
It only happens when we work with MMC3 and the IRQs are on. If I deactivate it, it does not happen.
And what is the solution if the IRQs should always be on to make the parallax scroll effect?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)
Projects:
Shadow of the Beast (port)
The Sword of Ianna
The Banketh - The Video Game
My website: RetroNES
Shadow of the Beast (port)
The Sword of Ianna
The Banketh - The Video Game
My website: RetroNES
Re: Shadow of the Beast (port)
Manually turn it on?
Re: Shadow of the Beast (port)
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.
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