flat assembler
Message board for the users of flat assembler.

Index > Non-x86 architectures > Raspberry Pi

Goto page Previous  1, 2, 3, 4
Author
Thread Post new topic Reply to topic
kalambong



Joined: 08 Nov 2008
Posts: 165
kalambong
I suspect the gooseberry is nothing other than a reference design which ARM provides to white box cellphone manufacturers in China and India
Post 22 Jul 2012, 02:10
View user's profile Send private message Reply with quote
farrier



Joined: 26 Aug 2004
Posts: 274
Location: North Central Mississippi
farrier

_________________
Some Assembly Required
It's a good day to code!
U.S.Constitution; Bill of Rights; Amendment 1:
... the right of the people peaceably to assemble, ...
The code is dark, and full of errors!
Post 22 Jul 2012, 06:15
View user's profile Send private message Reply with quote
farrier



Joined: 26 Aug 2004
Posts: 274
Location: North Central Mississippi
farrier
An interview with a founder and principal in the Raspberry Pi project.

Eben Upton

http://twit.tv/show/triangulation/61

Get the video version to see some of the user generated cases.

Why the name?

Why are there no version A's available?

Version 60 of this series was with Nolan Bushnell of Atari.

farrier

_________________
Some Assembly Required
It's a good day to code!
U.S.Constitution; Bill of Rights; Amendment 1:
... the right of the people peaceably to assemble, ...
The code is dark, and full of errors!
Post 23 Jul 2012, 00:56
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
I have uploaded a new tutorial (3) using DexBasic in bare metal on the Pi.
http://www.dex-os.com/DexBasic/Lesson3.htm

This tutorial is on using the GPIO's.
I will update the language part of the site tomorrow with the new functions.

Note: I have implement the functions to be the same as the equivalent Arduino commands, so anyone who as programmed the arduino or tut available for the arduino, will be easy to convert.
Post 31 Jul 2012, 21:02
View user's profile Send private message Reply with quote
kalambong



Joined: 08 Nov 2008
Posts: 165
kalambong
Now they are claiming that Raspian OS runs 40% faster than Debian

http://techpp.com/2012/07/18/download-raspbian-os/
Post 01 Aug 2012, 07:11
View user's profile Send private message Reply with quote
Tonymac32



Joined: 30 Nov 2009
Posts: 13
Tonymac32
Linux: Jack of all trades, master of none. I definitely respect the Linux project on their flexibility and the amount of resources they've brought to open source software. Without extensive optimization (as is the case with Raspian OS), however, Linux usually is a lackluster stopgap sort of operating system, rarely the most efficient use of any particular hardware. I'm glad to see they're working on optimizing Linux for their particular hardware, it will definitly result in a much more functional device.

_________________
If it's got bits, I'll byte.

http://speedofdark.us
Post 21 Aug 2012, 15:02
View user's profile Send private message Reply with quote
malpolud



Joined: 18 Jul 2011
Posts: 344
Location: Broken hippocampus
malpolud
I glanced at your webpage and it seems I've been looking for something like DexBasic. Cool, I'll check it out.
Post 28 Aug 2012, 14:30
View user's profile Send private message Visit poster's website Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
malpolud wrote:
I glanced at your webpage and it seems I've been looking for something like DexBasic. Cool, I'll check it out.
Let me know how you get on, i have done many more tuts, but have not uploaded them yet.
Also working on a add-on board for OS dev's, that adds keyboard and mouse support to the pi, without the need to write usb stack.
Post 28 Aug 2012, 18:51
View user's profile Send private message Reply with quote
f2



Joined: 30 May 2010
Posts: 13
Location: France
f2
Great job, Dex! That give me the idea to restart osdeving again Smile

I'm curious to see the source code of the OS... just to know how it is made... Wink
Post 29 Aug 2012, 22:03
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
f2 wrote:
Great job, Dex! That give me the idea to restart osdeving again Smile

I'm curious to see the source code of the OS... just to know how it is made... Wink

Thanks f2, You do not need to wait long, as once my pcb to add ps2 keyboard/mouse support to the pi, are done i will be releasing code Wink.
Post 30 Aug 2012, 14:58
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
Great link for bare metal raspberry pi coders http://www.cl.cam.ac.uk/freshers/raspberrypi/tutorials/os/
Post 02 Sep 2012, 20:05
View user's profile Send private message Reply with quote
f2



Joined: 30 May 2010
Posts: 13
Location: France
f2
Dex4u wrote:
Great link for bare metal raspberry pi coders http://www.cl.cam.ac.uk/freshers/raspberrypi/tutorials/os/

Thank you for the link, Dex. This website contains all the things I needed to start coding for the RasPi.
Post 02 Sep 2012, 20:50
View user's profile Send private message Reply with quote
kalambong



