Author Topic: First HuC attempt - simple BRAM file browser  (Read 259 times)

megatron-uk

  • Full Member
  • ***
  • Posts: 219
First HuC attempt - simple BRAM file browser
« on: January 02, 2014, 01:42:17 AM »
So, after a couple of days I've got my first working programme that actually does something, rather than just print 'hello world'.

It's a simple BRAM browser that lists the available files in memory and allows you to scroll through a list (list is currently truncated at 7 files, any more and you can scroll up and down to see the others). When highlighting a file it will attempt to load the contents of the backup file and display on-screen in hexadecimal. If the contents of the backup file is larger than the display area, it will truncate it and tell you.

It's written in plain HuC.

Where to go from here? Well, I think simple copy/delete functions like Chris Covell's BRAMTool would be useful - but ultimately I'd like to see how feasible it will be to get the Everdrive edio.c functions working. Though I suspect that may involve some assembly at some point - last time I did any (m68k) was at University some 14-15 years ago.

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: First HuC attempt - simple BRAM file browser
« Reply #1 on: January 02, 2014, 04:36:20 AM »
So, after a couple of days I've got my first working programme that actually does something, rather than just print 'hello world'.

It's a simple BRAM browser that lists the available files in memory and allows you to scroll through a list (list is currently truncated at 7 files, any more and you can scroll up and down to see the others). When highlighting a file it will attempt to load the contents of the backup file and display on-screen in hexadecimal. If the contents of the backup file is larger than the display area, it will truncate it and tell you.

It's written in plain HuC.

Where to go from here? Well, I think simple copy/delete functions like Chris Covell's BRAMTool would be useful - but ultimately I'd like to see how feasible it will be to get the Everdrive edio.c functions working. Though I suspect that may involve some assembly at some point - last time I did any (m68k) was at University some 14-15 years ago.

 I believe there's a bug in the BRAM library code for HuC (it's actually in the Mkit asm library side, but then again all library is). I don't specifically remember what the bug was.

nodtveidt

  • Guest
Re: First HuC attempt - simple BRAM file browser
« Reply #2 on: January 02, 2014, 05:44:46 AM »
IIRC, it has to do with file deletion.

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: First HuC attempt - simple BRAM file browser
« Reply #3 on: January 02, 2014, 07:07:43 AM »
Did anyone upload/make public library fix for this?