Skip to content

Commit

Permalink
lgblgblgb#220: Not directly related to the card, but just some modifi…
Browse files Browse the repository at this point in the history
…cations to get the newer output of the 'r' command that was needed for the mega65ftp conversation to work.

It got described in further detail in this discord post:
- https://discord.com/channels/719326990221574164/719326990221574168/774013669800542279
  • Loading branch information
Gurce Isikyildiz authored and Gurce Isikyildiz committed Dec 23, 2020
1 parent ad9b2c0 commit b3cd72f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions targets/mega65/mega65.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ void m65mon_show_regs ( void )
Uint8 pf = cpu65_get_pf();
umon_printf(
"PC A X Y Z B SP MAPL MAPH LAST-OP P P-FLAGS RGP uS IO\r\n"
"%04X %02X %02X %02X %02X %02X %04X " // register banned message and things from PC to SP
",%08X %02X %02X %02X %02X %02X %04X " // register banned message and things from PC to SP
"%04X %04X %02X %02X %02X " // from MAPL to P
"%c%c%c%c%c%c%c%c ", // P-FLAGS
cpu65.pc, cpu65.a, cpu65.x, cpu65.y, cpu65.z, cpu65.bphi >> 8, cpu65.sphi | cpu65.s,
Expand Down Expand Up @@ -547,7 +547,7 @@ void m65mon_dumpmem28 ( int addr )
{
int n = 16;
addr &= 0xFFFFFFF;
umon_printf(":%07X:", addr);
umon_printf(":%08X:", addr);
while (n--)
umon_printf("%02X", memory_debug_read_phys_addr(addr++));
}
Expand Down

4 comments on commit b3cd72f

@lgblgblgb
Copy link

@lgblgblgb lgblgblgb commented on b3cd72f Dec 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you use %08X for PC? It's just 16 bit, %04X should be enough. Also, MEGA65 has 28 bit address space, so %07X is by intent, not a mistake. Or are these for the purpose that MEGA65 uses this format (so there is 1:1 compatibility then with formatting strings), even if it's useless since the most significant nibble is always zero?

@gurcei
Copy link
Owner

@gurcei gurcei commented on b3cd72f Dec 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, you guessed right in the latter part of your comment, that I was trying to match the new format of the 'r' command's output on the hardware, as mega65ftp depends on it (if it doesn't match, it'll screw up the parsing of it).

For a comparison of old vs new format of 'r' command output, see this post in discord:

https://discord.com/channels/719326990221574164/719326990221574168/774013669800542279

@lgblgblgb
Copy link

@lgblgblgb lgblgblgb commented on b3cd72f Dec 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Honestly I don't find it too precise to quote discord all the time, I mean for example I have always problem discord does not work, produces strange errors, and such, I would rather like to see all the information collected together without links (other than things like referencing other github issues commits, since that is considered as "the same source" very much). Hopefully you won't find this comment of mine as a kind of ... well anything bad ;) I just write this, since you all the time references "when we talk about on discord here here and here" etc ;) So anyway my first move would be copy&paste those here (OK, maybe re-pharsing is a value especially because chat can be a bit vague and off-topic quite often) at the first place so me, or anybody others can check the situation in the future too (even if the issue is closed for now, still can be accessed and can be important in some cases much like the history information about past commits of a git repo). Even I have the situation now that only two references of external sources like discord, I can click and see what it is, then forget what reference was that after a hour and what is the other, need to look up again. Not even counting the fact that maybe others not registered to discord can't even access those information easily, also, maybe discord has some time old conversations are not accessible any more. OK, sorry for the long blah-blah, I want make you to be sure, I have reasons and not just the personal enjoyment to argue over unneeded things here :) Sorry about this off-topic thing :(

@gurcei
Copy link
Owner

@gurcei gurcei commented on b3cd72f Dec 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, understand where you're coming from. As for my discord preference, some of it comes about due to brevity, and trying to make the most out of limited free time (oh, and also from trying to type in things on the phone), and also with an understanding that over time, as more free time is found, more details from those discord threads can be cherry-picked and placed in the card, and I feel that is already how this card is evolving.

I still think there's merit to keeping that link to past discord threads, as despite our best efforts to extract the cream from there into here, there's always a chance we'll overlook something.

Please sign in to comment.