Author Topic: Usb drive and RAM?  (Read 387 times)

Malban

  • Newbie
  • *
  • Posts: 9
    • View Profile
Usb drive and RAM?
« on: September 26, 2016, 07:31:03 AM »
Hi,
I recently tried to use the "huge" memory of the Smartcard to my advantage (and tried vide support for that...) and write an YM-Player.
The advantage would be, that YM-files do not need to be packed in any way, and as such there would be no huge cycle impact on playing them.

Said and done, I did a BASIC output (unpacked) of an YM-file.
And the first thing I was greeted with was:
    Error creating file: /Volumes/VECTREX 32/Popcorn.asm

Well data statements in BASIC tend to be large - the file at that stage was about 350kb.

Is it right that the "RAM" of the device and the USB storage area are the same?

Or is it just coincidence, that the USB drive only has 430kb memory?
I mean - apart from storing generated data - how can I use the 512kB RAM for my vectrex programs, if the BASIC (ASCII) representation of the data already uses so much space, that I can't even get the data to my vectrex?

Perhaps I am thinking totally the wrong way.

@Bob:  Would you care to set me right or elaborate?

Thanks
Malban





Vectrex32

  • Administrator
  • Full Member
  • *****
  • Posts: 102
    • View Profile
Re: Usb drive and RAM?
« Reply #1 on: September 26, 2016, 08:04:20 AM »
Hi Malban,

The USB drive space is in the SmartCart's flash memory. There's 2MB of flash and I've reserved 430K of that for the USB drive.

Separately, the SmartCart has 512K of RAM. It's true that you can't fit a BASIC program with 512K of data in it onto the drive, so you can't hard-code enough data to fill up that 512K. You could only make use of that space with generated data.

To anticipate your next question ("why only 430K bytes in the drive when you have 2MB available?"): I need to have all the SmartCart code, including the drive space, fit within 1MB. The reason is that when it comes time to upgrade the firmware, you will copy a compressed file with the new firmware onto the SmartCart's drive. Then, you'll give the upgrade command. It will decompress the file and burn it into the free 1MB section of flash. So basically, the 2MB is divided into two banks, one for the existing firmware and the second for the next version.

There are more sophisticated - and complex - ways of managing firmware upgrades and someday I might have to switch to them.

- Bob


- Bob