Page 13 of 43 FirstFirst ... 39101112131415161723 ... LastLast
Results 121 to 130 of 427

Thread: M68K for DC

                  
   
  1. #121
    DCEmu Rookie
    Join Date
    Apr 2004
    Location
    Warren,Mi
    Posts
    122
    Rep Power
    77

    Default Re: M68K for DC

    [quote author=Ian_micheal link=board=dcemu;num=1083323639;start=105#119 date=05/29/04 at 14:25:51]genesis.o: In function `gen_init':
    genesis.o(.text+0x5c): undefined reference to `m68k_set_cpu_type'
    genesis.o(.text+0x60): undefined reference to `m68k_get_reg'
    genesis.o(.text+0x64): undefined reference to `m68k_pulse_reset'
    genesis.o: In function `gen_reset':
    genesis.o(.text+0xf8): undefined reference to `m68k_get_reg'
    genesis.o(.text+0x114): undefined reference to `m68k_pulse_reset'
    genesis.o: In function `gen_shutdown':
    genesis.o(.text+0x21c): undefined reference to `m68k_get_reg'
    vdp.o: In function `vdp_reg_w':
    vdp.o(.text+0x7ac): undefined reference to `m68k_set_irq'
    vdp.o: In function `vdp_hvc_r':
    vdp.o(.text+0x9ac): undefined reference to `m68k_cycles_run'
    system.o: In function `system_frame':
    system.o(.text+0x3c4): undefined reference to `m68k_execute'
    system.o(.text+0x3ec): undefined reference to `m68k_set_irq'
    mem68k.o: In function `m68k_lockup_w_8':
    mem68k.o(.text+0x88): undefined reference to `M68K_GetPC'
    mem68k.o(.text+0x98): undefined reference to `M68K_EndExec'
    mem68k.o: In function `m68k_lockup_w_16':
    mem68k.o(.text+0xc8): undefined reference to `M68K_GetPC'
    mem68k.o(.text+0xd8): undefined reference to `M68K_EndExec'
    mem68k.o: In function `m68k_lockup_r_8':
    mem68k.o(.text+0x104): undefined reference to `M68K_GetPC'
    mem68k.o(.text+0x110): undefined reference to `M68K_EndExec'
    mem68k.o: In function `m68k_lockup_r_16':
    mem68k.o(.text+0x140): undefined reference to `M68K_GetPC'
    mem68k.o(.text+0x14c): undefined reference to `M68K_EndExec'
    cpu/cpu68k.o: In function `M68K_Disassemble':
    cpu/cpu68k.o(.text+0x48): undefined reference to `m68k_disassemble'
    collect2: ld returned 1 exit status

    Got this now must be missing a file ive not included to compile or makefile is not correct.[/quote]
    ??? ??? ??? when it comes to this stuff, I am duh!, coders are smarttastic.

  2. #122
    DCEmu Coder
    Join Date
    Apr 2004
    Location
    FRANCE
    Posts
    80
    Rep Power
    0

    Default Re: M68K for DC

    [quote author=Ian_micheal link=board=dcemu;num=1083323639;start=105#119 date=05/29/04 at 14:25:51]genesis.o: In function `gen_init':
    genesis.o(.text+0x5c): undefined reference to `m68k_set_cpu_type'
    genesis.o(.text+0x60): undefined reference to `m68k_get_reg'
    genesis.o(.text+0x64): undefined reference to `m68k_pulse_reset'
    genesis.o: In function `gen_reset':
    genesis.o(.text+0xf8): undefined reference to `m68k_get_reg'
    genesis.o(.text+0x114): undefined reference to `m68k_pulse_reset'
    genesis.o: In function `gen_shutdown':
    genesis.o(.text+0x21c): undefined reference to `m68k_get_reg'
    vdp.o: In function `vdp_reg_w':
    vdp.o(.text+0x7ac): undefined reference to `m68k_set_irq'
    vdp.o: In function `vdp_hvc_r':
    vdp.o(.text+0x9ac): undefined reference to `m68k_cycles_run'
    system.o: In function `system_frame':
    system.o(.text+0x3c4): undefined reference to `m68k_execute'
    system.o(.text+0x3ec): undefined reference to `m68k_set_irq'
    mem68k.o: In function `m68k_lockup_w_8':
    mem68k.o(.text+0x88): undefined reference to `M68K_GetPC'
    mem68k.o(.text+0x98): undefined reference to `M68K_EndExec'
    mem68k.o: In function `m68k_lockup_w_16':
    mem68k.o(.text+0xc8): undefined reference to `M68K_GetPC'
    mem68k.o(.text+0xd8): undefined reference to `M68K_EndExec'
    mem68k.o: In function `m68k_lockup_r_8':
    mem68k.o(.text+0x104): undefined reference to `M68K_GetPC'
    mem68k.o(.text+0x110): undefined reference to `M68K_EndExec'
    mem68k.o: In function `m68k_lockup_r_16':
    mem68k.o(.text+0x140): undefined reference to `M68K_GetPC'
    mem68k.o(.text+0x14c): undefined reference to `M68K_EndExec'
    cpu/cpu68k.o: In function `M68K_Disassemble':
    cpu/cpu68k.o(.text+0x48): undefined reference to `m68k_disassemble'
    collect2: ld returned 1 exit status

    Got this now must be missing a file ive not included to compile or makefile is not correct.[/quote]

    No this is normal, except maybe for genesis.o external not found...
    First you have to change something in shared.h file :
    replace
    #include "m68k.h"
    by
    #include "cpu68k.h"

    Since now you have the CPU interface, you have to use CPU interface functions (M68K_xxx) instead of the musashi specific ones (m68k_xxx)...

    Do as in mem68k.c : m68k_releasetimeslice has been replaced by the M68K_EndExec function...you should do the same for all others m68k_xxx functions in Genesis Plus.

    m68k_cycles_run --> M68K_GetOdo
    m68k_execute Â*--> M68K_Exec
    m68k_set_irq -> M68K_SetIRQ
    ....

    Get a look in the cpu68k.c file to find the functions which replace old musashi function.

    I hope you understand what i mean... cpu68k.c file has been done to easily switch between C68K and musashi, but for that, you'll need first to replace all specific musashi function by cpu68k ones

    Edit : about m68k_disassemble, just comment it since it is not used in DC port of Genesis Plus, this method is from musashi disassembler and it is not included by default in Genesis Plus.

    Sorry for all the matters, i should have clarify all that before uploading files.

  3. #123
    Dream Coder
    Join Date
    Apr 2004
    Location
    Miami, FL
    Age
    38
    Posts
    4,675
    Rep Power
    50

    Default Re: M68K for DC

    Do you think it would be at all possible to write a small readme about the api differences between musashi and C68K?
    If anyone is looking to buy, sell, trade games and support a developer directly at the same time, consider joining Goozex. Enjoy!

  4. #124
    DCEmu Coder
    Join Date
    Apr 2004
    Location
    FRANCE
    Posts
    80
    Rep Power
    0

    Default Re: M68K for DC

    I just uploaded complete DevCPP project of DC genesis Plus and PC Genesis Plus including C68K.

    You can download them at :
    http://gens.consolemul.com/download/GenPlus_DC.zip
    http://gens.consolemul.com/download/GenPlus_PC.zip

    they both include C68K, but if you want to downoad C68K alone go here :
    http://gens.consolemul.com/download/c68k.zip


    Do you think it would be at all possible to write a small readme about the api differences between musashi and C68K?
    I'll do it when i'll have modified the way i'm handling IRQ... i think i'll also modify memory handler to make them as musashi.
    Then, except function name and init, musashi and C68K will be really similar in use.

  5. #125
    DCEmu Regular
    Join Date
    Apr 2004
    Location
    Posts
    351
    Rep Power
    79

    Default Re: M68K for DC

    genesis.o: In function `gen_init':
    genesis.o(.text+0x50): undefined reference to `M68K_Init'
    genesis.o(.text+0x54): undefined reference to `M68K_GetPC'
    genesis.o(.text+0x58): undefined reference to `M68K_GetSP'
    genesis.o: In function `gen_reset':
    genesis.o(.text+0x100): undefined reference to `M68K_Reset'
    genesis.o(.text+0x104): undefined reference to `M68K_GetPC'
    genesis.o(.text+0x108): undefined reference to `M68K_GetSP'
    genesis.o: In function `gen_shutdown':
    genesis.o(.text+0x208): undefined reference to `M68K_GetPC'
    genesis.o(.text+0x20c): undefined reference to `M68K_GetSP'
    genesis.o(.text+0x210): undefined reference to `M68K_GetSR'
    genesis.o(.text+0x218): undefined reference to `M68K_GetDReg'
    genesis.o(.text+0x21c): undefined reference to `M68K_GetAReg'
    vdp.o: In function `vdp_reg_w':
    vdp.o(.text+0x7ac): undefined reference to `M68K_SetIRQ'
    vdp.o: In function `vdp_hvc_r':
    vdp.o(.text+0x9ac): undefined reference to `M68K_GetOdo'
    system.o: In function `system_frame':
    system.o(.text+0x3cc): undefined reference to `M68K_Exec'
    system.o(.text+0x3f4): undefined reference to `M68K_SetIRQ'
    mem68k.o: In function `m68k_lockup_w_8':
    mem68k.o(.text+0x88): undefined reference to `M68K_GetPC'
    mem68k.o(.text+0x98): undefined reference to `M68K_EndExec'
    mem68k.o: In function `m68k_lockup_w_16':
    mem68k.o(.text+0xc8): undefined reference to `M68K_GetPC'
    mem68k.o(.text+0xd8): undefined reference to `M68K_EndExec'
    mem68k.o: In function `m68k_lockup_r_8':
    mem68k.o(.text+0x104): undefined reference to `M68K_GetPC'
    mem68k.o(.text+0x114): undefined reference to `M68K_EndExec'
    mem68k.o: In function `m68k_lockup_r_16':
    mem68k.o(.text+0x140): undefined reference to `M68K_GetPC'
    mem68k.o(.text+0x150): undefined reference to `M68K_EndExec'
    cpu/cpu68k.o: In function `M68K_Disassemble':
    cpu/cpu68k.o(.text+0x7c): undefined reference to `m68k_disassemble'
    collect2: ld returned 1 exit status
    make: *** [dreamcast/genplus.elf] Error 1
    BASH-2.05b$

    I got this trying to compile the DC version from your link.

  6. #126
    DCEmu Coder
    Join Date
    Apr 2004
    Location
    FRANCE
    Posts
    80
    Rep Power
    0

    Default Re: M68K for DC

    Strange, it seems like your shared.h file isn't updated.
    I just downloaded archive, extracted it in a new directory, and except the include directories which aren't relative, all compiled normally

    I reuploaded the project with fixed includes directories ...

  7. #127
    DCEmu Coder JMD's Avatar
    Join Date
    Apr 2004
    Location
    France
    Age
    50
    Posts
    83
    Rep Power
    0

    Default Re: M68K for DC

    Just tried to compile and compile fine for me, without any warning/error (I'm not used to have a so nice compile log lol.




  8. #128

    Default Re: M68K for DC

    well, I'm currently working on a sh4 asm motorola 6502 cpu emulator, although it's going slowly since I just recently built me a serial cable and got the toolchain up and running (gcc3.04). anyway, my main gripe just now is getting the hang of the sh4 cpu and the general dreamcast hardware. I've never programmed assembly on a risc cpu before and it differs somewhat from my previous experiences (6502, z80, 65816, 68000, x86) and takes some getting used to. my main gripe with the dc sofar is the lack of an l2 cache, as a 16kb data l1 cache means you'll likely trash the lines constantly unless you use carefully prepared data (which is a luxury we don't have in emulation). however, that the dc seems uncapable to emulate a snes in fullspeed wasn't a surprise, since the snes is a VERY hard machine to emulate, more difficult than say Sega genesis/megadrive. one of the things I remember from programming the snes that I imagine is hard to emulate fast is the cpu's rep/sep instructions that allows it to switch from 8/16bit accumulator register sizes (quick note, someone in this thread stated 6502 as the snes cpu, it is in fact 65816), this means that the emulator must constantly check wheter it is in 8 or 16bit accumulator state before decoding each instruction, not to mention it's graphics hardware (unless I remember this incorrectly, it was a looong time since I programmed the snes)

    anyway, I read that the dreamsnes team will release the dc specific parts of the snes9x source and I am really looking forward to examining their sh4 65816 code.

    enough of that though, the reason I opted for a 6502 emulator was because it's a cpu that I know very well and since I am to learn sh4 assembly while programming it, it definately helps if I don't have to spend time remembering how the cpu i'm emulating works. that said, when the 6502 emulator is done, I'm planning on making a z80 and a 68000 (yes, here is the reason I posted), however, wheter or not that will happen depends on just how much extra speed can be gained from programming the sh4 in pure asm as opposed to letting the compiler do the job. risc cpu's are generally the compilers dream, since it has plenty of registers, and the instruction set is very basic. so I'm wondering if there have been any benchmarks/efficiency tests done previously comparing sh4 optimized asm towards compiler generated code?
    (this would save me alot of gas output examination )

  9. #129
    Dream Coder
    Join Date
    Apr 2004
    Location
    Miami, FL
    Age
    38
    Posts
    4,675
    Rep Power
    50

    Default Re: M68K for DC

    there has been but only hand done bigO examination caparing the instructions one gives compared to the other and figuring theoretical results. in practical uses though the sh4 snes core was around 10-15% faster(?) than its C equivilant. OT: Welcome to the forums and the scene ;D
    If anyone is looking to buy, sell, trade games and support a developer directly at the same time, consider joining Goozex. Enjoy!

  10. #130

    Default Re: M68K for DC

    Yeah, 10-15% faster with 65c816 CPU ported to SH4, there's a open source core out for the 6502 in SH2 too:

    quoting myself :

    As Ian Micheal posted here that Gleam used a 6502 SH2 ASM cpu core for NES emulation. The source is available. Maybe that'll help to get a NesterDC speed up too ?

    I am not sure how fast this core is. Maybe the optimized NesterDC C core is faster than this old SH2 ASM core?

    Don't know if that emu (Gleam) runs at a reasonable speed but one should not only judge by its end result anyway, as the core could be fast even if the emulation speed wasn't fast at all.

    The NES uses an older version of this 65c816 CPU too, don't know if it's interesting at all cause they might differ on some key issues.

    I wonder because I thought Nintendo had the idea of an downward NES compatible SuperNES so they modified the NES core for the SNES a bit but it is almost the same CPU as far as I know.
    So it could be possible/usefull to implement the SH4 65c816 CPU core to NesterDC...!?

    So one could take either the SH2 Gleam CPU or the DreamSNES SH4 CPU for a NesterDC update as I could imagine. Any comments?
    PS: 16Bits, I'd like to welcome you to the DC scene and the DCEmu forums too

Thread Information

Users Browsing this Thread

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

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
  •