Page 3 of 3

Re: Where do I start? I'm seeking technical documents.

Posted: Thu Mar 15, 2018 10:09 pm
by Sik
For assembly we usually just grab some 68000 assembler (as long as it's not GAS :​v) and a text editor. No need for linkers when you can just do lots of includes. Also no framework since if you're using asm you probably want to do everything as raw as possible (you'll probably end up making your own framework, possibly getting adapted as you work on different games).

No specific emulator at hand, in fact you probably want to grab several of them. There isn't a "best" emulator when it comes to making games, some are more accurate, or have better tools, or run faster on your crappy computer (:​P), etc.

Re: Where do I start? I'm seeking technical documents.

Posted: Fri Mar 16, 2018 6:06 am
by TmEE co.(TM)
Just for code I have couple old things that can be looked at :
My first game on MD, very poor code : http://www.tmeeco.eu/SMD/GBMD11S.RAR
Pong game that doesn't use RAM at all : http://www.tmeeco.eu/BitShit/PONG!RAM.ASM

And for some less terrible stuff here's a disassembly of the TMSS ROM I made a while ago :
http://www.tmeeco.eu/SMD/TMSSCODE.ASM

All require SNASM68K to be assembled : http://www.tmeeco.eu/SMD/SNASM68K.EXE
There's also ASM68K which is mostly compatilbe and works on newer machines too : http://www.tmeeco.eu/SMD/ASM68K.EXE
I haven't yet found an assembler that can do all these do and aren't slow or buggy etc. so I'll be sticking to those until I write my own in not so far future.

BlastEm is slowly reaching the best emulator state for my liking... just needs a good UI which seems to be worked on already. But yes, you have tradeoffs between tools, speed and accuracy, there's no single emulator yet that combines all 3 (also a thing I'll do but not in that near future).

Re: Where do I start? I'm seeking technical documents.

Posted: Wed Apr 11, 2018 8:41 am
by sverx
I still didn't start coding anything, but I was wondering how usually sprites are handled.
I mean, I've seen that the sprites are stored as a linked list instead that just a simple array - how usually this is used to any advantage?

Re: Where do I start? I'm seeking technical documents.

Posted: Wed Apr 11, 2018 11:40 am
by Sik
It's not :​D

Seems like Sega added it thinking it could help e.g. with sorting and such, but in practice you're more likely to do all that manually before inserting the sprites in the list. I did use it once with that purpose, though that was more of an afterthought.

If you want to avoid the linked list mess just set the link value to always point to the next sprite in the list. You may want to set the link of the last sprite to 0 (terminating the list) instead of having to move off-screen all excess entries.

Re: Where do I start? I'm seeking technical documents.

Posted: Wed Apr 11, 2018 3:43 pm
by Stef
Well in fact the SGDK Sprite engine does use the link field to define sprite order and it does help a bit but just because the Sprite Engine by itself is a heavy beast (each sprite internally has a prev / next link anyway).

Re: Where do I start? I'm seeking technical documents.

Posted: Wed Apr 11, 2018 3:50 pm
by sverx
Sik wrote:
Wed Apr 11, 2018 11:40 am
It's not :​D
That was my fear :?

Also, if I understand correctly what Stef just said, SGDK uses that simply because it was faster/easier than following the internal sprite list and dump them into the SAT in actual order? If so, it really isn't any smart use of those links...

Re: Where do I start? I'm seeking technical documents.

Posted: Wed Apr 11, 2018 8:22 pm
by Stef
No SGDK uses it as it can do partial update of SAT so at contrary that is a good way of using it but what i meant is that the sprite engine by itself is heavy in general (but that s the cost of its flexibility) and having a more customized engine designed on purpose can be faster just updating the whole SAT ;) Still if you're able to take advantage of it designing your sprite engine, then it can be useful (but definitely that is not *that* useful).

Re: Where do I start? I'm seeking technical documents.

Posted: Fri Apr 13, 2018 12:10 pm
by Miquel
About that not so useful linked sprites:

If this is before 1989, you don't know which cpu will be used in conjunction perhaps makes more sense, since other cpu operate much more efficiently in strict array structures. Maybe NES, being the big bucks, had some influence.

But yes, even so is hard to see it's utility.

Re: Where do I start? I'm seeking technical documents.

Posted: Fri Apr 13, 2018 9:11 pm
by Sik
Neither NES nor Master System have linked lists. In both cases every sprite in the table is processed in order (there isn't even something to indicate how many sprites were there, you have to move off-screen all unused entries). The NES lets you specify which entry to start from (still processed all 64 entries due to wraparound), which was probably intended to help with flicker in case of sprite overflow but in practice wasn't that useful for that purpose.

They didn't ask for developer input back then so they just crammed in whatever feature they could that seemed nice, so I guess their thought was that linked lists were probably useful for something (don't get fooled, when they decided to ask for developer input, we got the clusterfuck that's the Saturn...)

Re: Where do I start? I'm seeking technical documents.

Posted: Sat Apr 14, 2018 5:05 pm
by Miquel
I didn't say anything about NES having a sprite linked list, all I'm saying is NES cpu is extremely efficient working with arrays, but not that good moving memory around or working with pointers or lists... this linked list in hardware can help in this type of cpu's, a little. Of course this is just a speculation.

I think the usefulness is clear: you don't have to do all the work to z-sort the actors, part of it is done by hardware, so with a simple loop is enough to fill the hardware sprite array.

The shock is: it's not worth at all with a 68K or a Z80, since you can do this rearranging while doing other things.

Re: Where do I start? I'm seeking technical documents.

Posted: Wed Apr 18, 2018 11:17 am
by sverx
Sik wrote:
Fri Apr 13, 2018 9:11 pm
Neither NES nor Master System have linked lists. In both cases every sprite in the table is processed in order (there isn't even something to indicate how many sprites were there, you have to move off-screen all unused entries).
Well, no, fortunately on the Master System there's an end-of-sprites marker (Y value 0xD0)
SMS VDP doc wrote:If the Y coordinate is set to $D0, then the sprite in question and all remaining sprites of the 64 available will not be drawn.