A little question

Discussion in 'Discussion and Q&A Archive' started by JackyFarron, May 2, 2012.

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

    JackyFarron Ah, it suits you! Member

    Joined:
    Mar 19, 2009
    Messages:
    27
    Location:
    $10000
    Bonjour!


    I left the lurking time for a short moment because I would like to have some assistance with a little question. Let's start:


    I tested myself making a new object for my game. In general, it works as it should work (it makes its effects/actions).


    But when I want to add the art and the proper PLC entry, I have two different issues:


    -When I use a PLC entry from another object, the art works properly, but I don't want to replace the PLC of current items.


    -When I add a new PLC entry and store his art in a random position (I tested $Exxx values), the game freezes or shows odd stuff in screen.


    What should I do? Are there some locations with "free" spaces or something?


    Any kind of held or hint would be appreciated.


    Thanks :)
     
  2. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    When you say it "freezes", does it freeze when you get close to your new object, or freeze before the level finishes loading up?
     
  3. SpirituInsanum

    SpirituInsanum Well-Known Member Member

    Joined:
    Feb 11, 2010
    Messages:
    642
    You're probably overwriting game data anyway. You can't just put an address and hope it will work.


    Try with regen, and open the vdp debugger, there you will see the content of the vram. You'll see there's very little free space, so you'll probably have to reorganize and optimize several things before you can add a new object.
     
  4. JackyFarron

    JackyFarron Ah, it suits you! Member

    Joined:
    Mar 19, 2009
    Messages:
    27
    Location:
    $10000
    Sorry for the not-so-fast reply, I had some issues in the outside life =P


    Anyway, I finally made some location changes and now the object art loads normally.


    Merci beaucoup for your help. ;)
     
  5. EMK-20218

    EMK-20218 The Fuss Maker Exiled

    Joined:
    Aug 8, 2008
    Messages:
    1,067
    Location:
    Jardim Capelinha, São Paulo
    You have to configure the VRAM also in the object code and also in the PLC. You can see the VRAM value for the object using GensKMod, so you can configure it for the object. For the PLC "format" I suggest you to use Debugens "file -> Debug -> Genesis VDP". In the left side you'll see the VRAM values. Find free ones and enhorabuena, Joaki.
     
  6. JackyFarron

    JackyFarron Ah, it suits you! Member

    Joined:
    Mar 19, 2009
    Messages:
    27
    Location:
    $10000
    I'm back from inactivity again to ask another question: How I can make a check if any song is playing?


    I tried to do by myself, but I haven't reached to any useful results.


    (Sorry for the bump. If necessary, please feel free to trash this post and/or the full topic and warn me)
     
  7. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    Right, the sound driver doesn't actually store the sound ID when a track is played, so, you will need to store the ID somewhere yourself, when the BGM/SFX ID's are set.


    In Sonic 1 for example, the music/sounds are set by moving the ID into d0, and then calling a routine which moves it into a RAM location, this RAM location gets cleared when the music/sound is loaded, so perhaps moving that ID into another RAM location as well (by another, I don't mean changing the RAM location, I mean moving it into the RAM location it normally does, and moving it into a second RAM location, i.e. both of them), that way, you have a copy of the ID.
     
Thread Status:
Not open for further replies.