Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  C64 Plugin
« previous next »
  • Print
Pages: [1] 2

Author Topic: C64 Plugin  (Read 7182 times)

Offline jensu

  • Member
  • *
  • Posts: 10
C64 Plugin
« on: October 08, 2008, 05:38:54 AM »
hi folks!

i currently developing an c64 plugin and i need a bit of input regarding the keymappings. the plugin would be in the first place for targets with the necessary display size of 320x200 minimum (e.g. ipod video, meizu), but could later, if it works of course, scaled down to fit on other targets too. i own a meizu m6 and there are only 4 buttons (probably for up/left/right/down) and a touchpad (slice up/down and touch).
i've got the following ideas:
- to draw a virtual keyboard to make inputs in basic mode (attached a first pic of the sim with test drawing)
- to keep an array with all keys and the user can scroll (with the slider e.g.) to the one he wants to press, and touch to make the input (only one key visible, needs less space)
- to the joystick input (for in game use) the user can switch to (with special key select, or 2 buttons pressed at the same time) or this input is parallel the whole time with up/down/left/right (not sure about problems)

has someone maybe another better idea  (best would be the connect an usb keyboard :) as far as i know the samsung chip in the m6 would support the usb 1.1 host mode, but not sure if the rest of the hardware would provide this too)?
and has someone already tried to write such a plugin?
i've read a lot over the last days about the c64, very interesting (it was my first computer) reminds me on the old times... :)
cheers
jens

* sim_c64keys.jpg (51.86 kB, 446x346 - viewed 374 times.)
« Last Edit: October 08, 2008, 05:41:42 AM by jensu »
Logged

Offline GodEater

  • Member
  • *
  • Posts: 2829
Re: C64 Plugin
« Reply #1 on: October 08, 2008, 07:16:10 AM »
Why not just use the already existing Rockbox virtual keyboard, instead of inventing your own ?
Logged

Read The Manual Please

Offline LambdaCalculus

  • Member
  • *
  • Posts: 2257
  • Dreaming of Turing Machines...
    • The Nostalgia Roadtrip
Re: C64 Plugin
« Reply #2 on: October 08, 2008, 07:39:19 AM »
Quote from: GodEater on October 08, 2008, 07:16:10 AM
Why not just use the already existing Rockbox virtual keyboard, instead of inventing your own ?

For the virutal keyboard, take a look at Zxbox and see how the virtual keyboard is handled in that. Also, you can have the graphics scaled to fit various sized screen... again, see how plugins like Zxbox, Doom, and Rockboy do it. (the video and Meizu are 320x240 by the way; thought I'd let you know. ;))
Logged
Former Rockbox dev. Rising from the ashes...

Players: iPod Video /w 128GB SSD mod, H320 /w 128GB SSD mod

Offline jensu

  • Member
  • *
  • Posts: 10
Re: C64 Plugin
« Reply #3 on: October 08, 2008, 08:03:04 AM »
Quote
For the virutal keyboard, take a look at Zxbox and see how the virtual keyboard is handled in that.
ok, i'll check this. but the keyboard of the c64 includes some special keys like RUN/STOP, RESTORE,...

Quote
Also, you can have the graphics scaled to fit various sized screen... again, see how plugins like Zxbox, Doom, and Rockboy do it.
ok thanks. i'll check this too.

Quote
(the video and Meizu are 320x240 by the way; thought I'd let you know. Wink)
thanks :) but of course i already know this. the visible area of the c64 screen is exactly 320x200 without the border (except 24 row or 38 column modes, user for screen scrolling). maybe i'll add a line at the top and bottom to show the border color... just for the feeling  ;)

first of all i've to get the thing running in stm mode (standard text mode) with the basic interpreter.

cheers
jens


--
thx --> thanks
« Last Edit: October 09, 2008, 11:36:30 AM by Chronon »
Logged

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
Re: C64 Plugin
« Reply #4 on: October 08, 2008, 08:54:57 AM »
Quote from: jensu on October 08, 2008, 08:03:04 AM
Quote
For the virutal keyboard, take a look at Zxbox and see how the virtual keyboard is handled in that.
ok, i'll check this. but the keyboard of the c64 includes some special keys like RUN/STOP, RESTORE,...
The virtual keyboard can be customised (http://www.rockbox.org/twiki/bin/view/Main/LoadableKeyboardLayouts), although you'll still be limited to single-character selections, so RESTORE would still be a problem, but you could substitute some fancy unicode character (à´² for instance) for it...
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

Offline FirleFanz

  • Member
  • *
  • Posts: 25
Re: C64 Plugin
« Reply #5 on: October 08, 2008, 09:36:09 AM »
I would like sometimg like a Icons and no typing the C62 load commands...

Maybe a mainfolder and for every game/prog a folder in it with a Icon, a loadscript and the Programm. So that the Plugin only shows the Icons and you choise the Icon. then the Script will load the Programm.

IMO it is more Touchscreen compliant - in the second stage a Vkeyboard!

Please the time of little textmenüs is over ;)
Logged

Offline AlexP

  • Global Moderator
  • Member
  • *
  • Posts: 3688
  • ex-BigBambi
Re: C64 Plugin
« Reply #6 on: October 09, 2008, 04:16:17 AM »
Quote from: FirleFanz on October 08, 2008, 09:36:09 AM
IMO it is more Touchscreen compliant - in the second stage a Vkeyboard!

Please the time of little textmenüs is over ;)


Rockbox doesn't run on any touch screen targets.  In the future it may do, but the vast majority will still be button based.
Logged
H140, F60, S120, e260, c240, Clip, Fuze v2, Connect, MP170, Meizu M3, Nano 1G, Android

