how to reset an MSX without touching the RESET button

Page 1/3
| 2 | 3

By vanfanel

Champion (446)

vanfanel's picture

29-07-2009, 10:17

Hello there

Let's say I'm using my own, custom OCM built with an ALTERA DE1 board. I've enclosed it in a case for protection, and I don't have the reset button available when it's closed.

So, after using MGLOAD to load a ROM, I've to reset the machine. HOW can I reset an MSX without touching the RESET button? Is there something like RESET.COM tool?

Thanks!

Login or register to post comments

By Leo

Paragon (1236)

Leo's picture

29-07-2009, 10:22

what does this small program do when compiled as reset.com with any compiler ( gen80.com , let's say ) :

;--- reset.asm
.org 100h
jp 0
ret

By pitpan

Prophet (3155)

pitpan's picture

29-07-2009, 10:29

I'm not sure if that works under MSX-DOS, but it will of course work fine if BIOS is set in page 0, 'cause it will force a CHKRAM and thus a soft reset.

If your solution works, it would be easier and shorter if coded as follows:

;--- reset.asm
.org 100h
rst 00h

(just one byte instead of four - you can code it in hexa as C7h )

If you invoke BASIC, a simple DEFUSR=0:A=USR(0) will do the trick aswell.

By vanfanel

Champion (446)

vanfanel's picture

29-07-2009, 11:15

wow, thanks! you're forcing me to compile my first MSX program! Big smile
It will be a VERY nice little adventure!

By vanfanel

Champion (446)

vanfanel's picture

29-07-2009, 11:15

posted twice: sorry

By pitpan

Prophet (3155)

pitpan's picture

29-07-2009, 11:34

Then just use the BASIC alternative:

- From MSX-DOS, invoke the MSX-BASIC interpreter using the command BASIC
- In MSX-BASIC just type the following:

DEFUSR=0:?USR(0)

And it will force a soft reboot without the need of compilating an executable.

By NYYRIKKI

Enlighted (6016)

NYYRIKKI's picture

29-07-2009, 13:12

@Leo & pitpan: Your solution does not work... Address 0 in DOS is "Return to DOS"

@vanfanel:
Take HEX-editor and type: F7 80 00 00
Save as RESET.COM

By vanfanel

Champion (446)

vanfanel's picture

29-07-2009, 13:26

No, no, you undesrtood me wrong! I REALLY enjoyed looking for a cross-compiler, typing that little asm and compiling a .COM file.
Thanks for the alternatives! But it forced me to start into MSX coding, can't you see what a great thing this it?

By Leo

Paragon (1236)

Leo's picture

29-07-2009, 13:36

@NYRIKKI
isn't that F7 80 00 00 a kind of bload,R ? instead of com ?
ok 0 is return to dos , too bad ...

@vanfanel
if i remember well you can try also (for fun purpose):

.org 100h
ld c,9
ld de,textstring
call 05
ret

textstring :
db 'Hi , this is text function of msxdos',13,10,'$'

By PingPong

Prophet (4093)

PingPong's picture

29-07-2009, 21:20

pull out the power supply socket.... Tongue

By cax

Prophet (3740)

cax's picture

29-07-2009, 21:28

@NYRIKKI
isn't that F7 80 00 00 a kind of bload,R ? instead of com ?

It rather looks like interslot subroutine call.

As for doing it without compiler, you may:
- create RESET.BAS containing that short BASIC program defusr=0:?usr(0)
- create RESET.BAT that will contain just the following line: BASIC RESET.BAS

Both can be made with bare hands, without any text editor.
To create batch file in DOS just type

copy con RESET.BAT

then type (no editing possible - so be careful) the contents of file, and in the end,
after the last ENTER, press CTRL+Z and ENTER.

Page 1/3
| 2 | 3