What can I do to help with Loongson support?
-
- Rookie
- Posts: 17
- Joined: Sat Feb 07, 2009 2:59 pm
- Location: Chaoyang District, Beijing, China
- Contact:
What can I do to help with Loongson support?
There are already five laptops out with the Loongson 2F CPUs. While I don't except any of them will ever be able to run bsnes (unless you make that speed-friendly version), the Loongson 3 due out next year might be able to.
The instruction set will be the same, with the 3 also supporting x86 translation. Even with 8 cores, I don't except 32bit x86-to-64bit mips3 translation to be friendly to bsnes given its already hgih emulation demands.
If I can provide any information to help with getting bsnes ready to compile on the 2F, it should be useful so bsnes will work on the Loongson 3 when that chip is released. Am I wrong to assume an 8-core 64-bit risc at 1.4 GHz will probably be able to run bsnes?
I know I'm probably your only contact with access to Loongson hardware unless you've been chatting with RMS, so I'll do what I can to help though I know it will never be running full (or half) speed here.
By the way, how can I get ahold of bearoso to let him know snes9x-gtk cannot compile on a Loongson even with assembler hacks off?
The instruction set will be the same, with the 3 also supporting x86 translation. Even with 8 cores, I don't except 32bit x86-to-64bit mips3 translation to be friendly to bsnes given its already hgih emulation demands.
If I can provide any information to help with getting bsnes ready to compile on the 2F, it should be useful so bsnes will work on the Loongson 3 when that chip is released. Am I wrong to assume an 8-core 64-bit risc at 1.4 GHz will probably be able to run bsnes?
I know I'm probably your only contact with access to Loongson hardware unless you've been chatting with RMS, so I'll do what I can to help though I know it will never be running full (or half) speed here.
By the way, how can I get ahold of bearoso to let him know snes9x-gtk cannot compile on a Loongson even with assembler hacks off?
Re: What can I do to help with Loongson support?
Well, the eight cores won't help, and I don't think bsnes has been ported to any fundamentalist RISC architectures (even older versions of bsnes struggled on my 1.6GHz PowerPC G5, but I don't know if that was just OS X being piggish.D-- wrote:Am I wrong to assume an 8-core 64-bit risc at 1.4 GHz will probably be able to run bsnes?
He's pretty responsive to posts in his thread in the SNES9x forums.By the way, how can I get ahold of bearoso to let him know snes9x-gtk cannot compile on a Loongson even with assembler hacks off?
-
- Regular
- Posts: 347
- Joined: Tue Mar 07, 2006 10:32 am
- Location: The Netherlands
Eight cores would be enough to dedicate a core to each component of the SNES, I expect. But it's all about the speed of synchronisation between the cores.. if it can't sync up the millions of times per second bsnes needs, all its cores will mean nothing. (of course, in its current form bsnes can't handle more than one physical core anyway)
Appreciate the help.If I can provide any information to help with getting bsnes ready to compile on the 2F, it should be useful so bsnes will work on the Loongson 3 when that chip is released.
The only non-ISO C++ portion of bsnes is libco, which amounts to ~1-2kb of code per platform that has to be written in assembler.
I would be very interested in porting libco to the MIPS architecture, but it's going to be very tough without having access to one.
Even for the x86, it took me ~50 or so compile tries to get it working there. I think if we were to do this, I'd need a shell account on your Loongson. I would also need the full instruction set reference, and ABI (application binary interface) convention for Loongson/Linux.
Or perhaps someone here is familiar with the MIPS architecture? The Loongson is extremely similar, they just didn't buy the license themselves, instead going through a Canadian company, IIRC.
It's a possibility. My 1.8GHz Pentium Dual-Core (half-cache Core 2) was capable of ~60-70fps. If the MIPS architecture is more efficient, it could work. Note that the Atom in-order CPU in other netbooks gets ~40fps now.Am I wrong to assume an 8-core 64-bit risc at 1.4 GHz will probably be able to run bsnes?
Otherwise, the eight-core part is really promising. Right now, VG is right that I can only use one thread.
But if a platform had really tight thread synchronization (~50-100x faster than on x86), then I could indeed use one core per emulated chip. In theory, that would give me enough power for even SuperFX / SA-1 support, or a dot-accurate PPU.
The entire libco architecture was designed with this in mind. Though it's coöperative for now, it really only needs to replace co_switch(dest) with dest->lock = true; co_waitfor(dest->lock == false); and it will be truly multi-threaded.
PCs though, they only have 2-4 cores (I need at least 4 of my own), and I can only sync two threads ~100k times a second, versus the ~10 million I'd need, and that's just for syncing without any actual emulation.
Eight cores is really promising ... I'll have to look into ordering one when they come out, perhaps.
longson... isn't that the new chinese CPU that's getting a lot of attention lately? It's a 32-bit MIPS processor, right?
EDIT:
Yes, I remember now. Derrick Sobodash talked about it on his website:
http://cinnamonpirate.com/2009/01/enter ... on-laptop/
EDIT:
Yes, I remember now. Derrick Sobodash talked about it on his website:
http://cinnamonpirate.com/2009/01/enter ... on-laptop/
Good news, SJLJ libco works on the MIPS Loongson 2F. Meaning bsnes will work, however slowly we do not know. Way to go, Nach!!
That makes me ~70% certain that it will work on the PS3 as well.
Code: Select all
~/libco/test$ ./test_timing
context-switching timing test
0.140 seconds per 50 million subroutine calls (5000000 iterations)
2.180 seconds per 100 million co_switch calls (5000000 iterations)
co_switch skew = 15.571429x
-
- Rookie
- Posts: 17
- Joined: Sat Feb 07, 2009 2:59 pm
- Location: Chaoyang District, Beijing, China
- Contact:
Hi to you, too. I guess you didn't check my profile. The Loongson 2F is a 64-bit MIPS-compatible CPU, though it has its own instructions in addition to MIPS. It's significant for drawing only 4W at 1GHz which is amazing for a chip made on a 90nm process. It also has an on-chip northbridge included int hat figure, putting it far below the power consumption of an Intel Atom which relies on a power-wasting VIA northbridge.ZH wrote:longson... isn't that the new chinese CPU that's getting a lot of attention lately? It's a 32-bit MIPS processor, right?
EDIT:
Yes, I remember now. Derrick Sobodash talked about it on his website:
http://cinnamonpirate.com/2009/01/enter ... on-laptop/
Is SJLJ in the latest bsnes source package? If so I'll try compiling it later tonight. Snes9x-gtk I'm done with until BearOso makes some big changes. Four hours of work to make it link, then discovering it had no sound output or video output with any combination of settings was disappointing, especially since those were the few areas that didn't have trouble buildingbyuu wrote:Good news, SJLJ libco works on the MIPS Loongson 2F. Meaning bsnes will work, however slowly we do not know. Way to go, Nach!!
That makes me ~70% certain that it will work on the PS3 as well.Code: Select all
~/libco/test$ ./test_timing context-switching timing test 0.140 seconds per 50 million subroutine calls (5000000 iterations) 2.180 seconds per 100 million co_switch calls (5000000 iterations) co_switch skew = 15.571429x

But you are really going to need a MIPS assembler core if you want to bring that sync speed down. I'm not sure the Loongson3 will offer a big enough speed jump to overcome that delay, and if you're talking about syncing multiple cores ... it could get pretty hairy I would think.
On the up side, you have an Xv display which should help a lot. SDL's refusal to hook an Xv port is one of the things crippling mednafen on the Loongson right now. After profiling it almost has enough power for the GBA, assuming no software scaling and a big sound buffer. SDL sound has some problems too

Side note: I have bview, tsukuyomi and xkas packaged for Loongson. Is there anything else you want me to build besides bsnes?
Oh, you're Derrick Sobodash? Well, hey thereHi to you, too. I guess you didn't check my profile. The Loongson 2F is a 64-bit MIPS-compatible CPU, though it has its own instructions in addition to MIPS. It's significant for drawing only 4W at 1GHz which is amazing for a chip made on a 90nm process. It also has an on-chip northbridge included int hat figure, putting it far below the power consumption of an Intel Atom which relies on a power-wasting VIA northbridge.

I didn't really know the exact details. I read through some of your posts on cinnamonpirate, albeit quickly from time to time; I got the impression that the loongson 2F is a 32-bit MIPS cpu. So, it's 64-bit and has it's own instruction set: what's the name of this instruction set? Aside from it being MIPS-compatible.
-
- Rookie
- Posts: 17
- Joined: Sat Feb 07, 2009 2:59 pm
- Location: Chaoyang District, Beijing, China
- Contact:
Let's think about this:
The instruction set of the 6502 is the 6502 instruction set.
The instruction set of the Z80 is the Z80 instruction set.
The instruction set of the 68000 is the 68000 instruction set.
The instruction set of the 486 is the x86 instruction set.
The instruction set of the MIPS is the MIPS instruction set.
Would you like to try guessing again what the instruction set of the Loongson is?
The instruction set of the 6502 is the 6502 instruction set.
The instruction set of the Z80 is the Z80 instruction set.
The instruction set of the 68000 is the 68000 instruction set.
The instruction set of the 486 is the x86 instruction set.
The instruction set of the MIPS is the MIPS instruction set.
Would you like to try guessing again what the instruction set of the Loongson is?
MIPS-III.ZH wrote:I didn't really know the exact details. I read through some of your posts on cinnamonpirate, albeit quickly from time to time; I got the impression that the loongson 2F is a 32-bit MIPS cpu. So, it's 64-bit and has it's own instruction set: what's the name of this instruction set? Aside from it being MIPS-compatible.
<|>_<_>_<|>D-- wrote:Let's think about this:
The instruction set of the 6502 is the 6502 instruction set.
The instruction set of the Z80 is the Z80 instruction set.
The instruction set of the 68000 is the 68000 instruction set.
The instruction set of the 486 is the x86 instruction set.
The instruction set of the MIPS is the MIPS instruction set.
Would you like to try guessing again what the instruction set of the Loongson is?
Let me guess, the Spoony-bard instruction set?
-
- Rookie
- Posts: 17
- Joined: Sat Feb 07, 2009 2:59 pm
- Location: Chaoyang District, Beijing, China
- Contact:
Well, compiled and profiled. bsnes gets a peak of 23 fps on the Loongson 2F at 796MHz and an average of 18 fps. I did not try it with the CPU overclocked to its maximum speed of 1GHz.
The most interesting point is that the Xv driver works how it should, with absolutely no speed penalty no matter how you scale it. If mednafen adds support for this driver, it will have full speed on every system except PC-FX. Currently it can only achieve this with no scaling, meaning no possibility of full-screen gaming.
The most interesting point is that the Xv driver works how it should, with absolutely no speed penalty no matter how you scale it. If mednafen adds support for this driver, it will have full speed on every system except PC-FX. Currently it can only achieve this with no scaling, meaning no possibility of full-screen gaming.
-
- Locksmith of Hyrule
- Posts: 3634
- Joined: Sun Aug 08, 2004 7:49 am
- Location: 255.255.255.255
- Contact:
Eh, it's just FrankyD-- wrote:Let's think about this:
The instruction set of the 6502 is the 6502 instruction set.
The instruction set of the Z80 is the Z80 instruction set.
The instruction set of the 68000 is the 68000 instruction set.
The instruction set of the 486 is the x86 instruction set.
The instruction set of the MIPS is the MIPS instruction set.
Would you like to try guessing again what the instruction set of the Loongson is?
don't worry about him
<Nach> so why don't the two of you get your own room and leave us alone with this stupidity of yours?
NSRT here.
NSRT here.
-
- Buzzkill Gil
- Posts: 4295
- Joined: Wed Jan 12, 2005 7:14 pm
-
- Locksmith of Hyrule
- Posts: 3634
- Joined: Sun Aug 08, 2004 7:49 am
- Location: 255.255.255.255
- Contact:
Fixed, also explains a lot..kick wrote:Franky is a weeaboo
<Nach> so why don't the two of you get your own room and leave us alone with this stupidity of yours?
NSRT here.
NSRT here.
Derail; AoL postcount + butar > your postcountfunkyass wrote:you have no clue what a weeaboo is do you?adventure_of_link wrote:Fixed, also explains a lot..kick wrote:Franky is a weeaboo
Rerail; Where would one obtain one of these processors and in what environment would it be found suitable, I never get to work much outside an x86 environment and I'm terribly interested!
-
- Rookie
- Posts: 17
- Joined: Sat Feb 07, 2009 2:59 pm
- Location: Chaoyang District, Beijing, China
- Contact:
At the moment you would need to contact Lemote. You might also look into the Beijing Linux Users Group. The vice president Pockey Lam and some of the other members work for the company producing the Gdium, which is more targeted toward foreign users (Lemote offers NO English support). Your current options are:
In Production:
Yeeloong 8089a (2G SSD, 512M RAM, SM712 video, 2 USB ports)
Yeeloong 8089b (160G HD, 1G RAM, SM712 video, 3 USB ports, webcam that doesn't work)
Pre-Production:
Gdium (16G "G-Key" [USB flash on which the OS is stored, slides seamlessly into a socket under the touchpad], 512M RAM, SM502 video)
There is also the E-benton, though I'm told they royally fucked Lemote and never paid them for all the technology they borrowed. Chances are you won't see many more of their computers.
For a full desktop system instead of a netbook, there is the Fulong 2F box. It comes with an 80G hard disk and 512M RAM. Too many ports to list. Built to be the same size as a CD-ROM USB enclosure, requires a keyboard, mouse and monitor.
These all cost between $210 and $500. Mine (the 8089a) was $300.
In Production:
Yeeloong 8089a (2G SSD, 512M RAM, SM712 video, 2 USB ports)
Yeeloong 8089b (160G HD, 1G RAM, SM712 video, 3 USB ports, webcam that doesn't work)
Pre-Production:
Gdium (16G "G-Key" [USB flash on which the OS is stored, slides seamlessly into a socket under the touchpad], 512M RAM, SM502 video)
There is also the E-benton, though I'm told they royally fucked Lemote and never paid them for all the technology they borrowed. Chances are you won't see many more of their computers.
For a full desktop system instead of a netbook, there is the Fulong 2F box. It comes with an 80G hard disk and 512M RAM. Too many ports to list. Built to be the same size as a CD-ROM USB enclosure, requires a keyboard, mouse and monitor.
These all cost between $210 and $500. Mine (the 8089a) was $300.