Technical questions for the MPC2000xl and the MPC2000
By Needle201 Sat Dec 01, 2007 4:47 pm
I have a good grasp on Motorola 68K Assembly, and since that is the CPU in the 2KXL i'd like to do some hacking to the code, just for fun. I don't expect anything useful to come out of this.

I already disassembled the OS1.14, thats's the one i am currently using in my MPC.

So, if i change some code, assemble, and load the whole thing into my MPC, would it be possible to brick it? Naturally i want to avoid this at any cost...

So, i'd like to know, has anybody here had experiences of loading a corrupt OS File into the MPC and bricking it?

Any other infos from people with some topic related knowledge are also welcome...

thanks,
Mike

By Muied Lumens Sat Dec 01, 2007 6:00 pm
I might be wrong, but doesn't the mpc boot up from ROM, then search for the OS on floppy/card/ext HD? You should be able to mess around, crash the thing and just reboot with akai's OS fine.

Don't take my word for it tho.

By Muied Lumens Sat Dec 01, 2007 6:02 pm
Wasn't there a tread a few months back on the 1000 jj forum where some poor dude loaded a corrupt OS and ended up with a blank mpc?
User avatar

By LunaticBastard Sat Dec 01, 2007 6:20 pm
ok its been my experience with flash devices that there is always a manufacturers back door to fix a currupted flash. ( hence "pandoras battery" for the psp.) the battery serial number in that instance was sonys way of direct booting from the memroy stick. bypassing the flash chip and allowing a reformat of the firmware on to it. it just took coders like 6 years to figure that out. there is a jumper inside the xl the says flash lock. or somethin like that. that might be your key for an unbrick. but just because you change some code doesnt meen you will have a total brick. it may just lock in certain functions. i say its worth the risk. if you brick yours ill use mine to try to find the unbrick with you.

what features are you wanting to rewrite? we may be able to compile a small list of feature changes. (not new features.) here on this board.

By Needle201 Sat Dec 01, 2007 6:49 pm
Well, to be honest, i don't have all too high hopes for being able to get anything done. My experiences with disassembled foreign code are not all too good. Usually you have to take a lot of time to understand what happens in there, since it's quite cryptic stuff like this (this is from the disassembly i did of the MPC2kXL.bin file)


