Jump to content



Photo
- - - - -

Question about Flash memory mapping


  • Please log in to reply
16 replies to this topic

#1 2072

2072

    Casio over god

  • Admin
  • PipPipPipPipPipPipPipPip
  • 1564 posts
  • Gender:Male
  • Location:Somewherebourg
  • Interests:Alternative states of consciousness, programming, making things work the best they possibly can.

  • Calculators:
    AFX2 ROM 1.02, CFX-9940GT+, FX-180P-Plus

Posted 01 May 2003 - 05:42 PM

Is there a way to know which flash memory segment is currently mapped at a particular address (after 0x4000 of course) ?

#2 BiTwhise

BiTwhise

    Casio Overgod

  • [Legends]
  • PipPipPipPipPipPipPip
  • 627 posts
  • Gender:Male
  • Location:Guildford, Surry, UK
  • Interests:Programming, games, consoles, martial arts

  • Calculators:
    FX9700WE, CFX9970G, AFX2.0, Classpad 300

Posted 01 May 2003 - 06:14 PM

Can't you read the ports in, same way you would write out to select the segment?

#3 2072

2072

    Casio over god

  • Admin
  • PipPipPipPipPipPipPipPip
  • 1564 posts
  • Gender:Male
  • Location:Somewherebourg
  • Interests:Alternative states of consciousness, programming, making things work the best they possibly can.

  • Calculators:
    AFX2 ROM 1.02, CFX-9940GT+, FX-180P-Plus

Posted 02 May 2003 - 06:30 AM

Well I've tried but it seems that these ports are write only.

#4 C@siomax

C@siomax

    Casio Freak

  • Members
  • PipPipPipPip
  • 229 posts
  • Location:Grenoble, FRANCE

  • Calculators:
    Graph 100 v1.0 and Graph 100+ v1.03

Posted 02 May 2003 - 09:35 AM

Have you tried port 56h ?
Read the value which is in it.
It should be from A0h to A7h. And I'm sure this 0x56 port is not in write only mode :D

Then translate the value read to the correct segment.
See this link:

http://www.graph100....p?p=28509#28509

I've put some segments to give you an idea.

But this is just an idea, I can't tell you if it will work!

#5 BradN

BradN

    Casio Addict

  • Members
  • PipPipPip
  • 69 posts

Posted 09 May 2003 - 07:15 PM

If I remember, the ports were write only, unless there's some trick that I don't know of to read them.

#6 BiTwhise

BiTwhise

    Casio Overgod

  • [Legends]
  • PipPipPipPipPipPipPip
  • 627 posts
  • Gender:Male
  • Location:Guildford, Surry, UK
  • Interests:Programming, games, consoles, martial arts

  • Calculators:
    FX9700WE, CFX9970G, AFX2.0, Classpad 300

Posted 10 May 2003 - 08:54 AM

Well, you can read in a number of bytes fromt the current segment, then switch segments until the first number of bytes matches that which you read in, and just assume you found your segment :/

Obviously, this is not a very good method of doing it, and all empty flash drives will be the same, but since the ports are read only, I sure don't know many better solutions :(

Why do you wanna know which segment is currently mapped anyway?

Guess this is for some feature of Touche, so good luck with it :)

#7 2072

2072

    Casio over god

  • Admin
  • PipPipPipPipPipPipPipPip
  • 1564 posts
  • Gender:Male
  • Location:Somewherebourg
  • Interests:Alternative states of consciousness, programming, making things work the best they possibly can.

  • Calculators:
    AFX2 ROM 1.02, CFX-9940GT+, FX-180P-Plus

Posted 10 May 2003 - 09:07 PM

Yes I would like to add the ability to write in the flash from the memory menu but I don't want TOUCHE to be modified this way... So I think I will ask the user in which segment they want to write...

#8 BiTwhise

BiTwhise

    Casio Overgod

  • [Legends]
  • PipPipPipPipPipPipPip
  • 627 posts
  • Gender:Male
  • Location:Guildford, Surry, UK
  • Interests:Programming, games, consoles, martial arts

  • Calculators:
    FX9700WE, CFX9970G, AFX2.0, Classpad 300

Posted 10 May 2003 - 11:19 PM

ah, so you don't want your own program to modifie itself :)

if so, you can just check if TOUCHE is present on the currently selected segment/drive

#9 2072

2072

    Casio over god

  • Admin
  • PipPipPipPipPipPipPipPip
  • 1564 posts
  • Gender:Male
  • Location:Somewherebourg
  • Interests:Alternative states of consciousness, programming, making things work the best they possibly can.

  • Calculators:
    AFX2 ROM 1.02, CFX-9940GT+, FX-180P-Plus

