 |
What can I do to help with Loongson support?
Author |
Message |
D--
Rookie
Joined: Sat Feb 07, 2009 2:59 pm Posts: 17 Location: Chaoyang District, Beijing, China
|
 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?
|
Mon Feb 09, 2009 9:32 am |
|
 |
Thristian
Hazed
Joined: Tue Feb 07, 2006 11:02 am Posts: 76
|
 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.
He's pretty responsive to posts in his thread in the SNES9x forums.
|
Mon Feb 09, 2009 9:49 am |
|
 |
D--
Rookie
Joined: Sat Feb 07, 2009 2:59 pm Posts: 17 Location: Chaoyang District, Beijing, China
|
Just providing the information. byuu and I talk regularly and he has mentioned an interest in Loongson support. I just wanted to get this down somewhere public so there would be more people providing input than our two-man AIM chats.
|
Mon Feb 09, 2009 11:10 am |
|
 |
Verdauga Greeneyes
Regular
Joined: Tue Mar 07, 2006 10:32 am Posts: 347 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)
|
Mon Feb 09, 2009 11:12 am |
|
 |
byuu
|

Appreciate the help. 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.
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.
|
Mon Feb 09, 2009 5:20 pm |
|
 |
ZH/Franky
|
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/
|
Mon Feb 09, 2009 7:33 pm |
|
 |
byuu
|
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.
|
Mon Feb 09, 2009 8:49 pm |
|
 |
D--
Rookie
Joined: Sat Feb 07, 2009 2:59 pm Posts: 17 Location: Chaoyang District, Beijing, China
|

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.
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 building  Maybe I'll try it again with absolutely no gcc optimizations to see if it's even possible.
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?
|
Tue Feb 10, 2009 10:51 am |
|
 |
ZH/Franky
|
Oh, you're Derrick Sobodash? Well, hey there
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.
|
Tue Feb 10, 2009 12:47 pm |
|
 |
D--
Rookie
Joined: Sat Feb 07, 2009 2:59 pm Posts: 17 Location: Chaoyang District, Beijing, China
|
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?
|
Tue Feb 10, 2009 5:47 pm |
|
 |
DataPath
Lurker
Joined: Wed Jul 28, 2004 1:35 am Posts: 128
|
|
Tue Feb 10, 2009 6:26 pm |
|
 |
ZH/Franky
|
<|>_<_>_<|>
Let me guess, the Spoony-bard instruction set?
|
Tue Feb 10, 2009 6:48 pm |
|
 |
Panzer88
Inmate
Joined: Thu Jan 11, 2007 4:28 am Posts: 1485 Location: Salem, Oregon
|
good to see you around D.
_________________
|
Tue Feb 10, 2009 8:15 pm |
|
 |
D--
Rookie
Joined: Sat Feb 07, 2009 2:59 pm Posts: 17 Location: Chaoyang District, Beijing, China
|
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.
|
Tue Feb 10, 2009 8:16 pm |
|
 |
adventure_of_link
Locksmith of Hyrule
Joined: Sun Aug 08, 2004 7:49 am Posts: 3634 Location: 255.255.255.255
|
Eh, it's just Franky
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.
|
Tue Feb 10, 2009 8:27 pm |
|
 |
franpa
Gecko snack
Joined: Sun Aug 21, 2005 11:06 am Posts: 2372 Location: Australia, QLD
|
Why did Franky change username? to "somehow" hide away from all the negativity he has gotten ever since joining here?
_________________ Core i7 920 @ 2.66GHZ | ASUS P6T Motherboard | 8GB DDR3 1600 RAM | Gigabyte Geforce 760 4GB | Windows 10 Pro x64
|
Wed Feb 11, 2009 2:34 am |
|
 |
ZH/Franky
|
Fuck you. I just wanted a better name, and ZH sounded cool.
Like I give a shit what you guys think of me anyway.
|
Wed Feb 11, 2009 2:53 am |
|
 |
kick
Trooper
Joined: Wed Mar 01, 2006 8:47 pm Posts: 550
|
ZH = Chinese
_________________ Have a nice kick in da nutz @~@* c//
|
Wed Feb 11, 2009 3:10 am |
|
 |
gllt
NO VOWELS >:[
Joined: Sun Aug 31, 2008 12:59 pm Posts: 753 Location: ALABAMA
|
he says it means Zero Hero
but yeah ZH is for Chinese, lol
in after TL Note
|
Wed Feb 11, 2009 3:48 am |
|
 |
D--
Rookie
Joined: Sat Feb 07, 2009 2:59 pm Posts: 17 Location: Chaoyang District, Beijing, China
|
ZHongwen.
And stop derailing my damn thread 
|
Wed Feb 11, 2009 5:19 am |
|
 |
Gil_Hamilton
Buzzkill Gil
Joined: Wed Jan 12, 2005 7:14 pm Posts: 4250
|
I'd just like to say you have the best avatar ever, before this gets back on track.
|
Wed Feb 11, 2009 5:41 am |
|
 |
adventure_of_link
Locksmith of Hyrule
Joined: Sun Aug 08, 2004 7:49 am Posts: 3634 Location: 255.255.255.255
|
Fixed, also explains a lot..
_________________
<Nach> so why don't the two of you get your own room and leave us alone with this stupidity of yours?
NSRT here.
|
Wed Feb 11, 2009 5:59 am |
|
 |
funkyass
"God"
Joined: Tue Jul 27, 2004 11:24 pm Posts: 1128
|
you have no clue what a weeaboo is do you?
_________________ Does [Kevin] Smith masturbate with steel wool too?
- Yes, but don’t change the subject.
|
Wed Feb 11, 2009 6:15 am |
|
 |
gllt
NO VOWELS >:[
Joined: Sun Aug 31, 2008 12:59 pm Posts: 753 Location: ALABAMA
|
Derail; AoL postcount + butar > your postcount
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!
|
Wed Feb 11, 2009 7:28 am |
|
 |
D--
Rookie
Joined: Sat Feb 07, 2009 2:59 pm Posts: 17 Location: Chaoyang District, Beijing, China
|

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.
|
Wed Feb 11, 2009 8:22 am |
|
|
Who is online |
Users browsing this forum: No registered users and 2 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum
|
|
 |
|