Joined: 08 Nov 2008
Posts: 165
kalambong
http://www.cl.cam.ac.uk/freshers/raspberrypi/tutorials/os/

University of Cambridge is offering a 12-step online course on Ras-Pi

The course, Baking Pi - Operating Systems Development, is aimed at students of 16 and over with some prior programming experience, "although younger readers may still find some of it accessible, particularly with assistance"
Post 04 Sep 2012, 04:51
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
kalambong wrote:
http://www.cl.cam.ac.uk/freshers/raspberrypi/tutorials/os/

University of Cambridge is offering a 12-step online course on Ras-Pi

The course, Baking Pi - Operating Systems Development, is aimed at students of 16 and over with some prior programming experience, "although younger readers may still find some of it accessible, particularly with assistance"

Thats what the above link is to Wink
Post 04 Sep 2012, 12:33
View user's profile Send private message Reply with quote
krom



Joined: 05 Jun 2012
Posts: 13
krom
Hi All,
I am releasing my Mandelbrot fractal code as it will show you how to turn on the Floating Point unit of the Raspberry Pi.
Rename this source code to kernel.asm and compile it with FASMARM to create a 408byte kernel.img file =D
Code:
; Raspberry Pi 'Bare Metal' Mandelbrot Fractal Demo:
; 1. Turn on Vector Floating Point Unit
; 2. Setup Frame Buffer
; 3. Plot Fractal using Double-Precision
;
; Developers:
; Dex (Craig Bamford) - Original Frame Buffer Code
; krom (Peter Lemon) - Optimized Frame Buffer & Fractal Code
;
; Thanks to revolution for the FASMARM Assembler: http://arm.flatassembler.net/
;
; To Run:
; Copy kernel.img to SD-Card (bootcode.bin, loader.bin, start.elf are also required)
; For best results create a config.txt file that contains the line: disable_overscan=1
;
; For HDMI video output you can add config.txt lines to force a specific HDMI mode:
; hdmi_group=2, hdmi_mode=16

format binary as 'img'

; Setup Frame Buffer
SCREEN_X       = 640
SCREEN_Y       = 480
BITS_PER_PIXEL = 32

; Setup VFP
VFPEnable = $40000000
VFPSingle = $300000
VFPDouble = $C00000

org $8000

; Enable Vector Floating Point Calculations
mrc p15,0,r0,c1,c0,2 ; R0 = Access Control Register
orr r0,VFPSingle + VFPDouble ; Enable Single & Double Precision
mcr p15,0,r0,c1,c0,2 ; Access Control Register = R0
mov r0,VFPEnable ; Enable VFP
fmxr fpexc,r0 ; FPEXC = R0

FB_Init:
  adr r0,FB_STRUCT
  orr r0,1 ; MAIL_FB
  ldr r1,[MB_WRITE]
  str r0,[r1] ; Mail Box Write

MBox_Read:
  ldr r1,[MB_READ]
  ldr r0,[r1]
  and r0,$F ; Load Channel Number
  cmp r0,1 ; Compare Frame Buffer Channel 1
  bne MBox_Read ; Wait For Frame Buffer Channel 1 Data

  ldr r0,[FB_POINTER] ; R0 = Frame Buffer Pointer
  cmp r0,0 ; Compare Frame Buffer Pointer to Zero
  beq FB_Init ; IF Zero Re-Initialize Frame Buffer

ldr r1,[LAST_PIXEL]
add r0,r1 ; R0 = Frame Buffer Pointer Last Pixel

mov r1,SCREEN_X ; Load Double Screen X
fmsr s31,r1
fsitod d0,s31 ; D0 = X%
fcpyd d2,d0   ; D2 = SX

mov r1,SCREEN_Y ; Load Double Screen Y
fmsr s31,r1
fsitod d1,s31 ; D1 = Y%
fcpyd d3,d1   ; D3 = SY

fldd d4,[XMAX] ; D4 = XMax
fldd d5,[YMAX] ; D5 = YMax
fldd d6,[XMIN] ; D6 = XMin
fldd d7,[YMIN] ; D7 = YMin
fldd d8,[RMAX] ; D8 = RMax
fldd d9,[ONE]  ; D9 = 1.0

ldr r12,[COL_MUL] ; R12 = Multiply Colour

