GP2X Different Kind Of Emulator :-)


BenScar posted on May 16 2006 at 07:44 PM said:
Out of interest, just how much further have you got with this Squidge? :)

It now hangs at the "Calibrating delay loop..." stage, so there's something there I'm obviously not doing quite right... Need to make some smaller example images to run through it to make sure all the exception vectors are working properly, and then see if it's checking a status register I'm not updating, or something like that.

Of course, life would be easier if we had a datasheet that didn't give you conflicting and sometimes just completely wrong information...
 
Last edited by a moderator:
Squidge posted on May 23 2006 at 05:58 PM said:
It now hangs at the "Calibrating delay loop..." stage, so there's something there I'm obviously not doing quite right...
Calibrating delay loop? How far into "booting up" is that then? (Consider me a nubie :) )

Squidge posted on May 23 2006 at 05:58 PM said:
Need to make some smaller example images to run through it to make sure all the exception vectors are working properly, and then see if it's checking a status register I'm not updating, or something like that.
Yes, of course, that's what I would have suggested *big all knowing grin icon*
(Damn I got some learning to do!)

Squidge posted on May 23 2006 at 05:58 PM said:
Of course, life would be easier if we had a datasheet that didn't give you conflicting and sometimes just completely wrong information...
You're not kidding are you... Is this the datasheet about the ARM processor(s) used in the 2x?
 
Last edited by a moderator:
It's the datasheet for the main processor in the 2x, yes.

To show it's progress, this is what is shown by the emulator so far:

Hit any key to stop autoboot: 0

NAND read: device 0 offset 0x80000, size 0x180000 ... 1572864 bytes read: OK
## Booting image at 01000000 ...
Image Name: MMSP2 Linux Kernel
Created: 2005-11-28 4:23:05 UTC
Image Type: ARM Linux Kernel Image (gzip compressed)
Data Size: 836766 Bytes = 817.2 kB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK

Starting kernel ...

Linux version 2.4.25 (root@localhost.localdomain) (gcc version 2.95.3 20010315 (release)) #2401 2005. 11. 28. (¿ù) 13:22:54 KST
CPU: Arm920Tid(wb) revision 0
Machine: MagicEye-MDK
Warning: bad configuration page, trying to continue
MP2520F FCLK: 199065600 Hz, M = 0x49 P = 1 S = 0
MP2520F UCLK: 95846400 Hz, M = 0x60 P = 0 S = 2
MP2520F ACLK: 147456000 Hz, M = 0x98 P = 0 S = 2
MP2520F PCLK: 49766400 Hz
On node 0 totalpages: 8192
zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/mtdblock3 rw
Console: colour dummy device 80x30
Calibrating delay loop...

and this is the rest of the stuff it needs to show before it'll get anywhere useful:

99.32 BogoMIPS
Memory: 32MB = 32MB total
Memory: 30208KB available (1088K code, 751K data, 280K init)
Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
CPU: Testing write buffer: pass
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Starting kswapd
Journalled Block Device driver loaded
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
JFFS2 version 2.2. (NAND) © 2001-2003 Red Hat, Inc.
i2c-core.o: i2c core module version 2.6.1 (20010830)
i2c-dev.o: i2c /dev entries driver module version 2.6.1 (20010830)
I2C: MMSP2 algorithm module loaded.
<6>I2C: Adding MMSP2-I2C-Adapter.
I2C: Successfully added bus
ttyS0 at MMIO 0xc0001200 (irq = 48) is a MMSP2
ttyS1 at MMIO 0xc0001220 (irq = 52) is a MMSP2
ttyS2 at MMIO 0xc0001240 (irq = 56) is a MMSP2
IRQ_DISP Number = 0
Console: switching to colour frame buffer device 40x30
MMSP2 mmsp2_RGB0 framebuffer driver start
MMSP2 mmsp2_RGB1 framebuffer driver start
pty: 256 Unix98 ptys configured
MMSP2 DualCPU Interface Driver
MMSP2 Video Post Processor Driver
register device MMSP2 GPIO KEY OK
MMSP2 battery check Driver
MMSP2 Real Time Clock driver
loop: loaded (max 8 devices)
ac97_codec: AC97 Audio codec, id: WML18 (Wolfson WM9711/9712)
mp2520f.c: Using NAND S/W ECC
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)
Creating 5 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00080000 : "Bootloader"
0x00080000-0x000a0000 : "Param"
0x000a0000-0x001a0000 : "Kernel"
0x001a0000-0x019a0000 : "Filesystem"
0x019a0000-0x04000000 : "Extend"
usb.c: registered new driver hub
Linux video capture interface: v1.00
MMC/SD Slot initialized
NetWinder Floating Point Emulator V0.97 (double precision)
FAT: bogus logical sector size 65535
FAT: bogus logical sector size 65535
MMC/SD Card Detected
Partition check:
mmcsda: p1
Register SD: 982MB
Inode #27 was a directory with children - removing those too...
VFS: Mounted root (jffs2 filesystem).
Mounted devfs on /dev
Freeing init memory: 280K

