new SH2 assembler

Discussion in 'Sega Saturn Programming and Development' started by DamageX, Dec 24, 2010.

  1. DamageX

    DamageX Member

    Joined:
    Dec 24, 2010
    Messages:
    11
    Likes Received:
    0
    How are you gentlemen!! This is my first time writing an assembler. It is barebones, and I didn`t write documentation yet. But there is a source file included which can be assembled and run (tested on Saturn via usb-link and Yabause) which shows a scrolling pattern on the screen. BASIC source is included. Enjoy,

    http://www.hyakushiki.net/superas.zip
     
  2. drx

    drx BLAST PROCESSING. SITE SUPPORTER 2015

    Joined:
    Jun 16, 2006
    Messages:
    509
    Likes Received:
    275
    Nice. In BASIC, too... somewhat impressive.
     
  3. TmEE

    TmEE Peppy Member

    Joined:
    Aug 13, 2008
    Messages:
    362
    Likes Received:
    1
    I think you can change a ton of those IF's into CASE's, and use of GOTO in a high level language is evil xD

    My tracker for making music on MD is about 3000 lines of BASIC mess, but there's not a single GOTO or GOSUB in there :p

    Still, nice effort ^^
     
  4. DamageX

    DamageX Member

    Joined:
    Dec 24, 2010
    Messages:
    11
    Likes Received:
    0
    update: added a brief manual and fixed a problem with MOV/MOVA opcodes

    also, here are a couple more demos showing bitmaps with interlaced 448-line resolution (Yabause 9.10 doesn`t show the extra resolution but Saturn does)

    http://www.hyakushiki.net/satdemos.zip

    GOTO`s are unfashionable... but I am not fashion concious ;)
     
  5. DamageX

    DamageX Member

    Joined:
    Dec 24, 2010
    Messages:
    11
    Likes Received:
    0
    updated the archive once more.

    BTW, does anyone have code showing how to toggle the clock speed between 26.8/28.6MHz?
     
  6. vbt

    vbt Spirited Member

    Joined:
    Mar 17, 2007
    Messages:
    125
    Likes Received:
    23
    I think this was enough to switch to 28mhz

    SYS_CHGSYSCK(1); //28mhz
    set_imask(0);

    maybe you need also a resolution of 352x...,704x...

    just an off topic note, maybe you could participate to the S.A.T.U.R.N Contest, you're doing some nice stuff on saturn.

    http://segaxtreme.net/community/topic/16872-saturn-contest-roll-call/


     
    Last edited: Jan 22, 2011
  7. DamageX

    DamageX Member

    Joined:
    Dec 24, 2010
    Messages:
    11
    Likes Received:
    0
    Thanks for posting. You are talking about a Sega library function or something yes? I haven`t looked at any of that, since I don`t really understand C. I spotted the 0x06000320 in your post though, and tried calling the routine at that vector by using TRAPA #200. It seems to work fine on the Saturn but under Yabause it somehow ends up going through $6000010 (illegal instruction exception?)
     
  8. vbt

    vbt Spirited Member

    Joined:
    Mar 17, 2007
    Messages:
    125
    Likes Received:
    23
    yes, that from the SBL.
    Strange, Yabause supports such modes. I use 352x... for emulators to get free additionnal speed.
     
    Last edited: Jan 27, 2011
  9. DamageX

    DamageX Member

    Joined:
    Dec 24, 2010
    Messages:
    11
    Likes Received:
    0
    The address at $6000320 needs to be loaded, and then JSR needs to be used to call the routine at that address (because it returns with RTS). Don`t ask me why they put jump tables in the vector area and decided to use JSR/RTS instead of TRAPA/RTE.
     
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page