Posted 11 May 2003 - 05:30 PM

Yes but the problem is that people can have TOUCHE in several drives... so I cannot be sure using this way.
It could be dangerous to modifie TOUCHE because now it cans write on the flash so if it crashes it may erase and/or even damage the flash...

#10 huhn_m

huhn_m

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1957 posts
  • Gender:Male
  • Location:Germany / Dresden
  • Interests:Assembler(!!!)
    Computers and Programming
    Operating Systems
    Programmable Calculators
    Maths and everything arround it

  • Calculators:
    FX-82SX / AFX 2.0+ (ROM 1.03) / FX 1.0+ (ROM 1.03)

Posted 11 May 2003 - 05:44 PM

is it compressed? if not do the folowing thing. make a variable with the value 'X31317AFFDA' (e.g. something noone would noprmaly use in his program) now simply search the flash segment for this characters et voila!
That's the best way for testing.

#11 2072

2072

    Casio over god

  • Admin
  • PipPipPipPipPipPipPipPip
  • 1564 posts
  • Gender:Male
  • Location:Somewherebourg
  • Interests:Alternative states of consciousness, programming, making things work the best they possibly can.

  • Calculators:
    AFX2 ROM 1.02, CFX-9940GT+, FX-180P-Plus

Posted 12 May 2003 - 01:49 AM

Yes but if a person has several drives with TOUCHE inside (it's a rare case, I agree :D )... I can't test which one is in use... But anyway I will ask on which segment the user wants to write before allowing him to write on the flash so I won't have to worry. B)

btw, is the drive currently in use always mapped on 0x40000 to 0x60000 ? I know it is right for ROM 1.02 but I'm not sure for other ROM versions...

#12 superna

superna

    Casio Addict

  • Members
  • PipPipPip
  • 88 posts

Posted 12 May 2003 - 11:10 AM

it's the same for all other versions... Rom-Dos maps the drive at 4000:0 -> 6000:0 to load the exe file (it is because the launch segment will be 4000 or 5000 and the offset will be variable)

oki ?

i think you should not accept to write on the current mapped flash on 4000:0 -> 6000:0 so you'll be fine !

#13 Brazzucko

Brazzucko

    UCF BASIC Programming Champion

  • Super Member
  • PipPipPipPipPipPip
  • 412 posts

  • Calculators:
    FX 1.0, CFX 9850 GB Plus and FX 9750G

Posted 12 May 2003 - 02:42 PM

:lol: It will be nice if some one make a very detailed tutorial for it for everyone :)

#14 BiTwhise

BiTwhise

    Casio Overgod

  • [Legends]
  • PipPipPipPipPipPipPip
  • 627 posts
  • Gender:Male
  • Location:Guildford, Surry, UK
  • Interests:Programming, games, consoles, martial arts

  • Calculators:
    FX9700WE, CFX9970G, AFX2.0, Classpad 300

Posted 12 May 2003 - 03:31 PM

The info is there.. only most of it is in french :lol:

The "La Graph100" manuall, by Olivier Coupelon is quite good

The french isn't a problem for me, since all of it is technical stuff, and I can understand it from the context.. however, others might struggle with the language, so an english one would be nice :)

#15 2072

2072

    Casio over god

  • Admin
  • PipPipPipPipPipPipPipPip
  • 1564 posts
  • Gender:Male
  • Location:Somewherebourg
  • Interests:Alternative states of consciousness, programming, making things work the best they possibly can.

  • Calculators:
    AFX2 ROM 1.02, CFX-9940GT+, FX-180P-Plus

Posted 12 May 2003 - 09:55 PM

Ask to Killer83z :lol:


No I cannot simply denie writting on 0x4000:0 -> 0x6000:0 because a drive can be mapped several times at different places...

#16 superna

superna

    Casio Addict

  • Members
  • PipPipPip
  • 88 posts

Posted 13 May 2003 - 07:27 AM

if this drive is mapped at different places it is not you're problem, it is surely the user who made it so just do that.

#17 Killer83Z

Killer83Z

    Casio CEO

  • [Legends]
  • PipPipPipPipPipPip
  • 427 posts
  • Location:I'm near to the place where I study
  • Interests:Guitar, Piano, Music, UCN<br />

  • Calculators:
    Algebra FX2.0, CFX-9850G, fx-7000G, fx-7500G, TI-83, HP100lx

Posted 13 May 2003 - 07:42 PM

Ask to Killer83z :lol:

Shut up! I gave up a long time ago :rolleyes:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users