News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Need Programming Advice  (Read 7758 times)

Morinis

  • Sr. Member
  • ****
  • Posts: 481
  • Cupcakes and Pizza
    • View Profile
    • My YouTube
Need Programming Advice
« on: March 03, 2015, 05:17:13 pm »
I am in need of some advice as I've stumbled upon something that I cannot answer myself.

To start things off, I got lucky on picking up a book titled 6502 Machine & Assembly Language Programming by Mike Smith, 1984 edition for $15.  It states that its mainly for the Apple, Commodore and Atari programming.  It doesn't cover the NES programming which is fine by me as I mainly picked it up in hopes for it to help me understand things more from a beginner's perspective.  I've read some of chapter 1 that gives an explanation of how Microcomputers work (or tick as it states) and in which I find it pretty strait forward to understand.  Though while I've read some of chapter 1 I realized that I will need other books to help fill any gaps while I'm studying all of this, especially books that will help me start off from BASIC programming.  Now I have looked up BASIC programming as it gives me quite a selection in books but when I see things like visual, plc and creator basic programming I have no clue on which books would be best suited for me to get.

I know that this is a lot to ask but I really would like to know people's advice on which type of programming books would best suit me in learning anything and everything from the ground up which in time will eventually lead me towards both the 6502 and 65c816 assembly coding.



One last thing to add.  While I'm studying all of this what kind of programs should I look up to use alongside any books that I may obtain?  I am aware that there are utilities on this website for individual use but I have no clue on which utilities that would best help me in understanding things more.  I really need to learn this so I don't have to ask others for help with my current and future projects.
ROM Hacker, Reviewer and Critic.

Don't Know What Else To Say So... <3 You!

tryphon

  • Hero Member
  • *****
  • Posts: 722
    • View Profile
Re: Need Programming Advice
« Reply #1 on: March 03, 2015, 06:18:10 pm »
Not sure I understood qyour question.

