|
Post by ninjabearhug on Apr 24, 2008 21:00:32 GMT
That is excellently written . If you can explain the rest of it as well as you've explained binary, then i think just about everyone will be able to understand SMS programming. I look forward to reading part 2 .
|
|
|
Post by Stan on Apr 24, 2008 21:42:17 GMT
Yeah, I hope so. That's the speed I'll be taking it and the language I'll be using. Hex is next and though people also know about that I still think it needs to be there and then we can get into other issues. Thanks for the compliment.
|
|
|
Post by biltho on Apr 24, 2008 22:08:36 GMT
MY BRAIN HURTS i think i will tackle that tomorrow as i am very tired. From what i have read it seems very easy to understand. Thanks.
|
|
|
Post by Stan on Apr 26, 2008 18:37:51 GMT
Well, what the hell, nothing else to do, so I threw up the hexadecimal tutorial as well. This will end the basic stuff, well the stuff that may not seem necessary to some people, and now we can start getting into the grit. Again, it will take time, but read what you see there now and absorb it because you'll find things much easier if you do.
|
|
Aypok
Sonic the Hedgehog
Posts: 2,372
|
Post by Aypok on Apr 26, 2008 19:42:08 GMT
I just came on to the forum for an unrelated reason (see a post I'll make shortly after this one) and noticed this, so decided to give my feedback. There are a few errors in it; some are minor, whilst some are not so minor. I didn't see any huge problems, though. They may seem needlessly nit-picky, but they're worth noting. 1. " All programming languages basically are low-level (easy to understand for humans) abstractions of complex processes." Programming languages are high level, not low-level. Binary/hexadecimal (machine code) is low-level (the lowest), assembly is a higher level abraction of that - although classed as low-level by today's standards. C is even more high-level - again low level by today's standards. When you look at things like PHP, Python, Ruby, etc, they're clearly high-level - by any standards. 2. " So thus, a programming language is sort of like a dialect a computer uses to function, just like we use language to function. The words it uses, so to speak, is in binary." Ignoring the fact that "So thus" is bad English (also: "is in binary" should be "are in binary"), that statement is misleading - especially the last sentence. If you're refering specifically to machine code and assembly (which, given the context, you are), then that is correct. The thing is, the words of higher-level languages do not translate directly - they're compiled/interpreted into machine code - where one command in the higher-level language may translate into dozen or hundreds of commands at the machine code level. 3. " All computers use binary, they just run using different programming languages. " My problem with this line is similar to the one above. Computers do not understand programming languages - they only understand the compiled forms. Give a computer some C code and it will not know what to do with it - compile it and it'll run it fine (as long as you compile it for the right architecture, etc...). I know you're refering to assembly/machine code - but you really don't make that clear. It sounds like you're refering to all programming languages. 4. " Every wonder what 'Two Megs of Power' on some Master System games meant? That's what. I means it has 2 megabytes of RAM" "Megs" means "Megabits", not "Megabytes". "Two Megs of Power" means two Megabits, which is 2048 bits (kind of... It did at the time - see the link in the next paragraph). To get the number of bytes, you obviously divide that by eight - giving you 256 Kibibytes [sic]. I also recommend that you read this: en.wikipedia.org/wiki/Binary_prefix. It explains the differences between "Kilobytes" and "kibibytes", "Megabytes" and "Mebibytes", etc. It's not directly related, but is very useful. You're confusing RAM with ROM, too. Some carts do indeed have RAM, but they're mainly ROM. The first word should be "Ever", not "Every". 5. " Take that even further and you can understand why 64-bit was considered so powerful when it first appeared, even though said system sucked..." What? 6. There is no six. To be perfectly honest, I was a little disappointed. To me, the explanations seemed far too brief and lacking in detail. I actually found the examples given in "dry" programming books to be better. Having said that, it's better than I could do and it will probably help some people - so feel free to ignore the last paragraph. It's just my opinion (the five points at the top should be considered, though). I'll take a look at the hexadecimal tutorial at some point, then poke some holes in that. :P --- To save you from a double-post, here's my opinion on the hexadecimal tutorial: Good. It was much better than the first one - the explanations were more in-depth and useful. I think you muddied the waters a little with the issue of endianness, but feel that you pulled it off reasonably well. To be honest, the endianness never comes into my mind when coding (I think in bytes, not nibbles), but it's nice to see that you tackled it.
|
|
|
Post by rupert on Apr 26, 2008 20:14:14 GMT
Yeah, had the same thoughts myself - Maybe you two (Stan & Aypok) should work together on the rest of the tutorials? Or at least let Aypok proof read through them befor you release it. other than your bad English (mainly just typos really) I wouldnt have had a clue that some of the things you said were slightly inacurate.
|
|
|
Post by Stan on Apr 26, 2008 20:30:13 GMT
No, I just need to be more specific about what I'm saying, and having him to nitpick will definitely help me make sure my wording makes the most sense. How much more do you think I should add for a binary tutorial? In the long run it really won't be used, so I'm not sure what else I should add. Again, the idea was to make it as simple as possible, I'm sure there are areas that could be expanded on into infinity, but I don't see the need for it unless you have some ideas that you think should be thrown in there. Let me know and in the mean time I'll correct the grammar errors and make the ideas more clear. Thanks for the blasting! And 'said system' is the Jaguar.
|
|
Aypok
Sonic the Hedgehog
Posts: 2,372
|
Post by Aypok on Apr 26, 2008 21:16:42 GMT
No, I just need to be more specific about what I'm saying Yeah, that's pretty much my main problem with it. The theory you presented for the binary/hexadecimal is all fine. How much more do you think I should add for a binary tutorial? In the long run it really won't be used, so I'm not sure what else I should add. Again, the idea was to make it as simple as possible, I'm sure there are areas that could be expanded on into infinity, but I don't see the need for it unless you have some ideas that you think should be thrown in there. Let me know and in the mean time I'll correct the grammar errors and make the ideas more clear. I'm having difficulty putting it in to words... I'm not sure why. I know what I mean, but I can't convey it in a useful manner - hence the lack of it from my original tirade. Here goes: You don't clearly explain how to convert between decimal and binary (unlike the hexadecimal ones, which cover this well). You do cover it a bit, but not as well as you could/should. You talk around the subject, or something... You spend paragraphs talking about how it's naughts and ones, and how groups of eights bits are bytes, etc - but not enough on the actual matter at hand. Most of the books I've read explain it in "columns", the same way we (Brits) are taught decimals at school: the far right column is ones, the next one to the left is twos, then fours, then eights, etc. So a one in the eight, a zero in the four and two, then a one in the one means "one eight and one one". Explaining in such a manner, to me, would be far more logical (but worded better). You explain it as powers of two and "look at the table" - which doesn't seem as simple. If others can read and understand your stuff fine, feel free to ignore me. And 'said system' is the Jaguar. Ah, righty. :)
|
|
|
Post by Stan on Apr 26, 2008 22:16:00 GMT
Ahhh, I see what you mean, and honestly, I thought this a bit myself when I was putting the worksheet together. I can fix that easy. By the way, please, feel free to put in any input. Currently I'm deciding what step would be the best to take next, there are a number of paths to take.
|
|
Aypok
Sonic the Hedgehog
Posts: 2,372
|
Post by Aypok on Apr 27, 2008 6:49:32 GMT
Before I read your tutorials, I sat here and spent a good ten minutes wondering what the third tutorial should cover - it's a tricky one. It's still a little too early to jump in with code, but there's not much else to cover. My conclusion was bootstraping an application - how to set up a project and what tools you'll need to do it.
I just checked my Z80 book (the one by Rodney Zaks - ISBN: 0-89588-069-5) -- which, incidently is a brilliant book for beginners - it covers everything -- does it in this order:
* Basic programming concepts (flow charts and stuff) * Binary numbers * Binary maths * Binary coded decimals * Octal * Hardware details of the CPU
Having considered those, I'd say go for binary maths next: how to add/subtract two binary numbers. Then maybe throw in some arithmetic shifts. After that's done, go on to BCDs. I don't think you need to cover octal - if they can understand binary, decimal and hexadecimal, they should be able to pick up octal. :)
The CPU details can also wait a bit, I'd imagine. This stage is probably where I'd bring in basic concepts of programming; flow charts and stuff. I have some experience in this area, since my company teaches a "programming for beginners" course (although in a much higher level language) - I also wrote an on-line Turtle application to help users get acustomed to giving machines commands and seeing instant results. :)
|
|
|
Post by Stan on Apr 27, 2008 14:33:41 GMT
I picked that book up actually, it is quite good and very easy to understand. It would be simple to derive from it a fluid tutorial. I guess it's a good thing I didn't throw binary addition in there (though I did mention it in the worksheet), so I suppose that would be a good start. Any help you want to provide, please feel free, I can put an article from your writing or you could edit mine, whatever you have time for. Don't feel pressured, but I want this to be worked on by more than just one person, so any input is awesome. Thanks again for the criticism, and I mean that.
|
|
Aypok
Sonic the Hedgehog
Posts: 2,372
|
Post by Aypok on Apr 29, 2008 12:03:52 GMT
I picked that book up actually, it is quite good and very easy to understand. Unless I'm mistaken (I could be), the author released a digital version of the full book on Usenet a year or two ago - I think it's mirrored on the SMS Power! site somewhere. It's a great book for getting in to Z80 coding and to use as a reference, but it doesn't cover SMS-specific stuff, so can't replace the tutorials you have planned. :) I'd recommend it to everyone who wants to have a go at coding for the SMS. Any help you want to provide, please feel free, I can put an article from your writing or you could edit mine, whatever you have time for. Don't feel pressured, but I want this to be worked on by more than just one person, so any input is awesome. I'd really like to help out by writing an article or three, but I simply can't find the time - I picked up GTA IV yesterday, so now have even less time than usual. :) If you have anything you want me to look over, send me a copy and I'll give it a read.
|
|
|
Post by Stan on Apr 29, 2008 23:26:40 GMT
Yeah, I found it on the internet awhile ago (can't remember if through SMSpower), but over half of the chapters were no longer working so I just said screw it and bought it. I like to sit and read it anyway instead of sitting with light burning in my eyes. But yeah, obviously it's not SMS-specific, but you need to learn it to do it. No problem man, I'll send you things and if you have time you can look them over, no pressure at all. Working on the SMS specific tutorials is going to be a beast, but Scott seemed quite excited about it so I'm sure it will turn out awesome.
|
|
|
Post by Stan on May 8, 2008 14:12:48 GMT
Almost done with the next part (binary math). Aypok, some questions:
1. Do you think binary multiplication is necessary? As far as I'm concerned it's not.
2. Is BCD really necessary? It seems somewhat superfluous to me, interesting and perhaps good to know, but not needed for our overall goal.
3. I'm going to keep the binary tutorial pretty much as it is (changed some things based on your recommendations). It was meant to be a bare minimum intro, and since I'll be giving them more in the binary math section I think it works just fine. At any rate, your response to the above two questions would be appreciated.
|
|
Aypok
Sonic the Hedgehog
Posts: 2,372
|
Post by Aypok on May 8, 2008 14:38:09 GMT
1. Do you think binary multiplication is necessary? As far as I'm concerned it's not. No, I'd skip multiplication for now. It might be worth covering "shifting", but I guess you could wait until later. 2. Is BCD really necessary? It seems somewhat superfluous to me, interesting and perhaps good to know, but not needed for our overall goal. True - it's probably worth skipping it.
|
|