Search found 34 matches

by FaTony
Tue Nov 08, 2016 7:29 pm
Forum: NESdev
Topic: Making a NES game in C++
Replies: 99
Views: 15288

Re: Making a NES game in C++

If you use CC65, you give up lots of optimization that can be dome with gcc. If you watch the video a few pages back, you'll see that CC65 couldn't even optimize Hello world.
by FaTony
Fri Nov 04, 2016 6:36 pm
Forum: NESdev
Topic: Making a NES game in C++
Replies: 99
Views: 15288

Re: Making a NES game in C++

Erm...What? :? What does this have to do with a viewpoint? We're not discussing philosophical questions here. This is about hard facts, like, you know, source code style relating to ROM space and CPU. And it shouldn't be hard to understand that this-->MemberVariable = 5; generally requires more spa...
by FaTony
Thu Nov 03, 2016 1:24 pm
Forum: NESdev
Topic: Making a NES game in C++
Replies: 99
Views: 15288

Re: Making a NES game in C++

calima wrote:They do. Current gcc LTO is very good.
Exactly. Since a NES program doesn't really link to anything else, the compiler is able to see the whole program and perform aggressive optimizations.
by FaTony
Wed Nov 02, 2016 6:58 pm
Forum: NESdev
Topic: Making a NES game in C++
Replies: 99
Views: 15288

Re: Making a NES game in C++

Without optimizations and by default C++ objects are created on the stack. With optimizations anything is possible.
by FaTony
Wed Nov 02, 2016 6:17 pm
Forum: NESdev
Topic: Making a NES game in C++
Replies: 99
Views: 15288

Re: Making a NES game in C++

O.k., now I assume that you don't really know what you're talking about. Of course there will be no classes. Not only "if the compiler is smart enough", but simply never. Because Assembly doesn't know classes. But there will definitely be functions, or, as Assembly calls it, subroutines. And if you...
by FaTony
Wed Nov 02, 2016 12:15 pm
Forum: NESdev
Topic: Making a NES game in C++
Replies: 99
Views: 15288

Re: Making a NES game in C++

Plug a PC's HDMI out into a TV, and you have a console. The only difference between a PC with AMD CPU and AMD integrated graphics and a PlayStation 4 is the latter's lockdown. Obviously, I'm making a PC game and I'm currently developing an engine for it. I was just interested in applying my C++ ski...
by FaTony
Wed Nov 02, 2016 11:53 am
Forum: NESdev
Topic: Making a NES game in C++
Replies: 99
Views: 15288

Re: Making a NES game in C++

tomaitheous wrote: Then why are you even messing around with the NES?
Because it is the only console I had.

And modern C++ can be more efficient than C because it has constexpr, templates, etc, that do a lot of work at compile time which leads to extremely efficient code.
by FaTony
Wed Nov 02, 2016 11:20 am
Forum: NESdev
Topic: Making a NES game in C++
Replies: 99
Views: 15288

Re: Making a NES game in C++

How? In object orientation, the function is written to be able to be called by any object of the class. MyClass::MyFunction cannot know if it is called by MyClass a or by MyClass b , therefore, whenever this is referenced, it is referenced as a pointer. This means: Indirect access. Which means: Mor...
by FaTony
Wed Nov 02, 2016 8:44 am
Forum: NESdev
Topic: Making a NES game in C++
Replies: 99
Views: 15288

Re: Making a NES game in C++

For example, when a new opponent appears, you wouldn't use vector.push_back to put it to the list of opponents. You would have a global fixed-size array with the maximum number of possible opponents and you would simply use the next free slot in this array. I guess that'll be std::array<std::option...
by FaTony
Wed Nov 02, 2016 7:22 am
Forum: NESdev
Topic: Making a NES game in C++
Replies: 99
Views: 15288

Re: Making a NES game in C++

C++ not so much, unless you find a compiler for it. But since object orientation isn't really necessary for an NES game anyway, you can program in C. Just get cc65. No. I can can't handle C with it's pointers and manual memory management. I'm tired of writing low level stuff by hand. That's why I u...
by FaTony
Tue Nov 01, 2016 7:14 pm
Forum: NESdev
Topic: Making a NES game in C++
Replies: 99
Views: 15288

Making a NES game in C++

Hi. So I've seen I couple of videos of Jason Turner where he makes a Commodore 64 game in C++17. And now while watching his Cppcon talk it just clicked. He uses i386 to 6502 translator but NES has this CPU! So I think it is possible to use his approach to game NES games in C++. I'm certainly interes...
by FaTony
Wed Sep 28, 2016 2:12 pm
Forum: NES Music
Topic: fTz NSF Player - a fork of NSFPlay
Replies: 16
Views: 6731

Re: fTz NSF Player - a fork of NSFPlay

Added GUI for the legacy config, works with the same values as .ini files of NSFPlay.
Image
by FaTony
Fri Sep 16, 2016 12:12 pm
Forum: NES Music
Topic: NSFPlay 2.3
Replies: 57
Views: 23193

Re: NSFPlay 2.3

How can I make the infinite playtime?
by FaTony
Sun Aug 07, 2016 2:50 pm
Forum: NES Music
Topic: NSFPlay 2.3
Replies: 57
Views: 23193

Re: NSFPlay 2.3

OK, thanks.
by FaTony
Sun Aug 07, 2016 2:13 pm
Forum: NES Music
Topic: NSFPlay 2.3
Replies: 57
Views: 23193

Re: NSFPlay 2.3

Hey how can I force specific region via C++? All NSFs I open are played in NTSC but I want PAL or Dendy.