DIVU (A5)+,D7
MOVE.W D0,D6
MOVEQ #0x5,D2
AND.B D6,D3
DATA.W 0xaf11 ; 'A-line' opcode (unassigned)
OR #0xaf115d1f,-(A0)
MULS (D_06,PC,D1.L*8),D7
ADDQ.W #3,(A3)
EOR D5,A_0f8e.W
ADDA (D_32fd,A0),A5
DIVU (A4)+,D5
EOR.B D3,D0
MOVE A2,(A3)
OR.W #0x5e07,(A3)+
MOVE.B A7,????
DATA.W 0xfb1e ; 'F-line' opcode (unassigned)
ADD.W #0x53bb,(A6)
CMP.B A7,D4
DIVU (A3)+,D7
ROR.B #4,D1
DATA.W 0xfdbb ; 'F-line' opcode (unassigned)
OR.B #0x263a,D0
OR.W #0x7fe,(????,A4.W*2)
DATA.W 0xfb40 ; 'F-line' opcode (^C


Not having some device i can do some trial and error with and test out changes, this seems actually impossible...So i asked about some experiences people might have with bricking their MPCs with corrupted OS's. I would need some simple Mechanism of "unbricking" the machine, because if i cannot access the loader menu anymore, i cannot reload a working OS.
This is the most basic thing which needs to get working first, or i can forget the whole idea.


I think this whole thing would be lots of easier to do on a MPC2K, which loads the OS every time you switch it on if i remember correctly, but since i don't own a 2K and don't intend to, i have to stay with the XL on this.


As for feature changes, i have a couple of small things on my mind that itch me from time to time, and wouldn't be too complicated given some understanding of the listings structure.

I see some empty space in the codes listing, so i guess it would be possible to write some small things up in there.

I guess the biggest motivation here is, that i like to see that old machines are kept alive through people who code for them. I do some programming for old consoles like the Atari VCS or the Vectrex as a hobby, and on a certain point of view, the MPC is also just a piece of hardware with some software running inside, and i think it's sad that people cannot improve the software themselves even if they wanted to...
User avatar

By The Grublet Sun Dec 02, 2007 1:43 am
Well, sir,


I think you have a golden opportunity here.

you could be the first one in the world (probably an overstatement) to actually mod the 2kxl. I'm sure I speak for all of us XLers, that even if you fail, and end up locking your machine up temporarily, we all got your back... and we can help you get it back and running.

As far as the 1000 user, that guy was an idiot... he was trying to avoid paying the 30 bucks to get the JJ, and ended up getting pimped by his own ignorance.

I'd say go for it.. and get in contact with JJ... he may be willing to give you some insight into understanding what the codes do and how they work, even if the 1000 is significantly different.

If you succeed, you are a hero. if you fail, we can help get you back to normal.

either way it is worth the effort.

How are you interfacing with the machine to mod (view) the code so far??

~Grub
User avatar

By LunaticBastard Sun Dec 02, 2007 3:35 am
you can just decompile a copy of the os. you dont have to interface the machine at this point.
as far as the list of code. if nobody can break down the list for you. youll have to make small changes and then look for them on the mpc. im almost positive that as long as you dont change the basics of the os it wont brick.

By Needle201 Sun Dec 02, 2007 9:09 am
@lunaticbastard: Please read my post above before you reply. I already disassembled (the correct term) the code. You are just restating what i already wrote.


@Grublet: Maybe a good idea to get in contact with JJ. I hope his english is good enough by now to answer me a few questions. But i think the hardware design of the 2KXL is radically different from the 1000/2500 Series, so he won't be able to answer anything indeep, i guess.



Well, what i said, at this point the interfacing is the problem. I need to make changes to the code, and load it into the real thing, to understand how it works. I know what the different "Mnemonics" in the code above mean and do, so i understand whats happening in the code above, but i have to change stuff in the code to see how it fits into the big picture, so to say...

The perfect scenario would be having some kind of "2KXL Emulator" running on my PC, but that doesn't exist, and I won't go through the hassle of programming one. So that leaves me with the option of changing stuff in the code, assemble, and load the OS into my MPC.

But before i don't get some information about a possible way of resetting the OS back to normal if something bad happens I won't do that.
Easy as that.
By jellyjim Sun Dec 02, 2007 11:28 am
Needle201 wrote:I have a good grasp on Motorola 68K Assembly, and since that is the CPU in the 2KXL


mpc3000le wrote:The MPC2000 DOES NOT use a Motorola 68000 CPU.
Not even any thing like it.
The MPC2000 ( like the S2XXX, S3XXX, MPC3000 and MPC2000XL ) use an NEC-V53 CPU.
The NEC-V53 CPU uses an x86 ( Intel ) mnemonic/instuction set compatible with an Intel 286.
Some additional NEC mnemonic/instuctions are present also.
For the most part an NEC-V53 cpu is a variation of an Intel 286 with a bonus capability to run code about 30% faster than the similarly clocked original Intel unit.
So in simple terms ... the samplers above are based around embedded PC technology. ( Japanese style ).
Rohan.

By Needle201 Sun Dec 02, 2007 11:50 am
Interesting. I (and a couple of blokes that i know) was always under the impression that the XL uses a Motorola 68K variant.

The NEC chip is a microcontroller, and using Intel X86 Assembly mnemonics, which wouldn't be too much of a problem for me to code as well, but here comes the big problem (but also hope):

http://www.mpc2000xl.com/bootlock.htm

I hope this Icecool guy has some more info on the OS loading sequence.

By Scarecrow Sun Dec 02, 2007 11:58 am
how awesome would that be if some new features were implemented into the mpc 2000 and XL

By jellyjim Sun Dec 02, 2007 1:34 pm
Needle201 wrote:Interesting. I (and a couple of blokes that i know) was always under the impression that the XL uses a Motorola 68K variant.

The NEC chip is a microcontroller, and using Intel X86 Assembly mnemonics, which wouldn't be too much of a problem for me to code as well, but here comes the big problem (but also hope):

http://www.mpc2000xl.com/bootlock.htm

I hope this Icecool guy has some more info on the OS loading sequence.


I thought it did too. The above quote from Rohan was him correcting a post of mine :)

The other issue that's occurred to me is how to deal with all the peripheral hardware in the MPC. Because you're working at a machine code level there is no luxury of a file system API or display programming API! So you'd need documentation and experience of working with more than just the CPU. Well if you were altering those kind of functions anyway.

By Needle201 Sun Dec 02, 2007 4:30 pm
Hmm, from my experiences with other old machines i programmed so far, you can get a lot done without having to do lots of accessing peripherals. I think most of the code logic is done in the microcontroller part, and thats where i want to stay at anyway.
User avatar

By The Grublet Sun Dec 02, 2007 7:42 pm
so I had an idea after reading that bootlock thread...

what if you were loading an OS from something other than internal memory...

keep your internal memory with a solid (unaltered) OS... and mod one on a ZIP, floppy, or SC??...

can't you do this... and make modifications to the ZIP OS, and tell your mpc to 'boot from device' in the 'load' screen?, so when you restart, it will attempt to load the OS you modified... and if it fails... you still have the unaltered OS on the internal memory???

Ive only had mine for about a year now, so this is just a guess... but to me, it makes more sense to alter something removable, instead of the internal OS.


~Grub
User avatar

By LunaticBastard Sun Dec 02, 2007 10:10 pm
i think we should look at the basics here. what does a xl do when the os is corrupted? it ask's for the os disk. there is obviously a failsafe built in to the flashrom to decifer whether or not it is an acceptable file system.