logo
 drop

Main

Community

Submissions

Help

91073799 visitors

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Bregalad

Pages: [1] 2 3 4 5 6 ... 63
1
Newcomer's Board / Re: Need Programming Advice
« on: Today at 10:59:08 am »
Quote
You're a good example of what I said before that people make it look so hard when it really isn'
I didn't said C++ was "hard", just that the number of concepts that you have to learn before knowing what is going on is high.

Namely, in order to write a C++ program and have a good in-depth understanding of what is going on (not trying random stuff until it appears to work), in addition to the normal unavoidable basic stuff that comes with every language (loops, conditional, variables, functions), you also need to learn :

  • What a pre-processor is and how it expands macros (and how to peek at your code after the macro's expansions if you have trouble)
  • What separate compilation is, how to separate stuff in header and source files, what is a linker
  • Namespaces
  • The basic integers and double types
  • Storage allocation (stack, heap and bss)
  • Concept of a segfault / bad memory access in order to be able to localize bugs and fix them
  • Functions overloading
  • Implicit types conversion
  • How to use pointers correctly, what is a NULL pointer, how the '*' sign is overloaded for 3 unrelated things
  • Strings constants, how they decay into pointers
  • Arrays, how they are initialized, how they decay into pointers
  • Memory management with heap, malloc and free, and new and delete
  • How to use references, the difference with pointers, how the '&' sign is overloaded for 3 unrelated things
  • Name mangling, why the linker error messages are so obscure and how to fix this
  • How to deal with const correctness (and to a lesser extent, the rarely used volatile correctness
  • What struct, unions and enumerations are, and how you can create your own types using them
  • What classes are and how they are an extension of struct
  • Concept of member functions (a.k.a methods), how they extend a struct
  • Concept of "private" members / methods, how to use them, how they relate to const correctnes and private variables
  • Concept of "friends" functions
  • Constructors, desctructors, copy constructors, assignement constructors
  • How to correctly manage memory within class, using the rule of three
  • Creation of temporary objects
  • Operator overloading, how it makes C++ (in my subjective point of view) powerful (in order to understand what std::count is for example)
  • The 'static' keyword and how it is overloaded for 4 completely different things
  • Concept of inline functions and member functions, how to make them correctly in a .cpp or .hpp file
  • Templates and genericity
  • A deep knownledge of the standard library, (std::string, std::vector, etc, etc...)
  • A grap of containers and iterators
  • Inheritance, virtual functions and such object-oriented concepts

Then you can being to have an understanding of C++.... If you don't have a good understanding of at least what I wrote above, then your knownledge of C++ is superficial and you run into the risk of writing bad programs that leak memory and/or are packed with bugs. None of what I listed is particularly hard to learn, in fact most of it is very easy in my opinion, but still the number of concepts to learn is incredibly large as opposed to other programming language.

As for whether it's a good language or not it's completely opinion based. I think it's probably not that good per se, but being compiled it is fast enough, and is so wide that if you want to do something you can almost certainly do it in an elegant and sensible way using C++.

Finally I agree with what everyone else said, if you want to learn 6502 just do so, C-family languages are highly unrelted and will just get in the way.

Quote
[C] language is close enough to ASM to make sure your mind is tuned for the job ahead.
In my opinion this is yet-another fallacy over C that everyone repeats again and again but it does not make it become true.

2
Newcomer's Board / Re: Need Programming Advice
« on: March 04, 2015, 10:44:04 am »
    It's because you've got
Code: [Select]
[list][list] at the start of your post.
Oh thanks for pointing this out.

3
General Discussion / Re: That Stupid Dress
« on: March 04, 2015, 06:38:57 am »
To me it sounds like this is just because many people have bad screens or use them in bad lightning conditions.

I could name quite a few colours between gray, brown, possibly gold and maybe while assuming you can name gray as "dark white", but definitely not blue and even less black.

4
Newcomer's Board / Re: Need Programming Advice
« on: March 04, 2015, 04:02:34 am »
    You'll probably want to learn another language, C/C++ are good options and not as hard as people often make it look like imo
    • There is no programming langague called C/C++ (as it is so often see on the net  :-\ ) but there is two separte languages known as C and C++ (as well as dialects of those, which can very significantly in an incompatible way)
    • C++, while a good language by itself, it a horrible language to start learning. Whoever ever had the idea to make someone start programming using C++ should be flagellated. C++ is as far as I know the most complex programming language in existence, and the number of concepts to assimilate to have a real understanding on what is going on is very high. You should first learn both C and any object oriented language before starting to learn C++ in my opinion.
    • BASIC is the caveman grunts of programming languages. There is hundreds of completely incompatible dialects, the features are typically very limited and it encourages you to write non-structured programs.

    Also see If programming languages were <T>, particularly If programming lagnagues were languages (although I strongly disagree with the assmbly=latin comparison)

    EDIT : Why does this [/list] Always comes back after each edit ? Is it a forum bug ? It is quite annoying.

    5
    Newcomer's Board / Re: How to replace music in NES Metal Gear?
    « on: March 03, 2015, 12:13:22 pm »
    Yes. There is typically a music engine that is called every frame, as well as an interface (or "trigger" as you say) that would give orders such as "play sound effect #34", "play song #4" or "turn the volume down a little", etc...

    What you'd probably want to do in your case it hack Metal Gear's music engine to support extra sound channels for VRC6 (or if it is similar enough you could use the engine from Akumajo Densetsu, Madara or Esper Dream II, since they are all by konami, there is chances the interface (or "trigger") if not identical is similar enough so that you can use them. You could make it play songs form those 3 games, and if it works, then you could hack in any song you'd want assuming you figured out the musical bytecode that makes the music format.

    Of course supporting more channels eats more RAM so if there is no RAM free in Metal Gear anymore you'd have to move the sound engine variables to sit in SRAM expansion - not a big deal. If the sound engine expect more zero page space however, you could have quite some issues to make it work.

    Another, probably even harder, alternative would be to screw Metal Gear's sound engine completely and replace it by Famitracker's, a modified version that can play sound effects as well of course. Then you should make your own interface that converts Konami sound engine's interface to Famitracker's.

    6
    Newcomer's Board / Re: How to replace music in NES Metal Gear?
    « on: March 03, 2015, 10:25:40 am »
    So the .nsf files that Famitracker spits out aren't usable in that context?
    No.
    Quote
    I thought that was the point of .nsf, was that it could be read on a real NES.
    Yes. It cannot be used within an existing game though, obviously, simply because the game does not use Famitracker's sound engine, because it didn't exist yet.
    Quote
    When you say editing music in a hex editor, does Famitracker count as one of those?
    Surely no, Famitracker is no hex editor.

    Quote
    My question is, rather than spend time trying to decipher someone else's code, would it be easier to rip the art assets and sound effects and redevelop the game wholesale?
    It could be easier yet, but 100% illegal, as Metal Gear is copyrighted.

    7
    Personal Projects / Re: Final Fantasy 2x
    « on: March 02, 2015, 11:11:52 am »
    Feels like it's like the 342th time I see a projet like that. :huh:

    8
    My tools were formerly written in Java, but I finally (phew) converted all of them to another, executable, programming language. I think it was a terrible design choice to make them in Java for multiple reasons, but back then it was the only programming I could use for modern PCs that had file I/O.

    Now I am very glad I learnt to use C and the bases of C++ correctly (trust me it's no simple task, especially C++) but it's worth it as the languages are compilable. There is also other issues with Java other than the lack of compilability (yes, gcj is supposed to compile Java programs into native executable files but I never got them working).

    Usage of the JVM is not easy and is confusing for novices who are already new to the command line. I can't count how many complaints I got because of this. And I have to admit that even for myself it was hard to use my own tools because of that, I had to look up how to invoke the JVM properly every time, so it annoyed me just as much as other users (I made the tools first for my own personal usage, and then I share them so that they can be useful for others too).

    The syntax for Java can be horrible whenever you need something *not* to be object oriented, which turns out to be pretty often. It encourages you to write unstructured programs. And you have to use the "new" keyboard all the time. The language is based on the lack of memory management, thus on the fact that you will constantly waste memory that will be garbage collected later, which can potentially be source of inefficiency.

    For all those reason I'd advice against Java for new designs :) However, I have to admit that OO is much easier to understand and apply in Java than in C++. Don't learn OO with C++, just learn another OO language and then learn how to apply it to C++.

    PS : Oh, to answer your question, download my tools, and you might find an archive with the "old" java version in them. You are free to study them in any way, just don't hope to get any support for those versions, they are officially deprecated.

    9
    Gaming Discussion / Re: Every single RPG I ever played in my LIFE...
    « on: February 22, 2015, 04:08:57 pm »
    Great thread idea. I hope I won't miss too many games.

    RPGs Finished entierely at least once (* means finished entierely multiple times) (many of them with no '*' I played many times but not entierely from start to begin)
    • Final Fantasy
    • Final Fantasy III
    • Final Fantasy IV
    • Final Fantasy V*
    • Final Fantasy VI
    • Final Fantasy VII*
    • Final Fantasy VIII
    • Final Fantasy IX
    • Final Fantasy X*
    • Final Fantasy X-2
    • Final Fantasy Mystic Quest*
    • Final Fantasy Tactics A2
    • Final Fantasy : Dawn of Souls (1&2 remake on GBA)
    • Atelier Iris Eternal Mana
    • Atelier Iris 2 : The azoth of destiny
    • Breath of Fire
    • Breath of Fire II
    • Chrono Trigger*
    • Dragon Quest III (GBC remake only)
    • Dragon Quest IV (DS remake only)
    • Dragon Quest V
    • Dragon Quest VIII
    • Dragon Quest IX
    • Golden Sun
    • Golden Sun the Lost Age
    • Golden Sun Drark Dawn
    • Live a Live*
    • Mega Man Battle Network
    • Mega Man Battle Network 3 White
    • Mega Man Battle Network 6 Cybeast Gregar
    • Mega Man Star Force Pesagus
    • Star Ocean
    • Suikoden
    • Suikoden II

    Finished Action RPGs :
    • Tales of Phantasia
    • Terranigma
    • Final Fantasy Adventure*
    • Secret of Mana
    • Seiken Densetsu 3
    • Sword of Mana*

    Finished Tacticals :
    • Onimusha Tactics
    • Fire Emblem (Rekka no Ken GBA)*
    • Fire Emblem : Sacred Stones
    • Fire Emblem Shadow Dragon
    • Tactics Ogre
    • Just Breed

    Not finished because of issues :
    • Final Fantasy II : Broken battle system
    • Final Fantasy XII : Broken game overall (uninteressant story, characters)
    • Breath of Fire III : Got bored, although I could finish it someday (it definitely doesn't live up it's predecessors)
    • Romancing SaGa : No complete english translation yet
    • Lufia The Legend Returns : Dungeon system is horrible
    • Fire Emblem : Sealed Sword : Too HARD / relies on luck
    • Mega Man Battle Network 2 : I lost my saves before finishing the game :(
    • Mega Man Battle Network 4 Blue Moon : The last boss was too hard
    • Mega Man Battle Network 5 Protoman Team : The last boss was too hard
    • Mega Man Star Force 2: Zerker X Saurian : The last boss was too hard

    Not finished Tacticals:
    • Disgaea 2  Cursed Memories : The last boss was too hard

    10
    General Discussion / Re: New wireless modem works great
    « on: February 22, 2015, 12:48:28 pm »
    I first though this thread was an advertisement SPAM, but then I saw you were the author and thought, oh, it's not spam...

    Lately I cannot afford to buy anything else than the necessary, concretely that means mainly food, dentist fees and train abonment. But I am not less happy, on other side buying stuff you don't need is useless and takes space.

    11
    Front Page News / Re: Utilities: GBAMusRiper released
    « on: February 21, 2015, 09:18:57 am »
    I found the bug. It is at line 336 of gba_instr.cpp
    To fix it, replace

    Code: [Select]
    if(!inst_type&0x07) continue;
    by

    Code: [Select]
    if((inst_type & 0x07) != 0) continue;

    I'll include this fix in the next release

    12
    Newcomer's Board / Re: Correspondence between ZST and SRM?
    « on: February 20, 2015, 08:14:26 am »
    Save states don't have to contain the same data. They depend a lot on the exact internal emulator design. Various timing details are sure to differ greatly.
    A game could rely on the state of SRAM to run, and behave wrong or strangely if the save RAM is modified unexpectedly (this is what happens if you would load a save state without SRAM information and load SRAM with another unrelated .srm file).

    In SNES case the system have more SRAM than the cartridge, so games are unlikely to use SRAM for any other use than saving, *however*, in the NES it's the exact opposite, games are unlikely to use SRAM solely for saving as it is typically larger than system's RAM.

    Quote
    Ugh, I learned that the hard way when me and my brother were both playing Chrono Trigger some many years ago. We were both using save states and normal save files, and the save files kept getting overwritten by our use of save states.
    Same here. Although used cleverly, you can have much more saves using less files, you can use up to 10 save states which themselves contains 3 saves (in the case of CT) so you can have 30 saves at a time without dealing with copy/pasting/backuping either SRAM or save state files manually, which can in turn be very practical, for example to access any point of the story quickly.

    Unforutnately save states are not always portable between different versions of the same emulator.

    13
    Newcomer's Board / Re: Correspondence between ZST and SRM?
    « on: February 18, 2015, 08:54:24 am »
    I'd also add that normally the content of the SRAM (SRM) should also be included somehow in all emus save states (sometimes, as in SNES9x' case, in compressed form).

    14
    Newcomer's Board / Re: Help with Megaman vii
    « on: February 18, 2015, 03:29:30 am »
    This is probably what you should look for. The rest of the original game is re-translated, too but I don't see how that could be bothering.

    15
    Programming / Re: ZSNES Changing sample 44100Hz to 43200Hz permanently
    « on: February 18, 2015, 03:22:02 am »
    Oh MAN this is unbleivable. When I google 43200Hz, first I find this thread, and then some other pseudo-scientific bullshit that makes absolutely no sense, like just the thing us scientists really don't like.

    So first of all - Apparently the pseudo-scientific bs is about the A frequency, not about the sampling rate. Therefore, changing a sampling rate will not affect the tuning of the music.

    Even if you changed the sampling rate down to 43200Hz, there is chances that your computer's sound card will internally resample it to 44100 or 48000 internally before the ADC, because those are the two widely used industry standard frequencies. Note that the sound card should resample it with proper antialiasing making this resampling unnoticeable from an user viewpoint.

    Second, the SNES sampling rate is internally 32000 Hz, but it is possible when emulating it to get a higher sampling rate, which can result in clearer and crispier sound in some specific cases. (For instance, Chrono Trigger uses drums with playback rate higher than 32kHz, thus using them in such an emulator or SPC player will increase the quality as opposed to real hardware. For most games it won't make any difference). The effect will be the same when using 43200 or 44100 because those are extremely close - the harmonics are gained in both cases.

    Finally, if what you want is lower slightly the pitch so that a A would be 432 Hz, this is possible to do without changing the sampling rate, and just adapt the SPC player core. However, this won't make any difference other than the pitch being 32 cents lower (which is unnoticeable to people which does not have "absolute hear", which means almost everyone including most good musicians).

    Finally I must say not all games respected the A=440Hz conventions for multiple reasons, programmers were free to make it pitched like they wanted. If they wanted to have a different A, they did. (and trust me, they really did, i.e. I wouldn't surprised if half of the SNES games does not have a 440Hz A, which nobody cares since nobody notices)

    Last but not least the frequency of the SPC700 is itself variable, normally it should be 32000 Hz, but according to anomie they found significant variations in different SNESes. Which means the pitch of an A could vary just as much depending on the SNES it runs on / depending on the emulator's tuning.

    I remember an old version of SNES9x which played music with higher pitch, for some reason it sounded quite nice.

    Quote
    there is 43200 seconds in a half day
    Well at least this part is true. For the rest....

    Also 43200 samples per second have nothing to do with 43200 seconds... :banghead:

    16
    Oh I misread your "EDIT" part. Of course when you change the switching mode it changes everything like on all other mappers in existence.

    17
    I strongly suspect that no emulator implements the $5130 behaviour since no (commercial) games ever used this register for CHR switches. Do you test in emulator only ?

    Also, why do you edit the title to say "solved" if your problem isn't solved ?

    18
    Contrary to (almost) all other NES mappers, CHR bank are counted as actual banks, that is, the size of the switched bank matters for the number you'll going to put. In other words, the MMC5 automatically shifts the value left when using a bank size greater than 1k (if this makes sense to you).

    In your particular case, I belive you should use $24 and $25 instead of of $22 and $2a, and you'd have the same result as the below code.

    19
    Front Page News / Re: Utilities: Compress Tools upgraded to version 3.0
    « on: February 13, 2015, 10:15:40 am »
    Your input file should be encoded in UTF-8, it appears you are using another encoding (probably ISO-8859-5), so you should first somehow convert it into UTF-8 before processing.

    What actually happens is that the last character, 0xc9, makes it belive it's the start of a multibyte UTF-8 sequence, and "eats" the following quote, thus reporting a missing quote.

    If this bothers you, you could remove the UTF-8 decoding code in main.cpp at lines 315-330 and simply replace by the statement
    Code: [Select]
    c = s[i++];, that should work (although I cannot guarantee it will).

    20
    Newcomer's Board / Re: How do I translate a Russian Mega Drive game?
    « on: February 11, 2015, 03:26:33 am »
    It seems all you really need is a hex editor which supports table (TBL) files using either UTF-8 or ISO-8859-5 encoding, so that you can use cyrillic writing in your table file and see the text appear correctly in your hex editor.

    Using a dummy TBL file to read nonsensical text sounds as hard as editing raw HEX in my opinion.

    Also there is no such thing as "english letters" or "russian letters".

    Pages: [1] 2 3 4 5 6 ... 63