Dumping slot/subslot contents with simple Basic program (Development MSX Forum)MSX Resource Center               
              
English Nederlands Espa�ol Portugu�s Russian         
 News
   Frontpage
  News archive
  News topics

 Resources
   MSX Forum
  Articles
  Reviews
  Fair reports
  Photo shoots
  Fairs and meetings
  Polls
  Links
  Search

 Software
   Downloads
  Webshop

 MRC
   Who we are
  Join our team
  Donate
  Policies
  Contact us
  Link to Us
  Statistics

 Search
 
  

  

 Login
 

Username

Password




Don't you have an account yet? Become an MSX-friend and register an account now!.


 Statistics
 

There are 51 guests and 4 MSX friends online

You are an anonymous user.
 

MSX Forum


MSX Forum

Development - Dumping slot/subslot contents with simple Basic program

Goto page ( 1 | 2 Next Page )
Author

Dumping slot/subslot contents with simple Basic program

cax

msx master
Posts: 1028
Posted: August 04 2008, 21:32   
Problem description:

Some (non-game) cartridge is inserted into MSX, but we (visitors of ru.msx.org) don't know whether it's faulty or not. We are going to prove it maps itself into MSX memory, and want to create a small program in Basic that will dump the contents of the cartridge slot onto the screen (well, at least some tens of bytes starting from 0x4000).

(yes, we cannot load any memtest application because the machine is diskless, and building cassette interface etc. is too much work for just checking the cart).

Of course we know that it should be some DEFUSR calling slot switching code etc. and we can create such a program ourselves, but because we are not very experienced it will take us a lot of time. Can anybody help us with this task ?

The MSX is diskless, so the program will be typed in (not loaded) and shouldn't be too long.

Thank you a lot in advance.
hap
msx addict
Posts: 504
Posted: August 04 2008, 23:13   
something like this? (pseudo code)
org somewhere
di
push af
ld a,{bios,cart1,ram,ram}
out (0a8h),a
label:
ld a,(address)
ld (label+1),a
ld a,{bios,bios,ram,ram}
out (0a8h),a
pop af
ei
ret

Before running the program, POKE the address ($4000-$7fff) to label+1, label+2. Afterwards, the value located at the specified address can be PEEKed from label+1.
flyguille
msx master
Posts: 1225
Posted: August 05 2008, 03:34   
Yes with a DEFUSR call to a read byte memory of the BIOS you can read slowly but it is basic anyway, a byte of any slot/sslot, and you need to use it in assembler code.
cax

msx master
Posts: 1028
Posted: August 05 2008, 12:17   
hap, can you please assemble this to bytecodes ?
hap
msx addict
Posts: 504
Posted: August 05 2008, 13:21   
Ok, this evening. What is the computer's slot layout? ( PRINT INP(&HA8) ), and, no slotexpander?
tnt23
msx lover
Posts: 107
Posted: August 05 2008, 13:53   
Quote:

Ok, this evening. What is the computer's slot layout? ( PRINT INP(&HA8) ), and, no slotexpander?



hap, thanks! The computer is Yamaha CX5M. I'll type in these commands as soon as I get home.
NYYRIKKI
msx master
Posts: 1528
Posted: August 05 2008, 15:34   
Maybe something like this:
1 DEFINTA-Z:D$="3E012AF8F7CD0C006F260022F8F7C9"
2 AD=&HC000:DEFUSR=AD:FORI=0TO14:POKEAD+I,VAL("&H"+MID$(D$,I*2+1,2)):NEXT
3 'POKE AD+1,SLOTID to read (&B1000SSMM) SS=Sub-slot, MM=Main slot. Now defaults to slot 1
4 FOR I=&H4000 TO &H407F:IF(IAND7)=0THENPRINT:PRINTHEX$(I);":";
5 PRINTRIGHT$("0"+HEX$(USR(I)),2);" ";:NEXT

hap
msx addict
Posts: 504
Posted: August 05 2008, 18:35   
guess I don't have to =)
cax

msx master
Posts: 1028
Posted: August 05 2008, 19:50   
NYYRIKKI, I knew you will be the first 10x a lot.
wolf_
online

msx legend
Posts: 4780
Posted: August 05 2008, 21:22   
I can't help it..

I think it looks obfuscated..

NYYRIKKI has this magical obfuscation touch!
NYYRIKKI
msx master
Posts: 1528
Posted: August 06 2008, 02:34   
Small <> easy to read.

[D-Tail]

msx guru
Posts: 3020
Posted: August 06 2008, 10:51   
wolf_, actually this one is pretty easy and straightforward. It's nothing like that ALLYOURBASEAREBELONGTOUS thing that changes CPU mode for that matter
tnt23
msx lover
Posts: 107
Posted: August 06 2008, 19:03   
NYYRIKKI, thank you very much!

I had to type the program in my CX5M twice, as I was not sure if changing cartridges on the fly would be safe. Unfortunately the cart in question has rendered itself dead
I'll take a look at it to see if I can fix it.

Thanks all for your help
NYYRIKKI
msx master
Posts: 1528
Posted: August 06 2008, 23:58   
Good way to start is to clean all cartridge contacts with alcohol...
tnt23
msx lover
Posts: 107
Posted: August 07 2008, 07:38   
Quote:

Good way to start is to clean all cartridge contacts with alcohol...



Good point, will try this first.
 
Goto page ( 1 | 2 Next Page )
 







(c) 1994 - 2008 MSX Resource Center Foundation. MSX is a trademark of MSX Licensing Corporation.