You want to learn coding for consoles in asm. You have a book on 6502 asm (it'll be useful some day) and you'd like to get a book about a more high-level language to understand better your asm.

My advices are :

* stay away from Basic, almost nothing can be worse

* find a book about C, if possible with basics to data structures (arrays, linked lists, trees, nothing too fancy needed) and basic algorithmics

I'm pretty sure free ressources can easily be found, but someone will tell you here.

Then, if you want to code for your favourite console, you have to know how to use their coprocessors, but it's specific to each console.

A good way to learn is to read disassemblies of games (Mario for example has a good commented disassembly).

Dr. Floppy

  • Restricted Access
  • Hero Member
  • *
  • Posts: 970
  • Make America GREAT Again!
    • View Profile
    • BaddestHacks.net
Re: Need Programming Advice
« Reply #2 on: March 03, 2015, 08:22:45 pm »
Rodney Zaks' "Programming the 6502" is the go-to text for this sort of thing.

That said, I wrote a sixteen-lesson series on 6502 Programming as it relates to the Nintendo Entertainment System proper around five years ago...

MaxMouse

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: Need Programming Advice
« Reply #3 on: March 03, 2015, 09:43:12 pm »
...especially books that will help me start off from BASIC programming...

Does it really needs to be BASIC?
Basically, BASIC sucks. 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. Although, If you're only aiming to code for Windows, C# might be a better option.

...I know that this is a lot to ask but I really would like to know people's advice on which type of programming books would best suit me in learning anything and everything from the ground up which in time will eventually lead me towards both the 6502 and 65c816 assembly coding....

I don't think there's a satisfying answer to this question. Reason why is that programming is not really something that follows a straight line in which one can simply point out the path for you to walk. Nothing will eventually lead you towards that goal.
Technically, you could just go directly to learn 6502 asm, never actually learning a high level language, and you'd still get what you want. It really depends on what you're aiming to do. For example, you said you needed: "especially books that will help me start off from BASIC programming", what do you need specifically BASIC for?
Also, can you give us an idea of what you know about computer programming so far?
One simply cannot defy that which was concealed by silence. - Mm~

Jorpho

  • Hero Member
  • *****
  • Posts: 4677
  • The cat screams with the voice of a man.
    • View Profile
Re: Need Programming Advice
« Reply #4 on: March 04, 2015, 12:13:47 am »
I would like to emphasize that BASIC is a terrible idea, though I might question whether jumping right to C is the best idea if your experience is so limited that you are considering BASIC.

I like Python, but I am not a computer science teacher.
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

tryphon

  • Hero Member
  • *****
  • Posts: 722
    • View Profile
Re: Need Programming Advice
« Reply #5 on: March 04, 2015, 01:32:17 am »
Python is an awesome language, but not for console coding, where memory management is crucial. That's why I suggested something low-level like C, that forces you to understand how things are stored.

I don't suggest Java / C# for the same reason.

Bregalad

  • Hero Member
  • *****
  • Posts: 2753
    • View Profile
Re: Need Programming Advice
« Reply #6 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.
    « Last Edit: March 04, 2015, 10:43:29 am by Bregalad »

    Jorpho

    • Hero Member
    • *****
    • Posts: 4677
    • The cat screams with the voice of a man.
      • View Profile
    Re: Need Programming Advice
    « Reply #7 on: March 04, 2015, 08:53:54 am »
      EDIT : Why does this [/list] Always comes back after each edit ? Is it a forum bug ? It is quite annoying.
      It's because you've got
      Code: [Select]
      [list][list] at the start of your post.
      This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

      Dr. Floppy

      • Restricted Access
      • Hero Member
      • *
      • Posts: 970
      • Make America GREAT Again!
        • View Profile
        • BaddestHacks.net
      Re: Need Programming Advice
      « Reply #8 on: March 04, 2015, 10:22:40 am »
      If you want to learn 6502, you're best off just starting there. The higher-level stuff doesn't really have anything to do with programming NES games.

      Bregalad

      • Hero Member
      • *****
      • Posts: 2753
        • View Profile
      Re: Need Programming Advice
      « Reply #9 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.

      MaxMouse

      • Jr. Member
      • **
      • Posts: 9
        • View Profile
      Re: Need Programming Advice
      « Reply #10 on: March 04, 2015, 12:09:23 pm »
        • 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)
        ...

        What part of  "C/C++ are good options" you didn't understand? It just takes people with satisfactory interpretation skills, I guess.

        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.

        You're a good example of what I said before that people make it look so hard when it really isn't. C++ was the first programming language I learned and it was absolutely no big deal. You don't have to understand everything you're doing to actually start using it, and as you practice and read about it, things start getting clearer. Ok, it may take a little more time, but he didn't say anything about learning it fast. Also, after you get used to C++, any high level language becomes absurdly easy to learn which makes C++ a great language to start.[/list]
        « Last Edit: March 04, 2015, 12:24:40 pm by MaxMouse »
        One simply cannot defy that which was concealed by silence. - Mm~

        tryphon

        • Hero Member
        • *****
        • Posts: 722
          • View Profile
        Re: Need Programming Advice
        « Reply #11 on: March 04, 2015, 01:53:32 pm »
        Actually, I share Bregalad's opinion. C++ is not a good language to learn in first. Indeed you can use only part of it, but if you do that, it's better to learn a language where this part is easier to understand (Python for example, for almost any part). That said, it's possible to start with it, you proved it.

        There's just two point where I disagree : first, C++ is not a good language by itself. And second flagellation is a little excessive  ;D

        But then again, for console programming, asm and C are sufficient (C is not even needed, but understanding how basic data structures work is helpful, and it's easier to understand in C than in asm).

        henke37

        • Hero Member
        • *****
        • Posts: 643
          • View Profile
        Re: Need Programming Advice
        « Reply #12 on: March 04, 2015, 02:41:45 pm »
        I disagree, C++ is a fine language and it's fine as a first language.

        Gideon Zhi

        • Discord Staff
        • Hero Member
        • *****
        • Posts: 3532
          • View Profile
          • Aeon Genesis
        Re: Need Programming Advice
        « Reply #13 on: March 04, 2015, 02:56:16 pm »
        I dislike Python, and I say this from having spent a year writing it professionally. It has a lot of neat features, but some of those neat features make the code incredibly awkward to deal with, and the fact that it's "untyped" can be confusing and can impart a lack of discipline to a neophyte programmer where variables are concerned. (Untyped in quotes because it's not really untyped, it just obfuscates its types, which again can make things unnecessarily difficult.)

        BlackDog61

        • Hero Member
        • *****
        • Posts: 784
          • View Profile
          • Super Robot Wars A Portable translation thread
        Re: Need Programming Advice
        « Reply #14 on: March 04, 2015, 03:52:17 pm »
        This might be incorrect, but... When you wrote that you searched for basic programming, did you mean it as "beginner's programming"? The word "basic" refers to a programming language - which as others said sucks great time.
        Learning C is my recommendation too. That language is close enough to ASM to make sure your mind is tuned for the job ahead.
        Learn how to debug with it.
        Use example projects where files are used, memory pointers, potentially text if you plan to translate, graphics encoding / decoding from simple formats to start with, and why not a little zlib compression for good measure?

        That's give you a little tour before you decide to go deep into a precise project.

        KaioShin

        • RHDN Patreon Supporter!
        • Hero Member
        • *****
        • Posts: 5698
          • View Profile
          • The Romhacking Aerie
        Re: Need Programming Advice
        « Reply #15 on: March 04, 2015, 04:26:47 pm »
        I'm amazed that every thread even remotely related to programming turns into "my programming language's pen0r is longer than yours".
        All my posts are merely personal opinions and not statements of fact, even if they are not explicitly prefixed by "In my opinion", "IMO", "I believe", or similar modifiers. By reading this disclaimer you agree to reply in spirit of these conditions.

        tryphon

        • Hero Member
        • *****
        • Posts: 722
          • View Profile
        Re: Need Programming Advice
        « Reply #16 on: March 04, 2015, 04:59:07 pm »
        I disagree, C++ is a fine language and it's fine as a first language.

        We could argue on this again and again. Fortunately, it's irrelevant to the topic :) (but for the first language, no it isn't a good one, and I say that from a teacher perspective : I've tried many languages to introduce coding, and C-syntax ones - C / C++ / Java / C# / whatever - are generally ill-suited for several reasons, the main being verbosity).

        I dislike Python, and I say this from having spent a year writing it professionally. It has a lot of neat features, but some of those neat features make the code incredibly awkward to deal with, and the fact that it's "untyped" can be confusing and can impart a lack of discipline to a neophyte programmer where variables are concerned. (Untyped in quotes because it's not really untyped, it just obfuscates its types, which again can make things unnecessarily difficult.)

        To be honest, I more or less agree, despite I like Python, and I use mainly it (with C) for coding.

        I think you exagerate a little when you say "incredible awkward". I've read quite often code by other, and common Python code is generally (not always) much easier to understand than C++ for example.

        As for the untyped things, as far as it means anything (it's dynamically typed, which is different from what you said, but I suppose you know it), I agree that it's not a good thing for a beginner. But it's sometimes really handful :) And Python works much better as a first language for complete beginners (then again, from a teacher point of view).

        But then again, for console coding, I wouldn't suggest Python.

        KaioShin

        • RHDN Patreon Supporter!
        • Hero Member
        • *****
        • Posts: 5698
          • View Profile
          • The Romhacking Aerie
        Re: Need Programming Advice
        « Reply #17 on: March 04, 2015, 05:29:22 pm »
        But then again, for console coding, I wouldn't suggest Python.

        What's console coding? No one on this board will be using a high level language of any sort to make homebrew running on a 6502 CPU. For romhacking tools like custom dumpers/inserters any language with a basic file i/O API will work just as well as any other. (And for modern consoles, people use Unity to make console games just fine and it uses C#)
        All my posts are merely personal opinions and not statements of fact, even if they are not explicitly prefixed by "In my opinion", "IMO", "I believe", or similar modifiers. By reading this disclaimer you agree to reply in spirit of these conditions.

        tryphon

        • Hero Member
        • *****
        • Posts: 722
          • View Profile
        Re: Need Programming Advice
        « Reply #18 on: March 04, 2015, 05:50:10 pm »
        We are saying the same thing.

        Morinis

        • Sr. Member
        • ****
        • Posts: 481
        • Cupcakes and Pizza
          • View Profile
          • My YouTube
        Re: Need Programming Advice
        « Reply #19 on: March 04, 2015, 06:21:54 pm »
        To reply to some questions on the BASIC part and the level of what I know.  The book states BASIC quite a bit in its introduction chapter so it made me believe that there is something else to learn beforehand.  Again, I have no clue if this BASIC programming bit was necessary or not to learn.  For the level of programming that I know, just extremely simple stuff like changing the hexadecimal points around for the color palettes and that's about it (some sort of YouTube video showed something about it while using FCEUX.)


        I'm amazed that every thread even remotely related to programming turns into "my programming language's pen0r is longer than yours".

        It shows that people are proud of their work from what they know and how they learned it.  Everyone has their own methods so they tend to share and/or clash between each others stuff but all on a civil level.  I mean, no one's starting fights so all is good with no worries.

        ROM Hacker, Reviewer and Critic.

        Don't Know What Else To Say So... <3 You!