INIT: version 2.84 booting

Started device management daemon v1.3.25 for /dev
Mount proc and devpts filesystem
Expand RAM file system image

INIT: Entering runlevel: 3

Last login: Thu Jan 1 00:00:11 on ttyS0
-t and -C not supported
MSDOS FS: IO charset utf8
rm: cannot remove `/mnt/sd/gp2xboot.img': No such file or directory
rm: cannot remove `/mnt/sd/gp2xkernel.img': No such file or directory
MSDOS FS: IO charset utf8
SDL_SYS_JoystickInit
MMC/SD card ejected
MMC/SD Card Detected
mmcsd/disc0/disc: p1
Register SD: 241MB
MSDOS FS: IO charset utf8

So, quite a lot :eek:

But hopefully, a lot will appear once I get this bug squashed...
 
Squidge posted on May 23 2006 at 10:54 PM said:
It's the datasheet for the main processor in the 2x, yes.
Daft, so there's just "wrong" information in there?

Squidge posted on May 23 2006 at 10:54 PM said:
and this is the rest of the stuff it needs to show before it'll get anywhere useful:
... Lots Cut ...
So, quite a lot :eek:
But hopefully, a lot will appear once I get this bug squashed...
Fingers crossed for you here! Looks like you're getting there and that's the main thing.
Can't be an easy process to emulate a full system.
 
Last edited by a moderator:
BenScar posted on May 24 2006 at 08:23 PM said:
Daft at so there's just "wrong" information in there?

Yup! Wrong or conflicting. It's fun trying to work it out.
 
Last edited by a moderator:
Squidge posted on May 25 2006 at 12:08 AM said:
Yup! Wrong or conflicting. It's fun trying to work it out.
"fun" being a relative term compared with, say, having your feet flayed with hot branding irons? :)
Or are you one of "us"? Developers who live to learn (even when it's an uphill battle)? :D
 
Last edited by a moderator:
Squidge posted on May 25 2006 at 09:45 AM said:
I enjoy figuring out stuff, so I guess you could say that :)
It's all good fun, figuring stuff out. It's one of the main reasons I got my 2x, although not having a lot of luck with my VS C++ set up at the moment. But that's another story.

Just what other projects are you working on at the moment Squidge? :)
 
Last edited by a moderator:
Well, my other projects were SquidgeNgine & SquidgeSnes. I paused work on SquidgeNgine when vobbo released his simply due to the fact that his was far more compatible, so there's little people working on an emulator which doesn't run as many games (despite the fact I had already written an asm cpu core for it, and got a lot of games over 80fps @ 200mhz)

There's lot of other systems that can use a similar core though, so I started writing a nes emulator with the same asm cpu core, but then gpfce came out, so I'm not sure whether or not it's worth continuing.

I'm playing with OpenGL a lot at the moment, but that's not really a project as such.
 
Ok, fixed an interrupt bug, Implemented some more of the hardware, and it now spits out the following:

Memory: 32MB = 32MB total
Memory: 30208KB available (1088K code, 751K data, 280K init)
Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
CPU: Testing write buffer: pass
POSIX conformance testing by UNIFIX

So, we are getting there :)
 
Squidge posted on May 25 2006 at 09:42 PM said:
Ok, fixed an interrupt bug, Implemented some more of the hardware, and it now spits out the following:

Cool, so now you're waiting for the LinuxNET to report in next with "Linux NET4.0 for Linux 2.4"
You know I think I might need to get to know Linix some more before this makes more sense to me ;)
Glad you found your interrupt bug though :)
 
Last edited by a moderator:
BenScar posted on May 26 2006 at 12:38 AM said:
Cool at so now you're waiting for the LinuxNET to report in next with "Linux NET4.0 for Linux 2.4"

I was expecting that yes, but I get this instead:

[0] swapper: obsolete system call 00b04000.
Code: e3820c01 e3a01000 ef900078 e1b04000 (1a000004)
Kernel panic: Attempted to kill the idle task!
In idle task: not syncing

I guess that means there's another bug somewhere :eek:

Hmmm... I might know where that is too. Looking at the above code, I'd say the ef900078 was meant as the system call, and I'm passing e1b04000 instead.

Ok, fixed, now I get this :)

Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039

followed by this

INVALID trap via MMU L2&copy;[00228001/00000000] @ 0xFFFFF1CC (R15=0xC01689E8)

:(
 
Last edited by a moderator:
Yup, I need to book some time off work to spend on it rather than the hour every I get every so often.
 
Back
Top