Offline jensu

  • Member
  • *
  • Posts: 10
Re: C64 Plugin
« Reply #7 on: October 09, 2008, 08:43:11 AM »
i'm still not sure about the input yet.
i don't think that i'll support to load programs with LOAD "$",8,1 and so on. i would have to emulate a device like a floppy drive too. the idea with a list (or icons) is good. would be a easy way to get different programs loaded.
i finished the memory management (bank switching, blending of rom images in the 64 kb range etc.) and the interpeter seems to work with the standart text mode (i've filled the keyboard queue just for the test).
next i'll try to load a game into ram and start it. then i'll see if the ram works like i expected and what gfx mode i've to implement next (there're 5 valid gfx modes). besides the VIC gfx chip are more chips to emulate, CIA for i/o and timer, and SID for audio (the audio i'll move to the end, first i'm concentrating on the gfx :) ).
cheers
jens

* sim_c64_basic.jpg (42.37 kB, 348x298 - viewed 293 times.)
Logged

Offline LambdaCalculus

  • Member
  • *
  • Posts: 2257
  • Dreaming of Turing Machines...
    • The Nostalgia Roadtrip
Re: C64 Plugin
« Reply #8 on: October 09, 2008, 08:51:24 AM »
Even though this plugin is still at an early stage, you should consider posting a patch on Flyspray so that others can help test the patch and provide feedback. This will also help you get the patch done a little faster.

Although disk images may be a little harder to load, cassette images can be loaded in a similar fashion to Zxbox; on the Zxbox plugin menu, there's an option to play/pause the tape. Check out the source to see how it's handled.

Lastly, the Gigabeat F/X and S have 240x320 portrait-oriented screens, but you can apply the 90 degree rotation function (see Doom) to display the C64 screen correctly. The Gigabeats are some of the fastest targets we support, and this will help C64 emulation immensely.
« Last Edit: October 09, 2008, 08:53:54 AM by LambdaCalculus379 »
Logged
Former Rockbox dev. Rising from the ashes...

Players: iPod Video /w 128GB SSD mod, H320 /w 128GB SSD mod

Offline insanepotato

  • Member
  • *
  • Posts: 21
Re: C64 Plugin
« Reply #9 on: October 10, 2008, 05:52:15 PM »
Wow, I'm so excited. I didn't expect anybody to be bothered to make a c64 emulator. Hope it turns out well, can't wait  ;D
Logged

Offline jensu

  • Member
  • *
  • Posts: 10
Re: C64 Plugin
« Reply #10 on: October 12, 2008, 05:56:55 PM »
thanks for the infos LambdaCalculus379. good to know about this 90° rotation function. maybe the buttons should be rotated too  ;D
i've made a good progress over the last days. i was able to load a few programs (prg or p00 files) directly into the ram and to run these. thus i could test the 3 new implemented gfx modes (multicolor text,standard bitmap and multicolor bitmap) and the use of the 8 sprites in single and multicolor. seems to be working so far, even i'm not satisfied with the current timing (and i draw the whole frame at one time, later i should change this to draw line per line).
as soon as i finished the input issue i'll consider to post this as a patch on flyspray (do i have to register again? i could not login with this account).
and can someone tell me please, where to get all the defines (player,buttons, display)? is there maybe an overview about this somewhere?
cheers
jens

* sim_c64_gfxmodes.jpg (102.92 kB, 1379x277 - viewed 322 times.)
Logged

Offline jcompton

  • Member
  • *
  • Posts: 2
Re: C64 Plugin
« Reply #11 on: October 14, 2008, 01:22:49 PM »
Are you developing your own C64 emulator from scratch? I would have expected that, say, the highly portable Frodo would have been a logical starting point for a Rockbox implementation...
Logged

Offline jensu

  • Member
  • *
  • Posts: 10
Re: C64 Plugin
« Reply #12 on: October 14, 2008, 02:55:09 PM »
the basis i'm using is the m6502 emu sourcecode from Marat Fayzullin http://fms.komkon.org/EMUL8/ (free for any non-profit purposes). so i don't need to bother with opcodes, i can use an exec or run function and can overload the read/write function for ram/rom access. there is more work to do (VIC,CIA,SID), but this is kind of fun and i like to do this by myself, because a couple of years ago i wrote programs for the c64. and now i've to provide this functionality i've used years ago from side of the emulated hardware...
jens
Logged

Offline Chronon

  • Rockbox Expert
  • Member
  • *
  • Posts: 4379
Re: C64 Plugin
« Reply #13 on: October 14, 2008, 03:03:20 PM »
It needs to be GPL if you want it accepted into SVN.  From the site that you linked:
Quote
The above license terms are incompatible with GPL. Thus, you should avoid making the source code from this page and any derived code part of a GPLed project.

--
It also appears that Frodo, besides being C++, may not be GPL compatible either.  They offer their source code, but they don't make it clear under what license.  It's a bad sign that they refer to it as freeware.
« Last Edit: October 14, 2008, 03:08:09 PM by Chronon »
Logged
Sansa e280, Gigabeat F40, Gigabeat S60, Sansa Clip+, iPod Mini 2g

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: C64 Plugin
« Reply #14 on: October 14, 2008, 03:07:09 PM »
It needs to be GPL if you plan to share it with anyone else, at all, since Rockbox is GPL, whether or not you're interested in getting it into SVN.
Logged

  • Print
Pages: [1] 2
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  C64 Plugin
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.128 seconds with 14 queries.