Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Ideas and Projects
#1

ASM2LBP2 - Assembler to LBP2 Logic (idea)

Archive: 5 posts


I've been throwing this idea around a bit.. what do you think of it?

I want to create a Checkers AI. I feel that it is inordinately difficult to test in LBP2 (logic modifications are painful.. especially with things like this). So, I got this idea for creating an assembly language, that can be then easily translated to LBP2 logic circuit system.

This assembler would read code, like this (mockup, but it fits to the specs I've written up):


##################

MEM INT !counter #Establish an integer counter
E OUT A:5 2W !switches #Create an array of 5 of external 2-way outputs
E PROC :WAIT #Create an external procedure

##################

MOV 0,!counter #Reset counter to 0
:LOOP
MOV 1, (!switches:!counter) #Set external output [!counter] to 1/100%
ADD 1, !counter #Add 1 to the counter
CMP !counter >= 5 #Overflowing?

JIFT :END #Jump If True to :END

###################
CALL :WAIT
JMP :LOOP
###################
:END
###################
##END OF PROGRAM##
###################


.. and then translate it to a specification, which I can then use to build a logic system in LBP2. The advantages of this approach would be easy testing of complex logic (like checkers AI) - and simplicity (computer generates those tricky circuits for you).

So far, I've figured out most of the larger problems (code flow as a sequencer, external declarations for those simpler parts that do not need complex logic to operate).. but there are still several of them to be solved (how to efficiently build memory systems.. fractions are naturally far too complex, so only integers; bitwise operations - and call stack, true,compiler-solved, or non-existent?)

Could this project fly?
2012-03-25 17:39:00

Author:
OrwellianStuff
Posts: 90


Doesn't a language need an external architecture to operate within, meaning even an assembly language is too high-level to directly translate into logic gates? I'm not really following your line of thought.2012-04-02 11:51:00

Author:
Ayneh
Posts: 2454


It does need one; but my idea is to write a translator that constructs logic circuits from arbitrary assembly code. Basically, the program should know several strategies to represent certain assembly code as LBP2 logic circuits, and draw out suitable diagrams for the user to build them out by hand in LBP2 (since the assembler cannot do it automatically).

These strategies could include things like representing assembly commands as logic chips on a sequencer; or more simple ones as simple static logic circuits, which would be quicker - but not as flexible in terms of usability. The biggest problem is then what tactic we should use for which ASM sequences.

I hope this cleared up it a bit
2012-04-04 19:49:00

Author:
OrwellianStuff
Posts: 90


It would be nice, but I think this will turn out to be to complex to build in lbp2. Just because the amounts of logic you need to let this work fine.2012-04-05 07:28:00

Author:
Fotografht
Posts: 57


Could this project fly?

I'm sure you could make it work, but who exactly is your target audience?

There's probably very few people who'd be prepared to invest the time into learning such an arcane language when they can just grab various pre-made gizmos from levels like the Creator's Toolkit (http://lbp.me/v/8s5ec2) and glue them together.

A slightly more accessible project I'd considered taking on was a combinational logic minimization tool. The idea being you select a number of inputs and outputs, fill in the truth table (including "don't care" states), and it generates the most thermo-efficient logic circuit which implements that function.

I'm sure there already exist such tools for real-world electronics, but they're probably optimized for minimum transistor use, which doesn't quite match LBP's thermo use, and something like a priority encoder (http://en.wikipedia.org/wiki/Priority_encoder) could be greatly simplified using a selector.
2012-04-05 10:47:00

Author:
Aya042
Posts: 2870


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.