Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Keoni29

Pages: 1 ... 16 17 [18] 19 20 ... 168
256
Music Showcase / Re: new NES music
« on: July 17, 2014, 08:10:51 am »
The silver surfer soundtrack is awesome. Why didn't I listen to it before?

257
Music Showcase / Re: new NES music
« on: July 17, 2014, 06:41:57 am »
New one: [Insert name here]
I have to come up with a name.

258
Introduce Yourself! / Re: Hello,World!
« on: July 16, 2014, 10:00:28 am »
Hey ShenZhen is where I get all of my components from :) What's it like there?

259
It's a good idea to make backups of your device regularly when you are developing software. You can just fall back on a backup in case of a fatal reset.

260
HP Calculators / Re: Let's hack the HP Prime!
« on: July 14, 2014, 06:06:12 pm »
But why would a swap partition be called HP calc dev?

261
HP Calculators / Re: Let's hack the HP Prime!
« on: July 14, 2014, 05:25:17 pm »
Perhaps it's a place for us to put our own software on :3 (it's a stretch)

262
HP Calculators / Re: Let's hack the HP Prime!
« on: July 14, 2014, 05:12:37 pm »
Welcome to omnimaga!

Does this partition contain any files?

263
Web Programming and Design / Re: Blog Redesign - 8times8
« on: July 13, 2014, 07:24:10 am »
Nah this was an iframe in the article content. It is not used in the structure of the website.
Edit: Fixed links to articles as well. Used a preg_replace to convert the old url's to link to the new blog.

264
Web Programming and Design / Re: Blog Redesign - 8times8
« on: July 13, 2014, 07:21:13 am »
That was because of an unclosed iframe tag in the article. Fixed it.

265
Web Programming and Design / 8times8 archive online
« on: July 13, 2014, 07:17:00 am »

Major update:
+ Visual overhaul
+ Added archive section that includes all of my old blog posts.http://8times8.eeems.me:81/blog/index.php?archive
Some links and images might be broken. I am working on that.
+ New subdomain thanks to eeems! ;D

266
Sounds cool :) I usually code up silly optimized things during summer break (because too much spare time), so this is right up my alley!

267
Web Programming and Design / Re: js - Relative Jump Calculator
« on: July 12, 2014, 12:17:12 pm »
Good idea. I was thinking about that actually. I am going to implement it in the regex which will also get rid of inputs like: Derp and asdf, cause javascript just parses the hexadecimal number until it sees a character that is not valid and spits out the result.

268
Web Programming and Design / Re: js - Relative Jump Calculator
« on: July 12, 2014, 10:31:55 am »
Oops there was a typo in that jsfiddle. Updated version: http://jsfiddle.net/4h5YD/20/

269
Other / Re: C64 Programming Adventures
« on: July 12, 2014, 10:02:39 am »
Program for drawing blocks on the screen:
Code: [Select]
// Draw blocks on screen
// Author:      Koen van Vliet
// Date:      12 Jul 2014
//
// Notes:
// *   Use kickassembler to assemble

//=================================================
// B A S I C  S Y S ()
//=================================================
.pc =$0801 "Basic Upstart Program"
:BasicUpstart(main)
//=================================================
// M A I N
//=================================================
.pc = $0820
main:
      jsr $E544            // Kernal routine: Clear screen
      sei                  // Disable interrupts
      // Black block
      :fillBlock($0400,4,16,10,6,35)
      :fillBlock($D800,4,16,10,6,0)
      // Green block
      :fillBlock($0400,11,1,18,23,224)
      :fillBlock($D800,11,1,18,23,13)
      // White block
      :fillBlock($0400,16,6,20,6,0)
      :fillBlock($D800,16,6,20,6,1)
      cli                  // Enable interrupts
      rts                  // Return to Basic
//=================================================
// M A C R O 'S
//=================================================
// Routine: fillBlock
//       Fills a rectangular block in memory with one value
.macro fillBlock(base,col,row,w,h,val){
      .const addr = base + 40 * row + col - 1
      lda #<addr            // Set up parameters         
      sta mod_b_addr + 1
      lda #>addr         
      sta mod_b_addr + 2
      lda #w
      sta mod_b_w + 1
      lda #h
      sta mod_b_h + 1
      lda #val
      sta mod_b_v + 1
      jsr fill_block         // Draw a block on screen
}
//=================================================
// R O U T I N E S
//=================================================
// Routine: fill block
//       Fills a rectangular block in memory with one value
//
// Input: Modify parameters by modifying operands.
//         Preferably use the macro for this
// Output: -
// Notes:
// *   Intended for filling blocks in screen/color ram.
//      Assumes 40 bytes per row.
// *   Does not clip outside of screen area.
fill_block:
   mod_b_h:
      ldy #$08            // Operand is modified by program.
loop_row:                  // Default value given to make this
   mod_b_w:
      ldx #$08            // Operand is modified by program.
loop_col:
   mod_b_v:
      lda #224            // Fill block with single value.
   mod_b_addr:               // Operand is modified by program.
      sta $FFFF,x             // Write character to screen. Operand is
      dex                  // modified by program.
      bne loop_col

      clc
      lda #40
      adc mod_b_addr + 1      // Modify operand low byte
      sta mod_b_addr + 1
      lda #0
      adc mod_b_addr + 2      // Modify operand high byte
      sta mod_b_addr + 2

      dey
      bne loop_row
      rts


You can draw blocks at any memory location. You must specify the base address  of the ram area you want to use.
To draw a block of characters on the screen the base address is $0400
To change the color you simply fill a block in color ram. The base address for color ram is $D800

270
Web Programming and Design / Calculator applet from url
« on: July 11, 2014, 03:21:14 pm »
Inspired by haroldbot, regular expressions and javascript applets for converting hex to decimal I introduce: Calculator applet generator.


I have not coded it up but this is what is might look like.
Example: Relative jump calculator applet:
Code: [Select]
1x(0..65535)  "Jump From:",
2x(0..65535)  "To:",
0x(-127..128) "Offset:"
:$2 - $1 [ ! - 2]


This describes the following applet:

Jump From:
[Hexadecimal input] (range 16 bits)
To:
[Hexadecimal input] (range 16 bits)
Enable -2? [Yes]

Offset:
[Hexadecimal output] (range 8 bits signed)


The url to this applet would look like this: mypage.com/?d='1x(0..65535)  "Jump From:",2x(0..65535)  "To:",0x(-127..128) "Offset:" :$2 - $1 [ ! - 2]'

What do you think?

Pages: 1 ... 16 17 [18] 19 20 ... 168