Basic Questions and Answers Thread

Discussion in 'Discussion & Q&A' started by Malevolence, Jul 7, 2009.

  1. LackofTrack

    LackofTrack Newcomer Member

    Joined:
    May 30, 2018
    Messages:
    18
  2. Ozaleto

    Ozaleto Well-Known Member Member

    Joined:
    Aug 6, 2009
    Messages:
    152
    Would like to mention that Yamaha FM is *technically* Phase Modulation and not Frequency Modulation (that gif shows Phase Modulation in action) but it's "basically the same"

    Here's a really good article on it: https://moinsound.wordpress.com/201...or-phase-modulation-synthesizer-technologies/

    Also, I recommend not doing math for more complex waveforms, you can do math to get other simple waveforms like a square or a saw, but the more complicated it gets... the worse it is to do mathematically. Typically, I make my own FM patches just by listening and messing around with the values. I know what each value does to the outcome after a while of messing around, so I recommend just spending time messing around with creating an FM patch, or even editing a pre-existing FM patch from a game.
     
  3. MarkeyJester

    MarkeyJester ! % # @ Member

    Joined:
    Jun 27, 2009
    Messages:
    2,726
    Yeah I... wasn't really going to get into the whole Frequency vs Phase debate, I personally find it to be pathetic terminology at the best of times.

    Furthermore, I agree regarding the "doing the math" situation (however, I mentioned no-where about doing the math, it just happened that the animated GIF had the equations d=), the purpose was to give a general insight as to what was happening from a visual point of view. I would like to build on your recommendation, many musicians when using synthesisers usually try a trial and error approach as opposed to working out the specifics, I personally think it's less of a recommendation and more of a professional direction, the dials should be used in this manner, the only real exception I could throw in is where more modern keyboards have instrument patches which are specifically calculated to emulate a specific real-life instrument with clear accuracy.
     
  4. GreaterGam

    GreaterGam Newcomer Trialist

    Joined:
    Jun 30, 2019
    Messages:
    5
    Location:
    A Place
    For now, I'll read up one the links you showed me. When I start coding, I'll use Stealths engine for editing Sonic 1 visually, then later on I'll start working on the confusing text.

    I really didn't expect you to give this long, extremely detailed explanation to a beginner like me. I'm excited to see what I can rack up in my ROM hack. Thanks MarkyJester.

    Edit - Oh God the hex editor makes zero sense.
     
    Last edited: Jul 11, 2019
    MEGALOMANIA and NeoFusionBox like this.
  5. MEGALOMANIA

    MEGALOMANIA Feel free to criticize me Member

    Joined:
    Aug 22, 2018
    Messages:
    42
    Location:
    Brazil Bad Future
    upload_2019-7-13_13-32-54.png
    upload_2019-7-13_13-33-1.png

    Which one is better?
    Also, the octopus need to look black. :v
     
    ProjectFM likes this.
  6. Novedicus

    Novedicus ROT... AND... ASSIMILATE! Member

    Joined:
    Aug 26, 2013
    Messages:
    893
    B for Sonic, A for the octopus badnik.
     
  7. Pacca

    Pacca Confused floof Member

    Joined:
    Jul 5, 2014
    Messages:
    1,135
    Location:
    The Moon (again)
    I'm extremely close to finally making a 1 to 1 remake of Green Hill in Sonic 2s' engine, but I seem to have straight up run out of vram. Those darned Newtrons use a shocking amount of tiles, and given both Sonic 2s' default VRAM set aside for tails and what not, and the VRAM used for super sonic/ stars and shield (I've optimized VRAM for the latter, but have used it all for more universal objects that need to render in all levels), I only seem to have about $20 tiles left, added up from two separate parts of VRAM that surround the universal section. Even if I did break up the artwork to fit around that limitation, I doubt it'd fit...

    Does anyone have any tips for saving/micromanaging VRAM? I've been going about it intuitively thus far, but I seem to have hit a brick wall on this one.
     
    Last edited: Jul 14, 2019
    MEGALOMANIA likes this.
  8. MarkeyJester

    MarkeyJester ! % # @ Member

    Joined:
    Jun 27, 2009
    Messages:
    2,726
    Green Hill Zone has a few unused tiles in the level's art itself, some unused totem poles, unused inside walls (i.e. SMS Sonic 1), of course, we are talking about 12 or so tiles, no idea if that would be enough.

    You could also optimise the badniks art themselves, for example the motobug, there are two frames for the arms, each frame for the arms consist of four tiles horizontally, however the fourth tile in both of them are the exact same tile. The reason was to cost only 1 sprite to display all four of these tiles at once, at the expense of another sprite, you could save a tile when rendering the second arm by displaying only the three tiles of the other frame, and using another sprite to display 1 tile from the previous (which is identical). That's just one example though, other badniks do have similar frames here or there, even the newtron has the same head about three times with different mouth gestures, by sacrificing the number of sprites you can save on tiles.

    Another method involves misdirection, you would be amazed at what you could remove without anyone ever noticing. When trying to create Project Sonic 1:Two-Eight I hit into the issue where Sonic 1's 256x256 chunks would not fit into 128x128 chunks, pure and simply some of the levels were too big, sacrifices to the patterns of some of the chunks were made, and no-one noticed them because they were minor. To further this, sometime ago, I made an experimental ROM to test this theory, you play GHZ, you go around and around and around, and each time you go around, something changes. Of all the people who have ever played it, an extremely few number have ever noticed one of the changes, let alone all 13.

    I believe if you were to use a combination of misdirection or rearrangement of the level chunks designs, you could remove some tiles without anyone ever noticing.

    An additional thing you could do to help find free spaces you never knew you had, is to flood the entire VRAM space with F's from VRAM 0000 to FFFF before the level starts. You can then view the contents of VRAM, and any tiles that are solid using the last colour in the palette are highly likely to be unused free space. Blank transparent tiles have a habbit of being used in combination with sprites, so this helps to rule it out.
     
    Last edited: Jul 14, 2019
  9. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    851
    One slight problem with that is that Sonic 2 likes to load some art once at startup and never reload it, I believe it's the PLC with the ring art in it. You'll want to manually reload that after clearing VRAM.
     
    MEGALOMANIA likes this.
  10. MarkeyJester

    MarkeyJester ! % # @ Member

    Joined:
    Jun 27, 2009
    Messages:
    2,726
    6 years ahead of ya~

    This'll go after the "move #$2700,sr" in the "Level:" routine.

    Code:
    		lea	($C00004).l,a6				; load VDP address port to a6
    		moveq	#$01,d5					; prepare value to check for DMA finish
    		move.l	#$8F019780,(a6)				; set increment mode & DMA source
    		move.l	#$94FF93DF,(a6)				; set DMA size
    		move.l	#$40200080,(a6)				; set DMA destination
    		move.w	#$FFFF,-$04(a6)				; fill location with F's
    
    Level_WipeVRAMWait:
    		move.w	(a6),ccr				; load VDP flag to "v" flag
    		bvs.s	Level_WipeVRAMWait			; if still busy with DMA, loop
    		move.w	#$8F02,(a6)				; set increment mode to normal
    		moveq	#$00,d0					; set to reload the HUD/Ring patterns
    		bsr.w	LoadPLC2				; ''
     
    Last edited: Jul 14, 2019
    MEGALOMANIA and ProjectFM like this.