Author Topic: CC65 and the PCE  (Read 6568 times)

elmer

  • Hero Member
  • *****
  • Posts: 2158
Re: CC65 and the PCE
« Reply #30 on: March 04, 2015, 11:12:05 AM »
I'd say stick with CA65.
CA65 is going to need a little work, too.

(EDIT)
Whoops ... my bad ... CA65 is right, and I'm wrong!  :oops:

Quote
Whatever assembler you decided to use, if you get symbolic debugging working in mendafen - anyone could write a conversion tool to take whatever other symbol file format and convert it to whatever mednafen needs (assuming this is what you're modifying).
Mednafen is my target ... I like it, and I'm hoping that it should be relatively easy to add a new "source level" page to the multiple pages of debugging info that it already supports.
« Last Edit: March 04, 2015, 02:01:35 PM by elmer »

touko

  • Hero Member
  • *****
  • Posts: 953
Re: CC65 and the PCE
« Reply #31 on: March 04, 2015, 08:49:53 PM »
Mednafen is (i think) the most accurate pce emulator (but it seems not in his latest version, sgx emul sux a max).
His debugger is sufficient, but debug infos are definitely too small for my eyes and not comfortable at all .

elmer

  • Hero Member
  • *****
  • Posts: 2158
Re: CC65 and the PCE
« Reply #32 on: March 05, 2015, 04:17:24 AM »
Mednafen is (i think) the most accurate pce emulator (but it seems not in his latest version, sgx emul sux a max).
His debugger is sufficient, but debug infos are definitely too small for my eyes and not comfortable at all .
Yep, the default font strains my eyesight, too. I just switched to a bigger font.

Edit mednafen-09x.cfg ...

Code: [Select]
;Disassembly font size.
pce.debugger.disfontsize medium

I got mednafen 0.9.38.2 compiling on windows with msys2 last night.

OK, it looks like there's a new version, 0.9.38.3 this morning!

If you're saying that 0.9.38 is a bit buggy, then I can try going back to 0.9.37.

touko

  • Hero Member
  • *****
  • Posts: 953
Re: CC65 and the PCE
« Reply #33 on: March 05, 2015, 05:32:49 AM »
Quote
just switched to a bigger font
I know, and it works fine for tracing code, but all the regs (CPU,VDC,VCE,audio) stay with a small font, in fact i don't know how to enlarge,and i don't know if it even possible .
 
Quote
If you're saying that 0.9.38 is a bit buggy, then I can try going back to 0.9.37.
I tested the latest, and my sgx stuffs wich works fine with the old 0.8.D (and of course real thing),are buggy with 0.9.3x ones .
« Last Edit: March 05, 2015, 05:35:06 AM by touko »

elmer

  • Hero Member
  • *****
  • Posts: 2158
Re: CC65 and the PCE
« Reply #34 on: March 05, 2015, 05:43:38 AM »
I know, and it works fine for tracing code, but all the regs (CPU,VDC,VCE,audio) stay with a small font, in fact i don't know how to enlarge,and i don't know if it even possible .
Ah, sorry, I misunderstood.

Yes, the registers are definitely a pain ... I just squint and try to bear it for short periods of time.

If I'm hacking around in there anyway, I might look to see if something can be done about that ... the debugger isn't full-window-size at the moment.
 
Quote
I tested the latest, and my sgx stuffs wich works fine with the old 0.8.D (and of course real thing),are buggy with 0.9.3x ones .
Wow ... I really don't want to go back to the 2010 source code!

Have you reported the problem to the Mednafen developers?

touko

  • Hero Member
  • *****
  • Posts: 953
Re: CC65 and the PCE
« Reply #35 on: March 05, 2015, 07:26:42 AM »
Quote
If I'm hacking around in there anyway, I might look to see if something can be done about that ... the debugger isn't full-window-size at the moment.
This would be great if you can correct this, my eyes would thank you ;-)

Quote
Wow ... I really don't want to go back to the 2010 source code!
All seems to be fine with PCE, but if you want use mednafen for pcfx stuffs,you have the risk of having the same problem than SGX.

Quote
Have you reported the problem to the Mednafen developers?
No, because i think than mednafen's author is more concerned by commercial games emulation, not homebrew ..
Maybe i should contact him, i don't know ..

elmer

  • Hero Member
  • *****
  • Posts: 2158
Re: CC65 and the PCE
« Reply #36 on: March 05, 2015, 10:21:42 AM »
This would be great if you can correct this, my eyes would thank you ;-)
Mine,  too!

Quote
No, because i think than mednafen's author is more concerned by commercial games emulation, not homebrew ..
Maybe i should contact him, i don't know ..
Yes, the old commercial games are definitely their priority.

