Search found 152 matches

by FinalZero
Sun Dec 09, 2012 8:00 pm
Forum: Newbie Help Center
Topic: How to do multiple things at once?
Replies: 55
Views: 8289

Re: How to do multiple things at once?

and it can see up and down How? Active picture time (or "draw") is 240 scanlines; vertical blanking time (or "vblank") is 22 scanlines on NTSC and RGB. You know, it throws me off when you measure time in scanlines. The code that runs during draw prepares buffers that will be cop...
by FinalZero
Sun Dec 09, 2012 7:19 pm
Forum: Newbie Help Center
Topic: How to do multiple things at once?
Replies: 55
Views: 8289

Re: How to do multiple things at once?

The PPU's job is to make a TV picture out of what it sees in its memory. It's making 240 visible scanlines of picture, and 26 lines of Vblank between the frames. (there's also some horizontal and vertical sync pulses in there too) It knows which scanline it's processing, and what it's doing. When i...
by FinalZero
Sun Dec 09, 2012 6:56 pm
Forum: Newbie Help Center
Topic: How to do multiple things at once?
Replies: 55
Views: 8289

Re: How to do multiple things at once?

There's even a NES multithreading demo that implements multiple threads using the timer interrupt approach above, if you want to see the rudiments of how this works in an OS. The two threads move objects at different speeds across the screen, each one an infinite loop acting as if it's the only thi...
by FinalZero
Sun Dec 09, 2012 6:46 pm
Forum: Newbie Help Center
Topic: How to do multiple things at once?
Replies: 55
Views: 8289

Re: How to do multiple things at once?

Yes. Okay. The PPU generates an NMI interrupt every time VBlank starts. You just have to wait for that to happen. The simplest way to do this is to prepare an NMI handler that changes a flag (it can be as simple as INC VBlankFlag; RTI). Then, after the processing of all game objects, make a loop th...
by FinalZero
Sun Dec 09, 2012 6:24 pm
Forum: Newbie Help Center
Topic: How to do multiple things at once?
Replies: 55
Views: 8289

Re: How to do multiple things at once?

Games wait for vblank. Then they don't care how few objects there are on the screen. You only get a problem with slowdown when there are too many objects. 1) VBlank happens 60 times per second in NTSC, and 50 times per second in PAL, right? 2) How do you "wait" for it? How long is a singl...
by FinalZero
Sun Dec 09, 2012 6:18 pm
Forum: Newbie Help Center
Topic: How to do multiple things at once?
Replies: 55
Views: 8289

Re: How to do multiple things at once?

That's exactly it. Each object (and by object I mean not only game objects, but any entity that takes part in the functioning of the program) gets a chance to update its state, taking into consideration whatever data it deems necessary (i.e. some objects observe the states of other objects in order...
by FinalZero
Sun Dec 09, 2012 5:49 pm
Forum: Newbie Help Center
Topic: How to do multiple things at once?
Replies: 55
Views: 8289

How to do multiple things at once?

How do games (on any system) do multiple things at once? For example, take a simple stage in Super Mario Bros. Many things are happening at the same time: Mario is moving/jumping around, multiple enemies are walking around, and music is playing. But most systems (including the NES's 6502) have only ...
by FinalZero
Fri Oct 12, 2012 2:25 am
Forum: Other Retro Dev
Topic: Development Languages
Replies: 50
Views: 28109

Re: Development Languages

mic_ wrote:
24 bits lets you address 2 MB of memory.
2^24 Bytes = 16 Megabyte.
For some reason I thought bits instead of bytes. Yes, you're right, 16 MB.
by FinalZero
Thu Oct 11, 2012 10:58 am
Forum: Other Retro Dev
Topic: Development Languages
Replies: 50
Views: 28109

Re: Development Languages

C++ isn't strictly a superset of C, but the differences are subtle enough that it's not really wrong to say it is. C++ is much more complicated than C, and yes it has a lot of obscure features, but the primary feature of C++ over C is classes, and specifically the inheritance of virtual functions i...
by FinalZero
Mon Oct 01, 2012 6:18 pm
Forum: Other Retro Dev
Topic: Development Languages
Replies: 50
Views: 28109

Re: Development Languages

Speed and tools are part of it, but memory use is another. In a lot of cases, the available C compiler generates substantially larger code, which hurts if you're trying to squeeze a lot into one PRG ROM bank. On the subject of rom banks, when did rom banks stop being used? N64/PS era (They had 32-b...
by FinalZero
Fri Sep 28, 2012 3:33 pm
Forum: Other Retro Dev
Topic: Development Languages
Replies: 50
Views: 28109

Re: Development Languages

It is quite abstract question if C on the NES has performance issues. Comipled code is of course slower than hand written assembly code, few times slower - so 'yes' in this regard. However, a game may not require 100% of CPU time and work full speed, smooth, etc, even with not very effective code (...
by FinalZero
Fri Sep 28, 2012 3:07 pm
Forum: Other Retro Dev
Topic: Development Languages
Replies: 50
Views: 28109

Re: Development Languages

Is it only concern about speed that prevented people from using higher-level languages? or the lack of tools, perhaps? I remember seeing some game for the NES here was made with cc65's C compiler, and it didn't (seem) to have speed issues. Are you kidding ? I tried to make a program that basically ...
by FinalZero
Fri Sep 28, 2012 2:58 pm
Forum: Other Retro Dev
Topic: Development Languages
Replies: 50
Views: 28109

Re: Development Languages

There were rare cases of more exotic languages, mostly among hobbyist devs, like Lisp for NES. Lisp? That seems like an odd choice for such an old machine... GBA can run C or any other subset of C++ where exceptions and dynamic casting are turned off at the compiler. Audio mixers, software 3D engin...
by FinalZero
Fri Sep 28, 2012 2:33 pm
Forum: Other Retro Dev
Topic: Development Languages
Replies: 50
Views: 28109

Development Languages

What languages have been used to develop games for consoles over the years? I know that people worked directly with assembly for the NES, and probably for the SNES too, but what about the N64? Were things fast enough yet that they could use C (and maybe C++?). What about the GBA? (I assume that for ...
by FinalZero
Wed Dec 14, 2011 4:37 am
Forum: Newbie Help Center
Topic: Hello World
Replies: 267
Views: 61216

You still want 0 written to both of those PPU registers while the PPU is still warming up. But I thought I was writing to them after the PPU has already warmed up. Also, you should wait two frames for the PPU to warm up, not just one. Oops, it's fixed now. And you also need to put the NMI routine I...