Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: FAME/C generator source available?

                  
   
  1. #1
    DCEmu Newbie
    Join Date
    Jun 2009
    Posts
    9
    Rep Power
    0

    Default FAME/C generator source available?

    G'Day Chui,

    I was wondering if the FAME/C generator source code was available somewhere to experiment with? I'm playing around with UAE4ALL, and would like to muck with it anad try to improve performance running on my iPhone - anything I do I'll gladly share back.

    Cheers and thanks for the awesome work,

    Stu

  2. #2
    DCEmu Coder fox68k's Avatar
    Join Date
    Aug 2004
    Location
    Spain
    Posts
    100
    Rep Power
    75

    Default

    You can check out FAME here: http://svn.emuforge.com/fame.
    - fox68k -

  3. #3
    DCEmu Newbie
    Join Date
    Jun 2009
    Posts
    9
    Rep Power
    0

    Default

    Thanks mate - I notice that the actual code generator for FAME/C is not there, which is what I'm most interested in.

    I've taken C68k and have it generating an almost identical version - still a bit of work to do, but close. I plan on taking this as a starting point and generating a more optimized version for the ARM. Unfortunately, Cyclone it is not compatible with the GPL (and I couldn't get it working with uae4all anyway). FAME/C is working fine.

    Cheers,

    Stu

  4. #4
    DCEmu Coder fox68k's Avatar
    Join Date
    Aug 2004
    Location
    Spain
    Posts
    100
    Rep Power
    75

    Default

    Quote Originally Posted by scarnie View Post
    Thanks mate - I notice that the actual code generator for FAME/C is not there, which is what I'm most interested in.
    You are confused. FAME/C does not rely on a code generator. FAMEx86 and sh4 do, though.

    If you are trying to plug C68K in uae4all, you will face a long way. Some games require features not present in C68K.
    From my point of you are better off getting started with FAME/C and optimizing code for ARM. An alternative might be adding ARM code to either FAME/x86 or sh4 generators which is probably what you were thinking about at first.
    - fox68k -

  5. #5
    DCEmu Newbie
    Join Date
    Jun 2009
    Posts
    9
    Rep Power
    0

    Default

    Quote Originally Posted by fox68k View Post
    You are confused. FAME/C does not rely on a code generator. FAMEx86 and sh4 do, though.

    If you are trying to plug C68K in uae4all, you will face a long way. Some games require features not present in C68K.
    From my point of you are better off getting started with FAME/C and optimizing code for ARM. An alternative might be adding ARM code to either FAME/x86 or sh4 generators which is probably what you were thinking about at first.
    Hey mate,

    Definitely not confused - and I do agree with you. FAME/C does not appear to rely on a code generator any more, but it was derived from C68k (as per comments I've read previously). Already, with minor changes to C68k, a good percentage of the opcodes being generated match identical to famec_opcodes.h (even spacing ).

    I'm taking a very systematic and logical approach. I was never intending to just drop in C68k. My plan is to initially replace the famec_opcodes.h header file only - I've already reformatted C68k to output the opcodes in the same way FAME/C does today. Once that is working, I'll do 'black box' testing, whereby I'll generate a 68k test app, that unit-tests most many instructions of the CPU and records known outcomes, I'll then start experimenting with mine and ensure the same tests pass. As long as my tests cover a good percentage of the CPU functionality and my replacement CPU passes, it should be fine. My tests vary from simply executing 1 instruction and returning to running little programs. The already do things like verify cycles, flags, memory changes, etc.

    Cheers and thanks for the input,

    Stu

  6. #6
    DCEmu Coder fox68k's Avatar
    Join Date
    Aug 2004
    Location
    Spain
    Posts
    100
    Rep Power
    75

    Default

    FAME/C is heavily based on C68K. But that does not mean it has to follow the same approach. We got rid of the code generator long ago, cause we found it kinda pointless.
    - fox68k -

  7. #7
    DCEmu Newbie
    Join Date
    Jun 2009
    Posts
    9
    Rep Power
    0

    Default

    Could you be more specific as to what problems I will run into? The way I see it, if I can make C68k generate an identical file to famec_opcodes.h, I have succeeded in my initial goal.

    You're right, I could just modify the C code, but if I find a useful pattern that I could apply to all the bit-ops and numeric opcodes, why force myself to cut/paste (and be susceptible to error). Update the generator and regenerate the file is much better. Ultimately, the reason for writing a generator for the 68k was there is so much repetition, so I simply want to take advantage of that in my endeavours. Whether that generator is C or assembly is really irrelevant.

    Cheers,

    Stu

  8. #8
    DCEmu Coder fox68k's Avatar
    Join Date
    Aug 2004
    Location
    Spain
    Posts
    100
    Rep Power
    75

    Default

    Quote Originally Posted by scarnie View Post
    Could you be more specific as to what problems I will run into?
    As far as i remember, you need trace mode and bus and address error exceptions.

    Quote Originally Posted by scarnie View Post
    You're right, I could just modify the C code, but if I find a useful pattern that I could apply to all the bit-ops and numeric opcodes, why force myself to cut/paste (and be susceptible to error). Update the generator and regenerate the file is much better. Ultimately, the reason for writing a generator for the 68k was there is so much repetition, so I simply want to take advantage of that in my endeavours.
    I would rather make use of macros and inlined functions in C instead. But that is a personal preference. Obviously, FAME/C is not a good example. It should be tidied up, but we are pretty busy and always find anything more interesting to spend our time on.

    Quote Originally Posted by scarnie View Post
    Whether that generator is C or assembly is really irrelevant.
    In theory, it is. In practice, it is not. Preprocessing support is quite limited in many assemblers (being NASM one exception) where as C preprocessing is more flexible and powerful.

    Regards.
    - fox68k -

  9. #9
    DCEmu Newbie
    Join Date
    Jun 2009
    Posts
    9
    Rep Power
    0

    Default

    Okay, I'll take the approach of deriving an ARM version from the SH-4 generator - at least they are both RISC architectures.

    What settings are used for the Dreamcast / SH-4 version of uae4all?

    I could not get Cyclone to work, as it is not compatible with Apple's implementation of GAS.

    Cheers,

    Stu

  10. #10
    DCEmu Coder fox68k's Avatar
    Join Date
    Aug 2004
    Location
    Spain
    Posts
    100
    Rep Power
    75

    Default

    Quote Originally Posted by scarnie View Post
    What settings are used for the Dreamcast / SH-4 version of uae4all?
    Have a look at the Makefile. For uae4all:

    --format=$(format) --inline-loop --accurate-timing --check-branches --multi-bank --undocumented --direct-mapping=16 --trace-mode --clock-counting --running-state --global-context

    Quote Originally Posted by scarnie View Post
    I could not get Cyclone to work, as it is not compatible with Apple's implementation of GAS.
    Do you know what the differences are?

    Cheers.
    - fox68k -

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Pspuae 0.72 Fame/c Edition Released!!!!
    By FOL in forum Sony Consoles News Forum
    Replies: 7
    Last Post: July 31st, 2009, 22:36
  2. Uae4all Gizmondo 0.6.3, Now with FAME/C core and sound
    By wraggster in forum The Apple iPhone, Android & Mobile Phone News Forum
    Replies: 0
    Last Post: November 12th, 2006, 11:42
  3. FAME/C for UAE4ALL, MAME4ALL, NEO4ALL and DCaSTaway.
    By chui in forum DCEmu Homebrew, Emulation, Hacking and Development Forum
    Replies: 0
    Last Post: October 31st, 2006, 10:41

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •