Basic Questions and Answers Thread

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

  1. Willm128

    Willm128 Newcomer Trialist

    Joined:
    Feb 1, 2017
    Messages:
    1
    I have a question relating to Clownacy's Sonic 2 Clone Driver v2. I followed the tutorial posted on both Sonic Retro and SSRG and tried to install it to my sonic 1 disassembly. After following the installation process I came up with a bunch of errors:
    SN 68k version 2.53

    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - MACROS.ASM(119) : Error : Op-code not recognised
    smps_id function ptr,((ptr-offset)/ptrsize+idstart)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(5) : Error : Op-code not recognised
    offset := musicindex
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(6) : Error : Op-code not recognised
    ptrsize := 4
    C:\USERS\aWILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(7) : Error : Op-code not recognised
    idstart := 1
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(11) : Error : Unexpected characters at end of line
    bgm_ghz = smps_id(ptr_mus81)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(12) : Error : Unexpected characters at end of line
    bgm_lz = smps_id(ptr_mus82)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(13) : Error : Unexpected characters at end of line
    bgm_mz = smps_id(ptr_mus83)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(14) : Error : Unexpected characters at end of line
    bgm_slz = smps_id(ptr_mus84)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(15) : Error : Unexpected characters at end of line
    bgm_syz = smps_id(ptr_mus85)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(16) : Error : Unexpected characters at end of line
    bgm_sbz = smps_id(ptr_mus86)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(17) : Error : Unexpected characters at end of line
    bgm_invincible = smps_id(ptr_mus87)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(18) : Error : Unexpected characters at end of line
    bgm_extralife = smps_id(ptr_mus88)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(19) : Error : Unexpected characters at end of line
    bgm_ss = smps_id(ptr_mus89)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(20) : Error : Unexpected characters at end of line
    bgm_title = smps_id(ptr_mus8a)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(21) : Error : Unexpected characters at end of line
    bgm_ending = smps_id(ptr_mus8b)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(22) : Error : Unexpected characters at end of line
    bgm_boss = smps_id(ptr_mus8c)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(23) : Error : Unexpected characters at end of line
    bgm_fz = smps_id(ptr_mus8d)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(24) : Error : Unexpected characters at end of line
    bgm_gotthrough = smps_id(ptr_mus8e)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(25) : Error : Unexpected characters at end of line
    bgm_gameover = smps_id(ptr_mus8f)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(26) : Error : Unexpected characters at end of line
    bgm_continue = smps_id(ptr_mus90)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(27) : Error : Unexpected characters at end of line
    bgm_credits = smps_id(ptr_mus91)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(28) : Error : Unexpected characters at end of line
    bgm_drowning = smps_id(ptr_mus92)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(29) : Error : Unexpected characters at end of line
    bgm_emerald = smps_id(ptr_mus93)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(30) : Error : Unexpected characters at end of line
    bgm__last = smps_id(ptr_musend)-1
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(34) : Error : Op-code not recognised
    offset := soundindex
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(35) : Error : Op-code not recognised
    ptrsize := 4
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(36) : Error : Op-code not recognised
    idstart := $80
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(39) : Error : Unexpected characters at end of line
    sfx_jump = smps_id(ptr_snda0)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(40) : Error : Unexpected characters at end of line
    sfx_lamppost = smps_id(ptr_snda1)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(41) : Error : Unexpected characters at end of line
    sfx_a2 = smps_id(ptr_snda2)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(42) : Error : Unexpected characters at end of line
    sfx_death = smps_id(ptr_snda3)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(43) : Error : Unexpected characters at end of line
    sfx_skid = smps_id(ptr_snda4)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(44) : Error : Unexpected characters at end of line
    sfx_a5 = smps_id(ptr_snda5)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(45) : Error : Unexpected characters at end of line
    sfx_hitspikes = smps_id(ptr_snda6)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(46) : Error : Unexpected characters at end of line
    sfx_push = smps_id(ptr_snda7)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(47) : Error : Unexpected characters at end of line
    sfx_ssgoal = smps_id(ptr_snda8)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(48) : Error : Unexpected characters at end of line
    sfx_ssitem = smps_id(ptr_snda9)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(49) : Error : Unexpected characters at end of line
    sfx_splash = smps_id(ptr_sndaa)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(50) : Error : Unexpected characters at end of line
    sfx_ab = smps_id(ptr_sndab)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(51) : Error : Unexpected characters at end of line
    sfx_hitboss = smps_id(ptr_sndac)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(52) : Error : Unexpected characters at end of line
    sfx_bubble = smps_id(ptr_sndad)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(53) : Error : Unexpected characters at end of line
    sfx_fireball = smps_id(ptr_sndae)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(54) : Error : Unexpected characters at end of line
    sfx_shield = smps_id(ptr_sndaf)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(55) : Error : Unexpected characters at end of line
    sfx_saw = smps_id(ptr_sndb0)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(56) : Error : Unexpected characters at end of line
    sfx_electric = smps_id(ptr_sndb1)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(57) : Error : Unexpected characters at end of line
    sfx_drown = smps_id(ptr_sndb2)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(58) : Error : Unexpected characters at end of line
    sfx_flamethrower = smps_id(ptr_sndb3)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(59) : Error : Unexpected characters at end of line
    sfx_bumper = smps_id(ptr_sndb4)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(60) : Error : Unexpected characters at end of line
    sfx_ring = smps_id(ptr_sndb5)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(61) : Error : Unexpected characters at end of line
    sfx_spikesmove = smps_id(ptr_sndb6)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(62) : Error : Unexpected characters at end of line
    sfx_rumbling = smps_id(ptr_sndb7)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(63) : Error : Unexpected characters at end of line
    sfx_b8 = smps_id(ptr_sndb8)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(64) : Error : Unexpected characters at end of line
    sfx_collapse = smps_id(ptr_sndb9)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(65) : Error : Unexpected characters at end of line
    sfx_ssglass = smps_id(ptr_sndba)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(66) : Error : Unexpected characters at end of line
    sfx_door = smps_id(ptr_sndbb)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(67) : Error : Unexpected characters at end of line
    sfx_teleport = smps_id(ptr_sndbc)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(68) : Error : Unexpected characters at end of line
    sfx_chainstomp = smps_id(ptr_sndbd)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(69) : Error : Unexpected characters at end of line
    sfx_roll = smps_id(ptr_sndbe)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(70) : Error : Unexpected characters at end of line
    sfx_continue = smps_id(ptr_sndbf)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(71) : Error : Unexpected characters at end of line
    sfx_basaran = smps_id(ptr_sndc0)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(72) : Error : Unexpected characters at end of line
    sfx_breakitem = smps_id(ptr_sndc1)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(73) : Error : Unexpected characters at end of line
    sfx_warning = smps_id(ptr_sndc2)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(74) : Error : Unexpected characters at end of line
    sfx_giantring = smps_id(ptr_sndc3)
    C:\USERS\WILLMATHIS\DESKTOP\S1HACKBACKUP - COPY\SOUND\SONIC 2 CLONE DRIVER V2 - SOUND IDS.ASM(75) : Error : Unexpected characters at end of line
    sfx_bomb = smps_id(ptr_sndc4)

    Too many errors, assembler aborting...
    Errors during pass 1 - pass 2 aborted
    Assembly completed.
    64 error(s) from 993 lines in 0.0 seconds

    I then saw Clownacy's comment to another user who seemed to have the same problem. Seeing the reply from Clownacy I placed the AS folder into my build, but the same errors still pop up! Am I doing something wrong with the code? Or do I have to use the contents within the AS folder in a certain way? It doesn't help that I have no idea how this Macro Assembler AS thing works. If anyone knows how to fix these errors then that'd be great. I just want to have some good custom music on my rom hack (Specifically music from Sonic 3D Blast)
     
    HackGame likes this.
  2. Niko

    Niko All's well that ends well, right? Member

    Joined:
    Mar 1, 2014
    Messages:
    245
    Location:
    $C800
    Seems like the assembler itself isn't "liking" the ASM, so maybe use a different compiler?
    I honestly don't know off the top of my head, so long absent from--

    Speaking of the which, I've noticed that the disassembly bank has altered significantly from how it used to be, with mentions of a better-commented build of Sonic 1, to the fact that I never quite got too deep into the idea of "best base" for a hack.

    --> I was wondering, as to starting a fresh Sonic 1 (maybe 2) project, which disassembly would you all recommend?
    Personally, I've always noticed plenty of people getting some sort of scolding about not using the Sonic 1 TwoEight abilities, and that's where-about I'm looking, but the question then is.. which of those branches is the best for starting fresh nowadays?
     
  3. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    The best disassembly to use, is the one that suits your needs personally, when people tell you which disassembly to use, they often tell you what to do and give you all the pros without mentioning the cons, rather than simply give you all the pros and cons and let you decide for yourself.

    You should pick one, try it out, and see how far you get, and if you're not comfortable, try a different version. All of those branches should be the same source based on my original, just with different assemblers, though some later ones may have small additions, whether or not they make a difference is down to your preference.

    So try them all out~
     
    Pacca, Niko, Jdpense and 4 others like this.
  4. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    I think you can narrow down to a select list of disassemblies based entirely on what the majority of the community thinks is at least acceptable. For example, the eternal debate of the post-2005 Sonic 1 disassemblies will always be there, but that's mostly because it has taken a drastically different route, whereas within the realms of Sonic 2 disassemblies the original 2007 became pretty much objectively obsolete in comparison to the current one on github. Now your mileage may vary, but that's my personal perception of things at the very least.
     
  5. AURORA☆FIELDS

    AURORA☆FIELDS so uh yes Exiled

    Joined:
    Oct 7, 2011
    Messages:
    759
    All the disassemblies we currently have, are terrible in their own ways. I've myself come to like the 2005 version, but lets face it, its really poorly documented. Github on the other hand... Is just a huge mess of files and folders and is really poorly constructed, but on the other hand is better documented. Its really about what you are used to, and what your needs are. For me, I used to use 2005 because all the hacks I had done was on that disassembly, so I learnt my ropes around its rough appearance. Then again I hear some people are used to the extremely silly way the files are ordered and split in the Github disassembly. Some people are in fact more used to using AS (which is a shame how part of the community went with such a generally lousy assembler, but whatever, its again a situation of pick your poison), and can work better with it.

    if you ask me, Hivebrain 2005 based disassemblies are the best for new people, because they have an assembler that fairly well conveys what you have done wrong, and very simple codebase, and helps you get closer to hardware level, but in reality it really just comes down to what you are used to and what you are planning to do.
     
  6. Pacca

    Pacca Having an online identity crisis since 2019 Member

    Joined:
    Jul 5, 2014
    Messages:
    1,175
    Location:
    Limbo
    I typically would use the older 2005 version and cross reference with the github version whenever I needed the documentation. I did a similar thing with Sonic 2 as well. Its' a good skill to be able to find identical code in different disassemblies, it helps you see just whats' different about them, and makes it exponentially easier to port code and guides between the two (which is the only reason I have knuckles in RR2; the guide was for github and I converted the whole thing to work with Xenowhirl). It also makes it really easy to see their strengths and flaws; while I don't really know enough about the Sonic 2 github disassembly to use it as a base for a full hack without messing things up, a lot of its' macros are a life saver, and I ended up bringing a lot of them back to my Xenowhirl disassembly so I could get the best of both worlds ;)
     
    ProjectFM and AURORA☆FIELDS like this.
  7. ZeroInfinity

    ZeroInfinity Newcomer Trialist

    Joined:
    Oct 20, 2015
    Messages:
    6
    Location:
    Australia
    Ok, I HATE asking for help cus I'm always worried that I'll look like an idiot, but... right now I don't really have a choice. So... sorry if I'm an idiot.
    I've been working on a Lilac in Sonic 1 hack (Lilac being a character from the Sonic inspired game, Freedom Planet.) and I was just in the process of adding Lilac's sprites for the ending sequence. (which were some of the last sprites I had left to change) But when I tested it this happened:
    [​IMG]
    I would assume this has something to do with the size of the sprite? Even though it doesn't really have more tiles than the original sprite... Or is there something else going on here? It would be a pain if I had to try to resize the sprite...
     
  8. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    What's likely happened here, is the character's art has been loaded into VRAM, and then the animal art has been loaded further down in VRAM afterwards, and has overwritten several tiles of the character art.

    You said it "doesn't really have more tiles than the original", do you mean as in, it uses less or the same as the original, or do you mean as in, it's using more than the original, but not a great deal more?

    Final question; have you changed any of the VRAM locations to where the character's art or animal's are loaded? In other words, have you edited the pattern load cues (PLC) list in any way?
     
  9. ZeroInfinity

    ZeroInfinity Newcomer Trialist

    Joined:
    Oct 20, 2015
    Messages:
    6
    Location:
    Australia
    The new sprite uses 11 more tiles than the original.
    As far as I know, I haven't touched any VRAM stuff.
    As for the pattern load cues, I did edit Sonic's dynamic pattern load cues when I replaced his sprites with Lilac's. That's the only thing related to PLCs I've done. I did it some quite some time ago and I haven't had any issues until now. Actually, wait. I did have a weird issue when I replaced title screen sprites, where tiles from the 'TM' on the title screen would appear on the new sprites. I fixed that by having the title sprites share tiles like the original sprites. You know... maybe this is caused by Lilac's in game sprites having more tiles than the original ones, since they're bigger. At first it didn't seem to be a issue, but maybe somewhere along the line, as I've added more sprites, it caused things mess up? Maybe? I dunno. I really have no idea. Like, at all.
     
  10. FATA-

    FATA- cmpi.w #$FA1A,d0 Member

    Joined:
    Dec 18, 2016
    Messages:
    20
    Location:
    Russian Federation, Saint Petersburg
    Hi all, so I needed to convert one photo to mega drive format so I used ImaGenesis. But I can't convert my photo because every time I try to convert it there is an error message 'component 'rich32.osx' or one of it's dependencies...". I downloaded all dependencies, dropped it in system32 folder, tried in compatibility mode, tried different modes in ImaGenesis but it still doesn't work. Can someone help me with this problem because I can't find a solution or recommend another converter like this?
     
  11. AURORA☆FIELDS

    AURORA☆FIELDS so uh yes Exiled

    Joined:
    Oct 7, 2011
    Messages:
    759
    You also need to register that ocx (also I think dropping it in the folder with ImaGenesis works too). Though, I suggest using GetArt.NET, as it is better at converting the image more accurately, and is more versatile. The only downside is that you need to supply it a palette image with the bitmap itself.
     
    MainMemory and FATA- like this.
  12. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    Technically you only need a palette image if your image does not use a palette itself.
     
  13. FATA-

    FATA- cmpi.w #$FA1A,d0 Member

    Joined:
    Dec 18, 2016
    Messages:
    20
    Location:
    Russian Federation, Saint Petersburg
    Hi everyone, that's me again and today I have another question, maybe more interesting than the last one. So I needed pseudo-random generator in range 1-100 so I googled a lot and found this piece of code:
    Code:
    move.b  #8,d0
    trap    #15
    and.l   #$5FFFFF,d1     
    divu    #100,d1         
    swap    d1             
    addq.w  #1,d1           
    move    d1,d2 
    It worked in Easy68k but I was afraid of this "trap" exception-raising routine and my fears were confirmed.It raised an exception and game freezed. Then I googled, read a lot again, tried to write something by myself but nothing worked as a good random. So I want to ask for an advice and to ask someone for help.
    P.S. That's not a sonic game.
     
  14. Devon

    Devon You are the perfect drug Member

    Joined:
    Aug 26, 2013
    Messages:
    1,372
    Location:
    your mom
    Do you have the TRAP 15 address in the vector table set to an address that doesn't point to your error handler?
     
    FATA- likes this.
  15. AURORA☆FIELDS

    AURORA☆FIELDS so uh yes Exiled

    Joined:
    Oct 7, 2011
    Messages:
    759
    I would suggest just copypasting the code from Sonic 1... It works well enough, and is not too slow.
     
    FATA- likes this.
  16. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    If additional randomness is required, you can XOR the seed value with a frame counter (if you reset it for each level) or the VDP's HV counter when you initialize it.
     
    FATA- likes this.
  17. FATA-

    FATA- cmpi.w #$FA1A,d0 Member

    Joined:
    Dec 18, 2016
    Messages:
    20
    Location:
    Russian Federation, Saint Petersburg
    @Ralakimus , as I read from one book this exception only works in Easy68k and it doesn't work in real 68k assembly for some reason :eek:
    @Natsumi , @MainMemory thanks for the advice,didn't know that there was pseudo-random in sonic 1. I will use frame counters+some other ram thingies,this sonic subroutine and other stuff
     
  18. Devon

    Devon You are the perfect drug Member

    Joined:
    Aug 26, 2013
    Messages:
    1,372
    Location:
    your mom
    Regarding the TRAP thing, from the looks of what you had, Easy68k had a random number routine set for TRAP 15. You would've needed to somehow get the routine from that (if possible) and set the pointer in the vector table accordingly.

    Though, TRAPs are slow, so I wouldn't use it anyways. I would go with Natsumi's and MainMemory's suggestions instead.
     
  19. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    The trap routines for EASy68k (i.e. the vector table that technically doesn't exist as it's not emulated for accuracy in that regard), are hidden, or at best are built in such that the routine is nothing more than a function of the program itself (though I'd need clarification on that). EASy68k is treated almost like an operating system, the traps, error routines, interrupt vectors and so forth are all controlled by the operating system, and you'd use the traps to perform hardware specific accesses, or even certain operating system subroutine calls.

    For a Mega Drive ROM it's more than likely useless to use the trap routines, because for one, you have complete control over the vector table, and over the machine, there is no software in the traps necessary to call to use the hardware specifically, you have complete control over the hardware, and for two, the trap instruction is actually slower to process than directly calling a subroutine (even a long-word call iirc, though the manuals on the CPU architect have been wrong before).

    I would strongly recommend following Natsumi/MainMemory's advice. Though here is some sample code for you:
    Code:
    Sample:
    		bsr.w	RandomNumber		; run random number subroutine
    		moveq	#$00,d1			; clear longword d1
    		move.w	d0,d1			; load only the lower word
    		divs.w	#100,d1			; divide by 100
    		clr.w	d1			; clear the division
    		swap	d1			; get the remainder (modula 100 (0 - 99))
    		addq.w	#$01,d1			; add 1 to get 1 - 100 inside d1
    And here is the random number code from the Sonic games as recommended, they are not fullproof, but they worked well enough for Sonic Team:
    Code:
    RandomNumber:
    		move.l	($FFFFF636).w,d1
    		bne.s	loc_29C0
    		move.l	#$2A6D365A,d1
    
    loc_29C0:
    		move.l	d1,d0
    		asl.l	#2,d1
    		add.l	d0,d1
    		asl.l	#3,d1
    		add.l	d0,d1
    		move.w	d1,d0
    		swap	d1
    		add.w	d1,d0
    		move.w	d0,d1
    		swap	d1
    		move.l	d1,($FFFFF636).w
    		rts	
     
    Last edited: Mar 7, 2017
    FATA- and Devon like this.
  20. Kyoni

    Kyoni Newcomer Trialist

    Joined:
    Nov 12, 2016
    Messages:
    1
    Hello all. I've been looking for a tutorial on how to port all of the elemental shields from S3&K to S1 but I can't seem to find one.

    I want to port the shield advantages coding (as in if you had the fire shield you could walk on lava), shield abilities coding, shield sprites and item box sprites.
    Where do I start?

    I'm sorry if a similar question has been answered.