Bought a new SDHC card for the M65

14 views
Skip to first unread message

Daniel England

unread,
Jan 27, 2018, 12:50:37 AM1/27/18
to MEGA65 Development
Heyas!

I thought I would post these questions here even though they are directed at Paul because I think that other people are going to want to know the answers.

So...

Paul, I bought a new 16GB SDHC micro SD Card today and I am trying to use it with the M65.

I thought I'd try to use it as it came.  The bitstream loads fine but the M65 says that it can't use it and drops me into the utilities menu.

Should I try to use the FDisk utility to fix setup the card or should I do it manually?  Just so we know, what are the settings the FDisk utility would attempt to apply?

I'm concerned that I would lose the bitstream if I used the FDisk utility and would probably prefer to set up the card myself and also so I know what the M65 requires in the future.

Its so much faster than my old card (and about 64 times the size - I was using a really old one) so I really want to use it.


Daniel.

Paul Gardner-Stephen

unread,
Jan 27, 2018, 12:58:03 AM1/27/18
to Daniel England, MEGA65 Development
Hello,

FDISK will make a 2GB system partition, and the rest will be FAT32.  If you are loading the bitstream from SD card, you will need to copy it on again after.

Paul.

--
You received this message because you are subscribed to the Google Groups "MEGA65 Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to c65gs-development+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daniel England

unread,
Jan 27, 2018, 1:18:52 AM1/27/18
to MEGA65 Development
Paul told me (he forgot to reply to the group) that the FDisk utility would make a 2GB M65 system partition and the remaining area would be created as a FAT32 partition.

Because I want the system partition and its the only way to get it, I need to use the FDisk utility.

However, the FDisk utility seems to be broken.  In the a bitstream built only yesterday, I get the following screen when I select it:


As you can see, I cannot FDisk and Format the card.

Is this something you'd like to me to look into, Paul?


Daniel.

Daniel England

unread,
Jan 27, 2018, 1:35:33 AM1/27/18
to MEGA65 Development
I didn't use monitor_load to get into FDisk, I selected it from the boot menu.

Could it be that it needs the $D018 setting that you put in the config utility?


Daniel.


Paul said:

Hello,

I did see that at some point, but don't remember the specific reason. It could be you have used -c or -C wrong way around on monitor_load.
See what the serial monitor has to say about where it thinks it is with the CPU. Also, just try resetting and trying again.

Paul Gardner-Stephen

unread,
Jan 27, 2018, 1:38:13 AM1/27/18
to Daniel England, MEGA65 Development
Not sure, check what D018 has, and try setting it to different sensible values, and see if that gets you a sensible looking display. I recall $14 and $21 being two candidate values.

Paul.

--

Daniel England

unread,
Jan 27, 2018, 2:02:17 AM1/27/18
to MEGA65 Development
Argh...  I tried to use m65dbg but I forget what the actual 24bit address is for the IO in 64 mode.

I checked the source code for fdisk and it needs the screen set at $8000 and the charset at $8800 so $D018 should be set to $12, after checking the C64PRG.

It seems that the following code to set $D018 in screen.c is incorrect, however:


  // Put screen memory somewhere (2KB required)
  // We are using $8000-$87FF for screen
  // Using custom charset @ $A000
  *(unsigned char *)0xD018U=
    (((CHARSET_ADDRESS-0x8000U)>>11)<<1)
    +(((SCREEN_ADDRESS-0x8000U)>>10)<<4);


SCREEN_ADDRESS is set to $8000 so it will attempt to load $D018 with $02 not $12.  And the comment is incorrect because CHARSET_ADDRESS is set to $8800.


Daniel.
To unsubscribe from this group and stop receiving emails from it, send an email to c65gs-developm...@googlegroups.com.

Paul Gardner-Stephen

unread,
Jan 27, 2018, 2:05:19 AM1/27/18
to Daniel England, MEGA65 Development
Hello,

$02 is the correct value (and I confirm that it is set to that on FDISK here, which is displaying fine for me).  The comment is, yes, incorrect.

Paul.

To unsubscribe from this group and stop receiving emails from it, send an email to c65gs-development+unsubscribe@googlegroups.com.

Daniel England

unread,
Jan 27, 2018, 2:20:33 AM1/27/18
to MEGA65 Development
Oh yes..  I was looking at the wrong register value.  I've had a long day.

Perhaps it is that you aren't setting $DD02 to ensure that the bits are output?

I don't know..  I'd need to see what I can do in m65dbg but I don't know what the physical address is for the registers.  I know its been said before but I forget.


Daniel.
Reply all
Reply to author
Forward
0 new messages