I am just starting to explore working with the NES, I have no previous programming experience.
So I am using nesasm which is working out nice. I tried to load a rom which is supposed to move a little jumping guy (character) left and right in jnes and noticed the arrow keys on my PC don't do anything. I am unable to move the little jumping guy left and right as programmed. Aren't the arrows supposed to emulate/replace the nes gamepad on a PC?
I loaded the same rom in rock nes and the graphics were all messed up, however it did allow me to move the little jumping character guy left and right using the arrows on my PC.
I'm wondering if there are better emulators for windows XP, or am I not using jnes correctly. Jnes seemed to load the rom most accurately, however the arrow keys on my PC did not work as I thought they might.
Thanks for any help, I appreciate it.
T
Each emulator I have ever seen have fully configurable buttons, including the direction keys, which can be substitued by any keyboard keys or joypad buttons you want. Most emulators use the arrow keys by default for the directionnal arrows, but maybe your emulator does require you to specify all joypad button withotu default keys.
An accurate and easy to use emulator is Nestopia. You may also consider FCEUltra, VitruaNES, Nintendulator, and Nesticle if you want to do developpement. FCEU because it has a debugger, VirtuaNES because of it's memory viewer, nametable viewer and ability to mute individual sound channels easily, Nintedulator for it's cycle-precision accurate emulation and it's code logger, and Nesticle is terribly inaccurate and obsolete now, but it remain the only emulator as far I know who is able to display the pattern tables and allow you to modify them in real time.
Bregalad wrote:
Each emulator I have ever seen have fully configurable buttons, including the direction keys, which can be substitued by any keyboard keys or joypad buttons you want. Most emulators use the arrow keys by default for the directionnal arrows, but maybe your emulator does require you to specify all joypad button withotu default keys.
An accurate and easy to use emulator is Nestopia. You may also consider FCEUltra, VitruaNES, Nintendulator, and Nesticle if you want to do developpement. FCEU because it has a debugger, VirtuaNES because of it's memory viewer, nametable viewer and ability to mute individual sound channels easily, Nintedulator for it's cycle-precision accurate emulation and it's code logger, and Nesticle is terribly inaccurate and obsolete now, but it remain the only emulator as far I know who is able to display the pattern tables and allow you to modify them in real time.
Thanks. I have been messing around with some very simple tutorials made available by the GBaGuy:
http://www.patatersoft.info/gbaguy/nesasm.htm
Particularly his "day 6; jumps and key presses". I've read on this forum that perhaps some of that info isn't very accurate. Maybe that's why I'm having problems with his example of reading keys.
(I give this guy a lot of credit though for trying, and I really did learn from his examples, he was 15 years old!)
I wondered if line 7 in his example was correct, using the BNE. As a complete beginner I have no idea but just felt like maybe that should be BEQ?
I have just started looking at the 6502 emulator, from 6502.org.
I will check out the other emulators you suggest above. Appreciate it bery much.
Thanks,
T
This tutorial has been said to be extremely innacurate, so be carefull.
I usually rely on one routine which reads the whole joypad, store all 8 keys in a single byte before returning, and then have my main code act in function to what is found in this byte. It's also good to have two variant of it, one wich directly says which keys are down or up, and another who sets bit only when the button was up last frame and just went down. That way it's easy to detect when the user "presses" the button, and when the button is down (regardless of it's previous state).
Directly act on $4016 ready is really impratical.
sounds like a good peice of info, but i don't understand what makes GBAGUY's method impractical.
For some reason, Jnes doesn't allow you to change the arrow keys. I never use the emulator for that reason, because I always prefer directional keys on the left, and the buttons on the right.
And Jnes doesn't really have anything going for it besides the fact that it's just another emulator to test your stuff on, so you should use something like Nintendulator or FCEUXD, because they allow you to change the directional keys as well as being very accurate.
The key routine provided by his tutorials should work. It is supposed to be BNE, because you're seeing if the key is pressed. If the key is pressed, the value $4016 returns will Not Equal(The NE in BNE stands for Not Equal) zero. If you did BEQ, you would be Branching every time it EQuals zero.
Celius wrote:
And Jnes doesn't really have anything going for it besides the fact that it's just another emulator to test your stuff on, so you should use something like Nintendulator or FCEUXD, because they allow you to change the directional keys as well as being very accurate.
Some emulators don't let you change the directional keys if you use a DirectX game controller. NO$GBA is one of them. This sucks if your joystick is mapped to the hat switch, as is the case for N64, PS2, and PS3 controllers. That's why I use Nestopia for play testing (authentic-looking NTSC emulation plus authentic Nintendo brand N64 pad) and Nintendulator for engine correctness testing, and I save PocketNES testing for my GBA + flash card.
I usually use Nintendulator to make sure it will run correctly, like you were saying. But I use FCEUXD ALL the time, because of the ability to view RAM and stuff as the game is running, and also, the Name Table viewer is way better than Nintendulator's, because you can see the tile ID at every location as well as the PPU address, and how far down and right the tile is from the top left tile. If it weren't for the hex viewer, I probably would be still stuck with some fatal bugs in my code, possibly even ones that would go unnoticed until I got really far in developement. As for play testing, I haven't gotten far enough with a game to actually play test it. I'd probably use either Nintendulator or FCEUXD though. What also sucks is my Logitech controller, which is pretty much just a USB playstation controller, has the directional pad not numbered like the other keys, and is not detected by about 75% of the emulators I try and use it on. The analog sticks are what I have to use in order to move in FCEUXD. Obviously, that isn't very natural feeling for a NES game.
I agree with Celius. The debugging features of FCEUXD constantly help me. Although Nintendulator does have similar features, they are just not as good or easy to use. It's "debug level" approach doen't make much sense either, because you slow the crap down the emulation because features you don't need are enabled along with the ones you do need. I like Nintendulator's frame step function though.
I usually keep the 3 emulators (Nestopia, FCEUXD and Nintendulator) open while programming. I use Nestopia the most, but from time to time I check the game on the other 2. If something unexpected happens, I switch to FCEUXD immediately, and stay there until the bug is fixed, then I go back to the normal setup.
I don't know what's happening.
I load a rom in jnes, it works 90%, then nintendulator, doesn't work.
I'll post some code.
( I remember 1984. The songs played on the radio. Radio was better then. You would hear Yes's "owner of a loner heart", "Blade Runner" was in the theaters, before cd's, or dvd's.
Rush came out with "Power Windows". Before that great album, The "Body Electric" is the ultimate assembly language programmer's song.
T
What do you mean it works 90%? 90% of the time? Or 90% of what you're doing works? If it doesn't work at all in Nintendulator, I'm pretty sure that you have a bug of some sort. If it kind of works in another emulator, that's not going to cut it at all. So yeah, you'll have to go over the code and read every single instruction, think about every programming concept your code has, and eventually you should spot the bug. If that doesn't work, just post it up.
electro wrote:
I don't know what's happening.
I load a rom in jnes, it works 90%, then nintendulator, doesn't work.
What's not to understand? That's the typical case of poor emulation accuracy. Many emulator authors only want to get the commercial games running, so they just overlook a bunch of small technical details of the actual console.
This usually does not have such a big impact on commercial games, because most of them were programmed by people who knew what they were doing, people who cared about such hardware details. Now, when someone that's just getting started and is just testing out stuff they don't really know much about, it's easy to not interface properly with the hardware, and any accurate emulator will be affected by the mistakes, like the real console would.
I don't know why you like this jnes so much (I don't really know it, so I can't say it's good or bad), but it's common knowledge that Nintendulator is considered the most accurate NES emulator around, so if it behaves differently from some other emulator, the other one is probably wrong. But even then you shouldn't trust only Nintendulator, you should always test your code in other known good emulators, such as Nestopia.
EDIT: Are you aware that, by default, Nintendulator does not exucete the ROMs as soon as they are loaded? You have to click on CPU -> Run. I don't know if this is your problem, but since you said it "didn't work", I thought I should bring this up.
Celius wrote:
What do you mean it works 90%? 90% of the time? Or 90% of what you're doing works? If it doesn't work at all in Nintendulator, I'm pretty sure that you have a bug of some sort. If it kind of works in another emulator, that's not going to cut it at all. So yeah, you'll have to go over the code and read every single instruction, think about every programming concept your code has, and eventually you should spot the bug. If that doesn't work, just post it up.
I appreciate the replies and help here.
Well, If I load a rom that demos the sound registers in jnes it will work, then the same rom won't work in nestopia, or nestendulator.
Same with this "Jumpy" demo rom. It works 90% in jnes (meaning a "character " appears but cannot be moved with the arrows, or sometimes in other emu's the character doesn't appear at all, just the background would appear.)
I'll post the 2 demo roms that I am speaking of, so others might try to load.
I'm just using these roms that I found to test the different emulators. Curious as to why they don't really work in them. Maybe you can figure out why.
(Will post the code in next post).
Thanks again,
T
electro wrote:
Curious as to why they don't really work in them. Maybe you can figure out why.
As I said above, the hardware works in a very strict way, meaning that some rules must be obeyed in order for the program to work correctly. Many emulators do not care about such rules and will accept code that wouldn't in fact work on a real console. No emulator is perfect, and each author decides what (and how) they'll emulate and what they won't.
The code from those GBAGuy's tutorials and many other "first demos" you'll find around are not properly coded, and were tested with buggy, outdated emulators such as Nesticle, that overlooks many aspects of the real console.
GBAGuy's code is known to have a lot of inaccuracies, and shouldn't be trusted as a source of proper code.
Yeah, many of the demos on the main page don't run in Nintendulator. That is probably because many of them were made in a time where not as much was known about the NES, and Nesticle was probably one of the more commonly used emulators for dev testing. There's one demo that displays a silver sphere, and you can move it around the screen and it will accelerate the longer you hold a directional button. I remember it only working with Jnes, it didn't work with any of the newer emulators. I don't even think it worked with Nesticle.
I see. Well, I downloaded Nintendulator.
I really want to (eventually) burn a rom onto a chip. Use the emulator to check it before burning the chip.
Thanks again, very helpful.
T