LoopY:
  fcpyd d0,d2 ; D0 = X%
  LoopX:
    fsubd d10,d4,d6 ; CX = XMin + ((X% * (XMax - XMin)) / SX)
    fmuld d10,d0
    fdivd d10,d2
    faddd d10,d6 ; D10 = CX

    fsubd d11,d5,d7 ; CY = YMin + ((Y% * (YMax - YMin)) / SY)
    fmuld d11,d1
    fdivd d11,d3
    faddd d11,d7 ; D11 = CY

    mov r1,192 ; R1 = IT (Iterations)
    fsubd d12,d12 ; D12 = ZX
    fsubd d13,d13 ; D13 = ZY

    Iterate:
      fmuld d14,d13,d13 ; XN = ((ZX * ZX) - (ZY * ZY)) + CX
      fmscd d14,d12,d12
      faddd d14,d10 ; D14 = XN

      fmuld d15,d12,d13 ; YN = (2 * ZX * ZY) + CY
      faddd d15,d15
      faddd d15,d11 ; D15 = YN

      fcpyd d12,d14 ; Copy XN & YN To ZX & ZY For Next Iteration
      fcpyd d13,d15

      fmuld d14,d12,d12 ; R = (XN * XN) + (YN * YN)
      fmacd d14,d13,d13 ; D14 = R

      fcmpd d14,d8 ; IF R > 4 THEN GOTO Plot
      fmstat
      bgt Plot

      subs r1,1 ; IT -= 1
      bne Iterate ; IF IT != 0 THEN GOTO Iterate

    Plot:
      mul r1,r12 ; R1 = Pixel Colour
      orr r1,$FF000000 ; Force Alpha To $FF
      str r1,[r0],-4 ; Store Pixel Colour into the Frame Buffer

      fsubd d0,d9 ; Decrement X%
      fcmpzd d0
      fmstat
      bne LoopX ; IF X% != 0 LoopX

      fsubd d1,d9 ; Decrement Y%
      fcmpzd d1
      fmstat
      bne LoopY ; IF Y% != 0 LoopY

Loop:
  b Loop

XMAX: dd 1.0
YMAX: dd 1.0
XMIN: dd -2.0
YMIN: dd -1.0
RMAX: dd 4.0
ONE:  dd 1.0

COL_MUL: dw $231AF9 ; Multiply Colour
LAST_PIXEL: dw (SCREEN_X * SCREEN_Y * (BITS_PER_PIXEL / 8)) - (BITS_PER_PIXEL / 8)

MB_READ:  dw $2000B880 ; PERIPHERAL_BASE + MAIL_BASE + MAIL_READ
MB_WRITE: dw $2000B8A1 ; PERIPHERAL_BASE + MAIL_BASE + MAIL_WRITE + MAIL_FB

align 16
FB_STRUCT: ; Frame Buffer Structure
  dw SCREEN_X ; Frame Buffer Pixel Width
  dw SCREEN_Y ; Frame Buffer Pixel Height
  dw SCREEN_X ; Frame Buffer Virtual Pixel Width
  dw SCREEN_Y ; Frame Buffer Virtual Pixel Height
  dw 0 ; Frame Buffer Pitch (Set By GPU)
  dw BITS_PER_PIXEL ; Frame Buffer Bits Per Pixel
  dw 0 ; Frame Buffer Offset In X Direction
  dw 0 ; Frame Buffer Offset In Y Direction
FB_POINTER:
  dw 0 ; Frame Buffer Pointer (Set By GPU)
  dw 0 ; Frame Buffer Size (Set By GPU)    
Post 04 Sep 2012, 17:03
View user's profile Send private message Visit poster's website Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
Here is the latest DexOS port to the Pi, you will need a usb keyboard pluged in to test it.
http://www.dex-os.com/MinDos/PiDexOS.zip

Its not finished yet, but it gives you a idea of what its like.
Just format a SD card to fat32 and add the files from boot folder and the kernel.img and start you pi.
Menu keys are enter, left, right arrow key and type help in cli.
Note: Not all usb keyboards work about 50% so far.
Post 10 Sep 2012, 14:28
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
The source code (fasmarm) to the RPI port, is now open source:
http://www.dex-os.com/DexOS_R_PI/DexBasicSource.zip
Post 31 Dec 2012, 17:51
View user's profile Send private message Reply with quote
krom



Joined: 05 Jun 2012
Posts: 13
krom
I have made a Git Hub for all my complete R-Pi projects in bare metal:
https://github.com/PeterLemon/RaspberryPi

This includes minimal Hello World CPU & DMA Demos, Tags Channel Demo, VFP Fractal Demos, NES & SNES Input Demos & Sound Demos.

Screenshots of Input Demos:
https://github.com/PeterLemon/RaspberryPi/blob/master/Input/NES/Controller/NESController.png
https://github.com/PeterLemon/RaspberryPi/blob/master/Input/SNES/Controller/SNESController.png

I have more to come:
N64,PSX,PS2 Controller & SNES Mouse input.
VFP software 3D engine.
& some other surprises!!
This should be a nice start...

I hope this helps people out =D
Post 04 Mar 2013, 21:21
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3, 4

< Last Thread | Next Thread >
Forum Rules:
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
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.