Developing a new engine

Discussion in 'Discussion & Q&A' started by FireRat, Dec 26, 2017.

Thread Status:
Not open for further replies.
  1. FireRat

    FireRat "The grand imitator..." Member

    Joined:
    Oct 31, 2009
    Messages:
    539
    Hello again.
    It's been a lot since the latest important post, and even then, please be patient if I take too long to reply any questions, as it's going to be very hard to get free time, working at a limited pace until February.


    A common issue with disassemblies is, many doesn't follow an ideal arrangement for advanced development, lack some documentation or even, by nature, there will be unexpected "surprise exceptions", all which makes the new program take extra unnecessary time & effort.
    At the same time, from mine part I wanted to create a new homebrew game after completing works on SVA, but forward some work first so the job gets easier afterwards (to compensate with the creative charge).

    TheBlad768, DiscoTheBat and me have been writing & arranging a fully documented cross-platform engine, for the MD, 32x and SCD consoles, including Mode 1 and the full combination. Meant to be found useful and "versatile" enough, its main goal is to keep it free and open from a legal viewpoint, so anyone could use it for Any purposes-
    In simpler words, you should be able to easily write a game for any of these platforms, and/or carefully write it for any of them.

    Technically, Build time is driven through GNU Make, under a "Build Objects / Link them" scheme. Uses open-source VASM and VLINK tools to assemble the Z80 and 68k code, plus a custom checksum generator and CD image builder. Each Makefile.[TARGET] file produces its output by fitting the Object files however does "best" (that's relative) to the Target; can automatically link objects from a previous build meant for a different Target, and for each SCD file (speeding up build process) even! The latter point counts, as long as there's no VDP-related code in said Object files, though (more on that later).
    Optimization Priority: CPU > ROM > RAM

    Some (planned) key features, these may change at any time:
    - 32x PWM driver on SH2
    • Stereo Output
    • Pan control
    • Vol control
    - SMPS-derivaten sound driver
    • Z80-based version
    • Not sure about a 68k-based version?
    - 32x Framebuffer renderer on SH2, 256 color mode
    • "Corner Pin" support
    • Scaling & Rotation support
    • DMA-based sprites list (for anything that doesn't require any of the above)
    • "Basic" 3D support (Using flat color texture, no lighting) (Besides need to investigate a lot yet, may end up using ".blend to custom" format converter or similar method))
    - SCD ASIC library
    - SCD ISO-9660 library, V2 or Joliet (whatever turns best, need to investigate)
    - SCD builds shall run core engine from 12MHz SubCPU
    • > The other way could be optional (?)

    Regarding the presentation, it's meant to, overall, look like this:
    https://i.imgur.com/5y5fBLg.png
    Here I'm showing the first inmediate drawback about SubCPU support: There's no direct way to communicate to VDP, and it's necessary to send the command to MainCPU; either "inmediately", or to its VInt-based queue, however necessary. This is why the commands and data is sent through macros: It would build differently if the target was SCD.


    With some help from Mercury's Sonic Physics Guide, a first "ideal" release would include a character with Sonic's physics, a few other objects to play with, and a scroll engine capable of drawing in individual 16x16 blocks and 128x128 chunks modes. It will be up to you to replace it with a Sonic the hedgehog's spritesheet and make a fangame upon it, or create something new.

    This project is still taking shape, so any comments would be appreciated. For you, is any of this a good idea in the first place?
    Please excuse any ignorance from mine part, especially regarding terminology, but, isn't the intention what counts?
     
    Last edited: Dec 27, 2017
    FATA-, LordXernom, FохConED and 2 others like this.
  2. EMK-20218

    EMK-20218 Eduardo Knuckles Member

    Joined:
    Aug 8, 2008
    Messages:
    1,013
    Location:
    Jardim Capelinha, São Paulo
    Of course it's a good idea, but its meant to be easy to use and have proper tools to do certain things (such as quantizing images, per example)? Just wondering.
     
  3. Novedicus

    Novedicus Pour your misery down on me Member

    Joined:
    Aug 26, 2013
    Messages:
    921
    ....no direct what?
     
    FireRat likes this.
  4. FireRat

    FireRat "The grand imitator..." Member

    Joined:
    Oct 31, 2009
    Messages:
    539
    Oops, thanks for that, I was somewhat nervous while writing. Fixed.
     
    LordXernom and AkumaYin like this.
  5. Natsumi

    Natsumi Phoenix egg Member

    Joined:
    Oct 7, 2011
    Messages:
    695
    Location:
    Long and dangerous river
    I am going to be honest here. This seems like an interesting idea, but really ambitious, and for what end? Someone without enough knowledge who could use an engine like this, probably has no knowledge nor use for Mega CD or the 32x. On the other hand, someone with the knowledge, is probably going to make their own specific engine setup tailoring to their needs. Who will this benefit? People who don't know much about programming or these add-ons? Probably not. People who know a bit about programming and add-ons? Maybe, but they are more likely to stay on Mega Drive to get more skilled. Professionals with a fair amout of knowledge? Probably realize these add-ons aren't worth any serious consideration. Or professionals with a lot of knowledge? Either don't want to touch them with a 10-foot pole or woek on their own stuff.

    I guess it's cool and all you actually can use crazy assembler and make setup to achieve this stuff, but most people are comfortable with AS or ASM68K (Even so much they'd spend their time hacking together z80 assembly :V), and its not easy to convince them of a quirky assembler that works sometimes.

    And I am not saying this is all wasted effort, because this could very well become handy to someone at some point, but I doubt the audience for this kind of thing will be much greater than trying to find a needle in a haystack, and you have to realize this if you are going to work on it seriously.
     
    Novedicus and Misinko like this.
  6. FireRat

    FireRat "The grand imitator..." Member

    Joined:
    Oct 31, 2009
    Messages:
    539
    Hm. Take it this way:
    This is what SVA will end up using, and what, at least from mine part, will use for the next project(s). It's just that, I prefered to share it than keep it all to myself, I guess?
     
    FATA-, LordXernom and EMK-20218 like this.
  7. Misinko

    Misinko YOU FOOLS! YOU MESSED WITH THE NATURAL ORDER! Staff

    Joined:
    Apr 30, 2013
    Messages:
    674
    Location:
    Ohio
    I think Natsumi pretty much summed up my thoughts towards this project. It'd be awesome to have a more structured engine that's tailored towards our scene as a whole instead of being as hardlocked as the classics are. It's all fine and dandy if you'd want to release the Megadrive version, but no one would know how to use the CD/32X renditions. I suppose the CD could be a good learning tool, given how it shares some similarities to the Megadrive, but releasing that, or the 32X rendition, wouldn't do the community much good, IMHO. I don't think anyone would ding you if you did, but it'll probably wind up as something no one uses, unfortunately.
     
    Natsumi likes this.
  8. Lil-G

    Lil-G Friendly Local Noob Maintenance

    Joined:
    Oct 21, 2014
    Messages:
    8
    Location:
    olathe, KS
    Maybe this could be used to learn how to use the SCD or 32X? I've been putting off learning either of them due to the massive amount of work that needs to be done to even start using the hardware. If I was given a engine that already supported that, I probably wouldn't put it off, And I'm sure there would be a lot more people who might try using the new features. Sure there's also probably going to be a large flood of Shitty-but-with-extra-hardware hacks but that's already unavoidable with normal hacks. I might be being a little too optimistic but I'd definitely want to learn about both the SCD or 32X.
     
    FireRat likes this.
  9. Misinko

    Misinko YOU FOOLS! YOU MESSED WITH THE NATURAL ORDER! Staff

    Joined:
    Apr 30, 2013
    Messages:
    674
    Location:
    Ohio
    In terms of the 32X, there's always Saxman's engine for you to pick apart. And while it may not be the best teaching tool, it's there. But I fear that even if you were put out the most optimized engine you possibly could, the majority of onlookers still wouldn't bite the hook. Main reasons are perceived difficulty, as well as actual difficulty. The poor saps who are already trying to crack the CD and 32X are running into brick wall after brick wall purely for the sloppy designs the consoles employ. There's only so far you can go with engines like these before you eventually have to start introducing some confusing hacks to make it all stick together.
     
    Natsumi likes this.
Thread Status:
Not open for further replies.