Jump to content

swapd0

Members
  • Content Count

    702
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by swapd0


  1. 3 hours ago, ggn said:

    Right, I might have fixed it.

     

    If you can compile your own rmac (I assume you can judging from the fact that you have patched it in the past), open object.c and go to lines 243 and 244 and comment them out. To be 100% clear, these should read:

     

        else if (globflag)
            st_shndx = 0;        // Global, not absolute

     

    Then recompile and test. I checked and this code hasn't been touched since it was initially committed so when we added a fix for another issue (see above), the rmac listing reported your global/absolute symbol as:

     

               gpu_foo 0000000000F0300C  ag
    


    (a=absolute, g=global)

    However the exported symbol needed the magic value fff1 (at least according to https://docs.oracle.com/cd/E23824_01/html/819-0690/chapter6-94076.html#chapter6-tbl-16). Anyway, do try this out and tell us if it works so we can apply it to the main tree :).

    Done and it compiles the game, but I haven't tested it.


  2. I think that it mess around with .globl or :: directives to define a global symbol into GPU sections.

     

        .68000
        nop
        lea m68k_foo,a0
        nop
    
        .long
    m68k_foo:
        dc.l 0
    m68k_bar:
        dc.l 0
    
        .GPU
        .org $f03000
    
        nop
        movei #gpu_foo,r0
        nop
    
        .long
    gpu_foo:
        dc.l 0
    
    
    
    Output:
    swapd0$ rmac -fe test.s -o out.elf
    swapd0$ nm out.elf 
    00f0300c a gpu_foo
    00000010 t m68k_bar
    0000000c t m68k_foo

     

    Now m68k_foo and gpu_foo are defined as global(::)

        .68000
        nop
        lea m68k_foo,a0
        nop
    
        .long
    m68k_foo::
        dc.l 0
    m68k_bar:
        dc.l 0
    
        .GPU
        .org $f03000
    
        nop
        movei #gpu_foo,r0
        nop
    
        .long
    gpu_foo::
        dc.l 0
    
    
    
    Output
    swapd0$ rmac -fe test.s -o out.elf
    swapd0$ nm out.elf 
             U gpu_foo
    00000010 t m68k_bar
    0000000c T m68k_foo
    swapd0$ 

     

    Last code using old version of rmac:

    swapd0$ rmac-old -fe test.s -o out.elf
    swapd0$ nm out.elf 
    00f0300c A gpu_foo
    00000010 t m68k_bar
    0000000c T m68k_foo

     


  3. I've compiled the just game (not the library) with the old version of rmac, and this is the output of nm with the gpu.o:

     

    swapd0$ nm obj/gpu.o 
    00f02200 a A1_BASE
    00f02208 a A1_CLIP
    00f02220 a A1_FINC
    ...
    00f00000 a _BASE
    00f0323c A _GPU_MAX_VIDEO_X
    00f03240 A _GPU_MAX_VIDEO_Y
    00f03234 a _GPU_SPRITE_OFFSETS
    00f03234 A _GPU_SPRITE_OFFSET_X
    00f03238 A _GPU_SPRITE_OFFSET_Y
    00f03048 A _gpu_build_sprite_list
    00000000 T _gpu_code_start
    00f03008 A _gpu_events
    00f03044 A _gpu_events_list
    00f0322c A _gpu_sprite_dst
    00f03096 a align_last_sprite
    00f030bc a build_sprite
    00f030ee a continue_build_sprite
    00000011 A event_fn
    00000012 A events
    00000013 A list_ptr
    00000010 A return

     

    The same thing with the new version of rmac, there are some labels without an address.

    swapd0$ nm obj/gpu.o 
    00f02200 a A1_BASE
    00f02208 a A1_CLIP
    00f02220 a A1_FINC
    00f02204 a A1_FLAGS
    ...
    00f00000 a _BASE
             U _GPU_MAX_VIDEO_X
             U _GPU_MAX_VIDEO_Y
    00f03234 a _GPU_SPRITE_OFFSETS
             U _GPU_SPRITE_OFFSET_X
             U _GPU_SPRITE_OFFSET_Y
             U _gpu_build_sprite_list
    00000000 T _gpu_code_start
             U _gpu_events
             U _gpu_events_list
             U _gpu_sprite_dst
    00f03096 a align_last_sprite
    00f030bc a build_sprite
    00f030ee a continue_build_sprite
             U event_fn
             U events
             U list_ptr
             U return
    swapd0$ 

     


  4. It's not easy to write a small example, here it's what I have.

     

    - C/Asm library where I got some references to a GPU symbols that it's not compiled with the library, all GPU code files are copied into the include directory.

     

    - The game includes the library code

     

    - I have a gpu.s file like this:

     

        .include "jaguar/jaguar.inc"
    
    _gpu_code_start::
        .gpu
        .org G_RAM
        movei #G_ENDRAM,r31
        moveta r31,r31
    
        .include "katu/gpu_event.s"
        .include "katu/gpu_sprite.s"

    This way I can include more files with gpu code specific to that game. These two files must be included, and gpu_event.s must be first.

     

    The game complies with no problem but I have linker errors for all symbols defined in gpu_event.s and gpu_sprite.s that are referenced from the library.

     

    edit: I've tried with .globl directive or with -u option but it have the same error, undefined reference.

     


  5. 27 minutes ago, ggn said:

    So, a small test case which we could try without doing (perhaps wrong) stuff at random and declaring it works is....?

    working on it.

     

    edited:

    by the way I'm using gcc linker, not rln but it worked with the older version of rmac.


  6. 24 minutes ago, ggn said:

    Also, I do appreciate the obscene language, makes it feel worth the trouble :)

     

     

    Sorry

     

    24 minutes ago, ggn said:

     

    Repro case please, and we'll look into it. What is the problematic symbol's name?

     

     

    The symbol name are _gpu_events_list, _GPU_SPRITE_OFFSET_X, _GPU_SPRITE_OFFSET_Y, and a few more, by the way the symbols are defined into a GPU chunk but referenced from 68000 code.

     

    I've also seen that I can't create a label name like "x" or "y" (it was a register equate), anyway I've changed them to cx or cy. No problem.

     


  7. It looks that there are more changes, for example I've in a source file a label defined with two colons at the end, so it's supposed that the label it's global, this label it's referenced from a second file and I've an .extern directive at the beginning but I get a linker error of an undefined reference even if I put a .globl label in the first file. :(


  8. 21 minutes ago, 42bs said:

    Use the source, Luke: rmac supports only _one_ include path.
     

     411  case 'I':
     412                         {
     413                                 searchpath = argv[argno] + 2;
     414 
     415                                 // Check to see if include paths actually exist
     416                                 if (strlen(searchpath) > 0)
     417                                 {
     418                                         DIR * test = opendir(searchpath);
     419 
     420                                         if (test == NULL)
     421                                         {
     422                                                 printf("Invalid include path: %s\n", searchpath);
     423                                                 errcnt++;
     424                                                 return errcnt;
     425                                         }
     426 
     427                                         closedir(test);
     428                                 }
     429 
     430                                 break;
     431                         }

     

    Yes, I've just seen it... f*ck because they have changed the way it works, but there's a function called nthpath that looks for ';' to get multiple paths from a single argument.


  9. 6 minutes ago, 42bs said:

     

    You might either repeat "-i" or use ":" (guess)

     

    Nope, I'm looking at rmac code and you can use -I option only one time, I've also tried with ':' but the code looks for a ";"

     

     

    6 minutes ago, 42bs said:

     

    Or use " around your path.

    Ok, but now I've "invalid include path" error, and I've tested that both path exists... weird, I'll run rmac with the debugger.

     


  10. After some days off (maybe two weeks?), I've updated rmac to 2.0.12 and now I get an error when I try to compile my projects, I've this definition in the makefile:

     

    RMAC = rmac -fe -i/opt/local/bin/gcc68k/include;/Users/Shared/apps/Jaguar/projects/lib

    When I call make I get

    rmac -fe -i/opt/local/bin/gcc68k/include;/Users/Shared/apps/Jaguar/projects/lib -o obj/gpu.o gpu.s
    /bin/sh: /Users/Shared/apps/Jaguar/projects/lib: is a directory
    make: *** [obj/gpu.o] Error 126

    Of course that it's a directory...

     


  11. On 7/21/2020 at 7:19 AM, cubanismo said:

    Yeah, if you have some resilient loader code to share, I'll take a look at it.  I was mildly interested in coding up something like the packet loader referenced here:

     

    https://web.archive.org/web/20090316204047/http://www.freewebs.com/swapd0/tools.html#PacketLoader

     

    (What became of your website @swapd0?)

     

    As an aside, I'm also personally curious what happened to the JagCF project and the Catnip.  I keep coming across mentions of them (Stumbled upon

    this the other day), and other mentions that the projects didn't come to fruition, but no real explanation as to why.

    Yeah, that was long time ago...

     

    Try to get a skunk board, it saves a lot of headaches and the upload speed it's a lot faster.


  12. On 7/18/2020 at 5:00 PM, cubanismo said:

    I know everyone has Skunkboards and gamedrives now, but I like that I can develop on any Jaguar with ~$15 of off-the-shelf parts and a little soldering.

    But with BJL you are restricted to 2MB of RAM, you can't use the ROM space as "mass-storage".


  13. 8 hours ago, ggn said:

    Okay, makes sense! Please feel free to submit an issue and fixes in our [url=http://rmac.is-slick.com/contact/contact/]bug tracker[/url] so that everyone would benefit from your fixes :).

    I'm a bit busy now and not I'm sure how to upload a patch and if I can do it, anyway I've changed the following, tested and work with huge files.

     

    File token.c line 25 -> uint16_t curlineno; -> uint32_t curlineno;

    File token.h line 157 -> uint16_t curlineno; -> uint32_t curlineno;

     


  14. 2 hours ago, ggn said:

    This is weird because there has never been v1.13.6: version went from 1.13.5 to 2.0.0 ;). But I reverted to roughly that point in the repository and built rmac - sure enough it is perceived as legit code. You are encouraged to update to the latest version here as we fixed this and added a bunch more fun stuff like the ability to assemble a binary without header at a fixed address (-fr)!

    Maybe I changed the version from 1.13.5 to 1.13.6 because a few months ago I had to compile it and change the line number from short to int because I was checking a disassembled file and I got errors with weird line number.


  15. 23 hours ago, LinkoVitch said:

    If you want to check functionality of 68K and be able to step through it to make sure it's doing what you expect I highly recommend Easy68K.. it's a full featured 68000 simulator, and you can step through instructions, monitor memory etc.  Really handy.

    I assume you are building up a SE command, would it not be faster to combine the values with or and only write to memory once (well 2x 16bit words) rather than a bunch of individual 8 bit writes.

    Nope, I'm not building a SE command, that comes a bit later in the code, but it's executed each time that I play a new sounds.

     

    Maybe I'm using an older version of rmac, mine it's 1.13.6.


  16. I've the following code in my sound engine, it's using u253se. The d0 has a sound channel (4 to 7) and d1 holds a sample number. It always hangs.

     

    ; register sound
    	move.b d1,channel_sound(pc,d0.w)
    	move.b d0,sound_channel(pc,d1.w)

    Even this version hangs, WTF!?!?!

    ; register sound
    	moveq #0,d0
    	moveq #0,d1
    	move.b d1,channel_sound(pc,d0.w)
    	move.b d0,sound_channel(pc,d1.w)

    As you can see I'm writing bytes so there are no problems about alignment, anyway I've a .long directive before channel_sound definition.

     

    But, I've done a quick test with this code and it works...

     

    ; register sound
    	moveq #0,d0
    	moveq #0,d1
    	move.w d1,channel_sound(pc,d0.w)
    ;	move.b d0,sound_channel(pc,d1.w)

    There are any problem with byte memory access from the 68000? I don't understand why it hangs, if I comment the code it works.

     


  17. 68000 it's too slow for a 32/64 bit machine. Maybe a Motorola 88000 could be nice instead of the other RISC.

     

    A better solution, remove the 68000, DSP & GPU and put three existing RISC (all the same of course), one for the main logic, IO, AI, etc, other for graphics and the last one for the sound system. The time saved could be used to fix some blitter bugs and improve the performance.


  18. There's  a typo in the docs. The value should be 10010010 = $92, isn't it?

     

    Voice Status Register (U235SE_voice_status)
    
    Represents the current sample processing status of each voice.  If a voice is currently processing a sample (even if that sample is silence), then its corresponding bit will be set.  If the voice is idle and has no sample to play then the bit will be clear.
    
    For example, if there were samples playing on voices 1,4 and 7 only, then the voice status register would be $4a (binary 01001010 – remember voices start at 0)

     

    • Like 1
×
×
  • Create New...