Go Down

Topic: The VideoBlaster Hi Resolution TVout platform (Read 10 times) previous topic - next topic

fungus

#15
Nov 20, 2013, 09:31 pm Last Edit: Nov 20, 2013, 09:35 pm by fungus Reason: 1

I need to find a way to include pure AVR assembler into my functions.


You'd have to use the command line.

I think Atmel studio would work, too.

Both of those make it very difficult to distribute code to Arduino users.

Another way would be to write a little program to convert ASM to Arduino-inline-style for compiling in the Arduino IDE. If you click the "Use External Editor" box in preferences you can change the files on disk and it will reload them when you hit 'compile'.

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

janost


Another way would be to write a little program to convert ASM to Arduino-inline-style for compiling in the Arduino IDE. If you click the "Use External Editor" box in preferences you can change the files on disk and it will reload them when you hit 'compile'.


I have though of that.

janost

#17
Nov 20, 2013, 10:56 pm Last Edit: Nov 20, 2013, 11:50 pm by janost Reason: 1
I have an 8MHz pixelclock.

31500Hz Hsync is 8000000/31500=254pixels/line.
254pixels on the line makes 31 characters/line and perhaps 24-26visible.

VGA is doable.

This is not about doing some elevator or 3-axis milling machine.
This is cycle hunting.

And C++ or any other compiler is not going to work.

janost


Hi, I get this error -
const unsigned char charROM [8] [128] PROGMEM = { 0x1C , ... , 0xFF }; //Contains the PETSCII Font for characters 0-127

Expected primary-expression before '...' token

Thanks. Dave.


The format is simple.
Put 128 bytes for the first row in all your characters and then the next 128 rows and so on.

I really cant put any copyright material here even if it is as simple as a font.

fungus

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

janost

Can I use avrasm or wavrasm with ATmega328 and 644 or must I have AVR Studio 3000.0?
Am I going to strike on some mnemonics it doesnt support?

Doing AVR assembler is really fun without C and the bloated Arduino IDE.
I have based my future designs on the ATtiny85, ATmega328 and ATmega644.

But I need to know that I havent painted myself into a corner?

janost

#21
Nov 23, 2013, 12:51 am Last Edit: Nov 23, 2013, 01:24 am by janost Reason: 1
The codename for this is now AVR turbo.
I tried with the Italians to no avail.

Now its an 644 with the same footprint as an Uno but with video and selfprogramming without a PC.
It still runs on a 328, you have the code but I have to move on.

I'm discussing with Atmel.

janost

I just recieved 2 new 644 samples from Atmel for free.
I'm doing a chipboot with video, or a DOS that can do a selfprogram from a soure.

Yes, a one chip operatingsystem.

mrburnette

Quote
I need to find a way to include pure AVR assembler into my functions.


It's do-able with foo.S file name.  Take a look at RancidBacon's V-USB Arduino library for Arduino:
https://code.google.com/p/vusb-for-arduino/

Ray


fungus


Quote
I need to find a way to include pure AVR assembler into my functions.


It's do-able with foo.S file name.  Take a look at RancidBacon's V-USB Arduino library for Arduino:
https://code.google.com/p/vusb-for-arduino/


Not in the Arduino IDE it isn't.

The real problem (as I see it) is that 'normal' Arduino users all use the Arduino IDE. They aren't going to use your code if it requires a different IDE. It's pointless writing it if they aren't going to use it (assuming that's your intention...)

I just saw this page which tells you how to hack the IDE to support assembly language files:

http://www.cs.nmsu.edu/~jcook/arduino/index.php?n=Notes.AssemblyMods

I never tried it but it might be a way to develop the code. When it's all perfect you can write a little program to convert the .s file into a .cpp file.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

janost

Is it possible to define const PROGMEM  inside a void function?

That way the assembly code could be included as words?

fungus


Is it possible to define const PROGMEM  inside a void function?

That way the assembly code could be included as words?


I really doubt it.

On the other hand you could do something like:
Code: [Select]

static const byte myCode[] PROGMEM = { 1,2,3,4 };

void callMyCode()
{
  void (*myCodePtr)() = (void(*)())myCode;
  myCodePtr();
}


You'd have to make sure it's position-independent and I'm not sure how you'd interface it to C++ variables, etc.

Maybe "callMyCode()" could have just enough inline assembly language to load variables into registers before it calls the real code.

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

janost

Thanks, I'll try that.

People that don't like or understand assembler doesnt want to see the code anyway.

fungus


Thanks, I'll try that.

People that don't like or understand assembler doesnt want to see the code anyway.


True, but there are people out there who *can* read it and maybe fiddle with it to get a different resolution or data layout (or something...)

If you're going to encode it for the IDE, isn't it just as easy to convert asm->inline? All you need is a script to put " \n" around every line of asm.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

janost

#29
Nov 23, 2013, 05:23 pm Last Edit: Nov 23, 2013, 05:35 pm by janost Reason: 1

If you're going to encode it for the IDE, isn't it just as easy to convert asm->inline? All you need is a script to put " \n" around every line of asm.


Yes, I'll probably do it that way.
A simple VisualBasic program that reads my ASMfile and displays it as inline assembly.
Then just a simple cut&paste into the IDE.

Nick's C code works as it is now but to do color assembler is a must.

And with the new AVRturbo shield i'm developing, the whole videocode needs to be in the bootsection of the 644.

Go Up