But if you can send then a HuCard or ISO with an easily reproducable example of the problem ... then I'd be sad if they refused to respond.

Since you're not talking about a commercially released game, it's going to be critical for you to make it as easy as possible for them to reproduce (and so find).

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: CC65 and the PCE
« Reply #37 on: March 05, 2015, 11:41:49 AM »
Touko, is this an edge case scenario issue?

Ryphecha's always strived for accuracy for her emulation, as far back as I can remember. She even added different audio implementation for emulation depending on chip revisions, etc (she's done a lot with accurately emulating the audio chip). And a bunch of other stuff too. I would at least ask. Also, I have an SGX so I might be able to confirm some test stuffs. It might be better to talk with her on the mednafen IRC channel.

 I wanted to see if she could implement that hacked mode for 8 pixel tall sprite cells, but since I haven't made anything with it.. I haven't asked. One of these days, though.

touko

  • Hero Member
  • *****
  • Posts: 953
Re: CC65 and the PCE
« Reply #38 on: March 05, 2015, 10:00:18 PM »
Quote
Touko, is this an edge case scenario issue?
Yes all my SGX stuffs are broken, even a simple one like my flappy bird adaptation wich is not sgx intensive,and works fine on 0.8D and true hardware .
Seems that some VRAM writes are broken when you do it on active display .

I tested with my 0.9.28,and 0.9.38.3, and nothing works correctly for SGX,hucard and cdrom  :(..
« Last Edit: March 05, 2015, 10:11:28 PM by touko »

touko

  • Hero Member
  • *****
  • Posts: 953
Re: CC65 and the PCE
« Reply #39 on: March 08, 2015, 09:55:13 PM »
i posted my problem on mednafen forum .

and the answer is :
Quote
Found the bug in Mednafen; VRAM DMA is failing to start if there isn't a SAT DMA for that VBlank period. Kind of surprised it didn't break more software... It'll be fixed in the next release.
[Updated on: Fri, 06 March 2015 07:37]

elmer

  • Hero Member
  • *****
  • Posts: 2158
Re: CC65 and the PCE
« Reply #40 on: March 09, 2015, 05:17:41 AM »
Excellent!  :)  I'll grab the new version when it's posted.

Mednafen has turned out to be nice and easy to compile, so I'm digging into the guts of it now.

spenoza

  • Hero Member
  • *****
  • Posts: 2751
Re: CC65 and the PCE
« Reply #41 on: March 09, 2015, 02:38:39 PM »
Mednafen is what the folks at tasvideos.org used as the basis for PCE support in their Bizhawk emulator.
<a href="http://www.pcedaisakusen.net/2/34/103/show-collection.htm" class="bbc_link" target="_blank">My meager PC Engine Collection so far.</a><br><a href="https://www.pcenginefx.com/forums/" class="bbc_link" target="_blank">PC Engine Software Bible</a><br><a href="http://www.racketboy.com/forum/" c

elmer

  • Hero Member
  • *****
  • Posts: 2158
Re: CC65 and the PCE
« Reply #42 on: March 12, 2015, 04:06:53 PM »
Quote
If I'm hacking around in there anyway, I might look to see if something can be done about that ... the debugger isn't full-window-size at the moment.
This would be great if you can correct this, my eyes would thank you ;-)

I've been digging around in the Mednafen source and ...
[uldecimal][li]Increased the debug window from 640x480 to 800x600[/li][li]Added a new 6x9 font[/li][li]Added the ability to "tab" out register printouts to form columns[/li][li]Added some extra labels on the registers[/li][/ul]
Touko (and anyone else that might care) ... does that look any easier to read?

Any suggestions for further changes?

touko

  • Hero Member
  • *****
  • Posts: 953
Re: CC65 and the PCE
« Reply #43 on: March 12, 2015, 09:12:29 PM »
Greaaaat, i want to do it too ;-)

elmer

  • Hero Member
  • *****
  • Posts: 2158
Re: CC65 and the PCE
« Reply #44 on: March 13, 2015, 04:26:29 AM »
Greaaaat, i want to do it too ;-)
Excellent! ... Are you comfortable with building Mednafen from source?

I'm using msys2/mingw64 on Windows. I think that the official Mednafen builds are made with mingw64 on Linux. Either way ... it's a Linux-style build environment. You may already be using it.

At some point I'll wrap things so that it can all be built from Windows .cmd files ... but it will still require downloading nearly 1GB of msys2 ... and I'm not at that point anyway, yet.

If you're not comfortable with that, then I can upload a binary build somewhere. Just understand that this is still a work-in-progess!