Jump to content

Photo

Reading Cartridge memory


8 replies to this topic

#1 swapd0 OFFLINE  

swapd0

    Chopper Commander

  • 235 posts

Posted Wed May 9, 2018 9:15 AM

I've implemented something like a file system on the cartridge, so when I need a graphics or sound I copy them from the cartridge space (skunkboard) to main ram... well all data are packed so I unpack from ROM to RAM.

 

This mean that I'm reading the memory (ROM) byte by byte, there are some issues with byte reading? I've included some checks after the unpack and sometimes the output file it's bigger than the original, but sometimes it works.

 

By the way I'm using lz77 and lz78 from here http://s390174849.on...scc.de/code.htm

 

Thanks.

 



#2 Zerosquare OFFLINE  

Zerosquare

    River Patroller

  • 2,544 posts
  • Location:France

Posted Wed May 9, 2018 2:08 PM

I'm not aware of any issue with reading data from ROM...

Which processor are you using (68k, GPU...)? Is the ROM bus width correctly set for the Skunkboard (16-bit)?

#3 swapd0 OFFLINE  

swapd0

    Chopper Commander

  • Topic Starter
  • 235 posts

Posted Wed May 9, 2018 2:42 PM

68000, I haven't changed anything about ROM bus width, do you mean MEMCON1 6 MEMCON2 registers?



#4 Zerosquare OFFLINE  

Zerosquare

    River Patroller

  • 2,544 posts
  • Location:France

Posted Wed May 9, 2018 3:38 PM

Yes. Try including the piece of code in the first post of that topic to see if it fixes the problem:
http://atariage.com/...m-rom-directly/

#5 swapd0 OFFLINE  

swapd0

    Chopper Commander

  • Topic Starter
  • 235 posts

Posted Thu May 10, 2018 5:23 AM

Thanks I've included the code but it still fails, but I've realised that with some files the depack routine overwrite the output buffer, it fails always on the same files.

 

Even using the PC application, some files when you depack them you got a huge file...



#6 Zerosquare OFFLINE  

Zerosquare

    River Patroller

  • 2,544 posts
  • Location:France

Posted Thu May 10, 2018 11:44 AM

Have you tried this version?
http://www.jagware.o...ment.php?id=161

I think CJ also has some decompression code.

#7 swapd0 OFFLINE  

swapd0

    Chopper Commander

  • Topic Starter
  • 235 posts

Posted Thu May 10, 2018 3:09 PM

It looks that It's the same packer that I'm using lz77, the problem it's that I need the packer for OS X. That's why I'm using lz77 & lz78 from ray's web.

 

The packing routine had a bug that I've fixed, at least now I don't have buffer overflow.



#8 42bs OFFLINE  

42bs

    Star Raider

  • 53 posts
  • Location:Germany

Posted Fri May 11, 2018 2:41 AM

Check out 7z/lzma. It comes with sources and I think the depacker is fairly ease to port to 68k/GPU/DSP.

There should be an OS-X version. Or at least lzma can be compiled for macOS.



#9 CyranoJ OFFLINE  

CyranoJ

    Quadrunner

  • 5,187 posts
  • RAPTOR in LOCAL
  • Location:Adelaide, SA

Posted Fri May 11, 2018 2:44 AM

I use NRV2e from CheckPoint:

 

https://www.dhs.nu/b...hp?request=5184

 

I have also used LZ77 without any issues.






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users