Commodore 64 (C64) Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
CBM prg Studio
Goto page Previous  1, 2, 3 ... 8, 9, 10 ... 14, 15, 16  Next
 
Post new topic   Reply to topic    Commodore 64 (C64) Forum Index -> New Releases
View previous topic :: View next topic  
Author Message
e5frog
Immortal Grandmaster of C64
Immortal Grandmaster of C64


Joined: 30 Apr 2009
Age: 38
Posts: 3532
Location: Sweden

PostPosted: Thu May 31, 2012 10:49 am    Post subject: Reply with quote

If I understand this correctly, it seems that if you load a basic program that uses the two letters P and I together as a variable (or constant) name, it is wrongly changed into the pi-sign. Right?

Perhaps a bit annoying... especially if PI is 297 and you write something like PK=23+PI and it ends up a little more than 26 instead of the expected result.

I still had 1.5.0 installed and tried it there - PI was not translated to the pi-sign, updating to 2.3.0 and this error appeared.

0 I=1+PI
was changed to
0 I=1+π

IMHO if you want a replacement for the pi-sign it should be {pi} or similar, or maybe "tilde" ~.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Thraka
Newbie


Joined: 01 Jan 2007
Age: 32
Posts: 35
Location: Washington State

PostPosted: Fri Jun 01, 2012 7:12 pm    Post subject: Reply with quote

Would it be possible to add code file level constants? For example in BASIC I could do this with the comments instead of adding them in the editor's settings:

Code:
!-CONST ADDR_VIDMODE      53270
!-CONST ADDR_SCREENMEM    53272
!-CONST ADDR_CHARMEM      1024



Another suggestion I just thought of would be using the same comment system to declare subs by name. This would work into your renumbering system too:
Code:
!-DECLARE SUB PRINTVARS 110
10 A$ = "test"
20 GOSUB PRINTVARS
.. bunch of code
110 PRINT A$
120 RETURN

-OR- another way to do this would be to create a faux sub label system. The text parser would match up the sub and substitute the line number below the sub declaration. This may be the best way.
Code:
10 A$ = "test"
20 GOSUB PRINTVARS
.. bunch of code
!- SUB PRINTVARS
110 PRINT A$
120 RETURN



Also, using 2.3.0 whenever I run a program I get this error:

Code:
System.MissingMethodException: Method not found:
'FastColoredTextBoxNS.VisibleState FastColoredTextBox.NS.Line.get_VisibleState()'.
  at CBMPrgGen.Project.SaveOpenFiles()
  at CBMPrgGen.Project.SaveProject(Object bSaveFiles)
Back to top
View user's profile Send private message
ajordison
Über Groupie
Über Groupie


Joined: 09 Apr 2008
Posts: 349
Location: Hartlepool, UK

PostPosted: Fri Jun 01, 2012 9:20 pm    Post subject: Reply with quote

e5frog wrote:
I still had 1.5.0 installed and tried it there - PI was not translated to the pi-sign, updating to 2.3.0 and this error appeared.
OK I understand the problem now. I'll revert it back to the way it worked in version 1.5.0
_________________
Try out CBM prg Studio over at www.ajordison.co.uk
Back to top
View user's profile Send private message Visit poster's website
ajordison
Über Groupie
Über Groupie


Joined: 09 Apr 2008
Posts: 349
Location: Hartlepool, UK

PostPosted: Fri Jun 01, 2012 9:30 pm    Post subject: Reply with quote

Thraka wrote:
Would it be possible to add code file level constants? For example in BASIC I could do this with the comments instead of adding them in the editor's settings:

Code:
!-CONST ADDR_VIDMODE      53270
!-CONST ADDR_SCREENMEM    53272
!-CONST ADDR_CHARMEM      1024

This is a good idea, I'll add it to the next version.

Thraka wrote:
Another suggestion I just thought of would be using the same comment system to declare subs by name.
I thought of doing something like this a long time ago but I was reluctant to do it as it's changing basic into something else. Plus it makes renumbering the program a nightmare!

Thraka wrote:
-OR- another way to do this would be to create a faux sub label system.
This could work better, I'll look into it.

Thraka wrote:
Also, using 2.3.0 whenever I run a program I get this error:

Code:
System.MissingMethodException: Method not found:
'FastColoredTextBoxNS.VisibleState FastColoredTextBox.NS.Line.get_VisibleState()'.
  at CBMPrgGen.Project.SaveOpenFiles()
  at CBMPrgGen.Project.SaveProject(Object bSaveFiles)


Did you uninstall a previous version and install the new version properly? The error is an incompatible version of the FastColoredTextBox is on your system.

Thanks for the suggestions!
_________________
Try out CBM prg Studio over at www.ajordison.co.uk
Back to top
View user's profile Send private message Visit poster's website
Thraka
Newbie


Joined: 01 Jan 2007
Age: 32
Posts: 35
Location: Washington State

PostPosted: Fri Jun 01, 2012 10:14 pm    Post subject: Reply with quote

Thanks! That was the problem.

Is there a way to use the ASM editor to generate DATA statements for BASIC? It would be cool to write small routines in ASM and suck them out into a DATA statement for the BASIC code i'm writing. It would be neat to reverse it too.
Back to top
View user's profile Send private message
ajordison
Über Groupie
Über Groupie


Joined: 09 Apr 2008
Posts: 349
Location: Hartlepool, UK

PostPosted: Sat Jun 02, 2012 7:03 am    Post subject: Reply with quote

Yes, there's a 'generate basic loader' in the tools menu. You can use the memory tool to disassemble memory too.
_________________
Try out CBM prg Studio over at www.ajordison.co.uk
Back to top
View user's profile Send private message Visit poster's website
Eight Bit
Newbie


Joined: 10 Jan 2005
Age: 38
Posts: 6

PostPosted: Sat Jun 02, 2012 10:13 pm    Post subject: Reply with quote

Hi! Your app made me pick up an old piece of code I was working on 5 years ago! Good job Smile

The old assembly code was written with relaunch64 and assembled with ACME at the time.
Now I imported it in CBM PGR Studio, changed some of the different formatting stuffs and all seems good but I still get errors when trying to write a PRG of my code.

I don't get it as it used to work before and doesn't now Smile

I have a repeating location comparing routine that branches on when not equal. like this:


Code:
                LDA $D001
                SBC #$32
                LSR
                LSR
                LSR
                CMP #$01
                BNE NOT1
                LDA #<RY1
                STA WELKERY+1
                LDA #>RY1
                STA WELKERY+2
                JMP XROWREAD
NOT1        CMP #$02
                BNE NOT2
                LDA #<RY2
                STA WELKERY+1
                LDA #>RY2
                STA WELKERY+2
                JMP XROWREAD
NOT2        CMP #$03
                BNE NOT3
                LDA #<RY3
                STA WELKERY+1
                LDA #>RY3
                STA WELKERY+2
                JMP XROWREAD
NOT3        CMP #$04

etc.


This works fine, until I get to NOT0B, then it says: Invalid branch " BNE NOT0B" for all that follow 0B while they're still the same style? Also the branch is only a few bytes....



Code:
NOT0A        CMP #$0B
                BNE NOT0B
                LDA #<RY11
                STA WELKERY+1
                LDA #>RY11
                STA WELKERY+2
                JMP XROWREAD
NOT0B           CMP #$0C
                BNE NOT0C
                LDA #<RY12
                STA WELKERY+1
                LDA #>RY12
                STA WELKERY+2
                JMP XROWREAD

etc. All error from here on


Am I doing something wrong? Or is it a bug?
Back to top
View user's profile Send private message
ajordison
Über Groupie
Über Groupie


Joined: 09 Apr 2008
Posts: 349
Location: Hartlepool, UK

PostPosted: Sun Jun 03, 2012 8:28 am    Post subject: Reply with quote

Eight Bit wrote:
Hi! Your app made me pick up an old piece of code I was working on 5 years ago! Good job Smile

Thanks! Which version of prg Studio are you using? I assembled your code fragment without a problem.

Can you pm me with all of your code so I can test it properly?
_________________
Try out CBM prg Studio over at www.ajordison.co.uk
Back to top
View user's profile Send private message Visit poster's website
Eight Bit
Newbie


Joined: 10 Jan 2005
Age: 38
Posts: 6

PostPosted: Sun Jun 03, 2012 11:42 am    Post subject: Reply with quote

Hi! I've pm'd you with a dropbox link containing the entire project.

Mind it's an import of over 5 years old Wink

Edit: I use Release Version 2.3.0
Back to top
View user's profile Send private message
e5frog
Immortal Grandmaster of C64
Immortal Grandmaster of C64


Joined: 30 Apr 2009
Age: 38
Posts: 3532
Location: Sweden

PostPosted: Sun Jun 03, 2012 5:53 pm    Post subject: Reply with quote

Perhaps there's an invalid invisible byte in the code, try copy and paste or opening it in another editor alternatively open in a hex editor and see if there are any extra bytes that are not supposed to be there.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ajordison
Über Groupie
Über Groupie


Joined: 09 Apr 2008
Posts: 349
Location: Hartlepool, UK

PostPosted: Sun Jun 03, 2012 10:32 pm    Post subject: Reply with quote

e5frog wrote:
Perhaps there's an invalid invisible byte in the code, try copy and paste or opening it in another editor alternatively open in a hex editor and see if there are any extra bytes that are not supposed to be there.

Thanks for the suggestion. I've been this bug before and it's triggered when projects are over a certain size, however I don't know what that size is!
_________________
Try out CBM prg Studio over at www.ajordison.co.uk
Back to top
View user's profile Send private message Visit poster's website
Neo-Rio
C64 Enthusiast
C64 Enthusiast


Joined: 21 Oct 2003
Posts: 720

PostPosted: Mon Jun 04, 2012 12:07 am    Post subject: Reply with quote

Two issues that I would LOVE cleared up.

* The close/reopen - reformat code bug.
* A Commodore 64 font for the editor. I am getting SO confused between lower case l and 1 that I'm not seeing these bugs when recheck my code.
Any way of adding one? There aren't many fonts to choose from....
Back to top
View user's profile Send private message
ajordison
Über Groupie
Über Groupie


Joined: 09 Apr 2008
Posts: 349
Location: Hartlepool, UK

PostPosted: Mon Jun 04, 2012 8:59 am    Post subject: Reply with quote

Neo-Rio wrote:
* The close/reopen - reformat code bug.

Erm remind me of this again? Smile

Neo-Rio wrote:
* A Commodore 64 font for the editor.

The editor I use only works with monospaced fonts, so I made the font browser only show those fonts. However when I turned the 'monospaces fonts only' flag off I managed to use a 64 font (it looks really good!). I'll unset the flag in the next version. The control really isn't meant for variable pitch fonts though so beware!
_________________
Try out CBM prg Studio over at www.ajordison.co.uk
Back to top
View user's profile Send private message Visit poster's website
Eight Bit
Newbie


Joined: 10 Jan 2005
Age: 38
Posts: 6

PostPosted: Mon Jun 04, 2012 9:12 pm    Post subject: Reply with quote

Quote:
Thanks for the suggestion. I've been this bug before and it's triggered when projects are over a certain size, however I don't know what that size is!

I could try to chop the code up into different asm files maybe? Are lables shared in between .asm's?
Back to top
View user's profile Send private message
ajordison
Über Groupie
Über Groupie


Joined: 09 Apr 2008
Posts: 349
Location: Hartlepool, UK

PostPosted: Mon Jun 04, 2012 10:09 pm    Post subject: Reply with quote

Eight Bit wrote:
I could try to chop the code up into different asm files maybe? Are lables shared in between .asm's?

That's a good idea and worth a try if you've got the time.

You'll also need to set the build order from the project properties dialog and make sure you tick the 'all macros and labels are global' box. Let me know if you need more detailed instructions with this, or have a look at the help.
_________________
Try out CBM prg Studio over at www.ajordison.co.uk
Back to top
View user's profile Send private message Visit poster's website
Neo-Rio
C64 Enthusiast
C64 Enthusiast


Joined: 21 Oct 2003
Posts: 720

PostPosted: Wed Jun 06, 2012 12:25 am    Post subject: Reply with quote

ajordison wrote:
Erm remind me of this again? Smile

"The reformat code" option does nothing on a newly created program in the editor. However, if I save and close the file and reopen it, then the option works.

Quote:
The editor I use only works with monospaced fonts, so I made the font browser only show those fonts. However when I turned the 'monospaces fonts only' flag off I managed to use a 64 font (it looks really good!). I'll unset the flag in the next version. The control really isn't meant for variable pitch fonts though so beware!

I don't understand. Isn't the Commodore font monospaced? Like the real C64?
a C64 font won't be much use to me if I lose monospacing.
Back to top
View user's profile Send private message
ajordison
Über Groupie
Über Groupie


Joined: 09 Apr 2008
Posts: 349
Location: Hartlepool, UK

PostPosted: Wed Jun 06, 2012 7:19 am    Post subject: Reply with quote

Neo-Rio wrote:
I don't understand. Isn't the Commodore font monospaced?

Yes, all the fonts I've tried are monospaced but the windows font chooser dialog doesn't detect them unless I turn the monospace only flag off.

Thanks for the reformat reminder!
_________________
Try out CBM prg Studio over at www.ajordison.co.uk
Back to top
View user's profile Send private message Visit poster's website
Eight Bit
Newbie


Joined: 10 Jan 2005
Age: 38
Posts: 6

PostPosted: Fri Jun 08, 2012 11:52 am    Post subject: Reply with quote

Thank you for your help and fixing the bug man!
I'll donate some moneys to you later so you can treat yourself to a beer of me Smile
Back to top
View user's profile Send private message
Mogwai
Über Groupie
Über Groupie


Joined: 20 Oct 2011
Age: 48
Posts: 342
Location: Netherlands

PostPosted: Fri Jun 08, 2012 12:59 pm    Post subject: Reply with quote

Eight Bit wrote:


Code:
                LDA $D001
                SBC #$32
                LSR
                LSR
                LSR
                CMP #$01
                BNE NOT1
                LDA #<RY1
                STA WELKERY+1
                LDA #>RY1
                STA WELKERY+2
                JMP XROWREAD
NOT1        CMP #$02
                BNE NOT2
                LDA #<RY2
                STA WELKERY+1
                LDA #>RY2
                STA WELKERY+2
                JMP XROWREAD
NOT2        CMP #$03
                BNE NOT3
                LDA #<RY3
                STA WELKERY+1
                LDA #>RY3
                STA WELKERY+2
                JMP XROWREAD
NOT3        CMP #$04

etc.



Am I doing something wrong? Or is it a bug?


You could also try to rewrite your code to something like:
Code:

WELKERY   = $30          ; zp address of row-pointer
*=$c000
          LDA $D001     
          SBC #$32       
          LSR
          LSR            ; note one less LSR: A now contains row*2
                         ; for the correct startpoint in our word
                         ; table
          TAX
          LDA WELKERYTABLE,X; get lowbyte of the correct rowaddress
          STA WELKERY+1  ; store it
          INX            ; make x points to highbyte
          LDA WELKERYTABLE,X; and copy that as well
          STA WELKERY+2 
XROWREAD
                         ; done
          RTS
                         ; note that we can't use RY1 etc after the 'word' keyword
                         ; so we translate
RY1       = $0400
RY2       = $0400+40
RY3       = $0400+80
; etc
                         ; into:
WELKERYTABLE
          word      $0400,$0400+40,$0400+80 ; etc.

Back to top
View user's profile Send private message
Eight Bit
Newbie


Joined: 10 Jan 2005
Age: 38
Posts: 6

PostPosted: Fri Jun 08, 2012 1:45 pm    Post subject: Reply with quote

Nice work-around! I would have given that a shot if ajordison wouldn't have fixed the label bug for me Smile It works now though so there's no real need for me to change the code anymore.

Nice to see different coding approaches though, I'll keep it in mind for any fututre projects or similar problems! Smile
Back to top
View user's profile Send private message
ajordison
Über Groupie
Über Groupie


Joined: 09 Apr 2008
Posts: 349
Location: Hartlepool, UK

PostPosted: Fri Jun 08, 2012 8:18 pm    Post subject: Reply with quote

Eight Bit wrote:
Thank you for your help and fixing the bug man!
I'll donate some moneys to you later so you can treat yourself to a beer of me Smile
Thanks, it's all part of the service!
_________________
Try out CBM prg Studio over at www.ajordison.co.uk
Back to top
View user's profile Send private message Visit poster's website
Tomi Malinen
Groupie
Groupie


Joined: 21 Sep 2002
Age: 34
Posts: 179
Location: Finland

PostPosted: Mon Jun 11, 2012 3:36 pm    Post subject: Reply with quote

I'm trying to make a simple BASIC program with sprite data.

How do you generate a prg-file of the BASIC program so it will include the sprite data? I have exported my sprites to the memory but after I have compiled the prg file the memory is blank where the sprite data should be.

I'm guessing it only exports the code and makes the BASIC listing but how do I include the sprites?

My BASIC listing:
2049 ($0801) - 2655 ($0A5F)

My Sprite Data:
12288 ($3000) - 12800 ($3200)

I want it to make one file prg out of 2049 ($0801) - 12800 ($3200). How do I do this?
Back to top
View user's profile Send private message
ajordison
Über Groupie
Über Groupie


Joined: 09 Apr 2008
Posts: 349
Location: Hartlepool, UK

PostPosted: Mon Jun 11, 2012 5:27 pm    Post subject: Reply with quote

Tomi Malinen wrote:
I want it to make one file prg out of 2049 ($0801) - 12800 ($3200). How do I do this?


Give this a try:
    Generate your basic program to memory
    In the sprite editor, export the data to memory BUT set the start address to a couple of bytes after where they should be (it'll become clear later!)
    Close the sprite editor and open the memory viewer
    Choose save from the memory viewer menu
    Enter $801 as the start address and whatever the end of your sprite data as the end address (DONT click the include start address)
    Click OK and select *.* in the file type, name it as test.prg (or whatever, as long as it ends in .prg)


That should produce a . prg. You might have to experiment with the sprite export part to make sure the start address is correct! This method has highlighted a bug in the generating to memory part, so thanks for that!

Hope that helps, let me know if you need more details.
_________________
Try out CBM prg Studio over at www.ajordison.co.uk
Back to top
View user's profile Send private message Visit poster's website
Tomi Malinen
Groupie
Groupie


Joined: 21 Sep 2002
Age: 34
Posts: 179
Location: Finland

PostPosted: Mon Jun 11, 2012 6:21 pm    Post subject: Reply with quote

Thanks! I got it working by exporting all of my sprites with two bytes off and then following your instructions. But the solution doesn't really make sense to me. Why doesn't it work if I put the real start address f.e. $3000 ?

edit: nevermind. You explained already.
Back to top
View user's profile Send private message
ajordison
Über Groupie
Über Groupie


Joined: 09 Apr 2008
Posts: 349
Location: Hartlepool, UK

PostPosted: Fri Jun 29, 2012 9:18 pm    Post subject: Reply with quote

Well now that the football's nearly over, fill the void with a new version of CBM prg Studio.

Version 2.4.0 is ready to download at the link below. It's mostly a bug fix but there are new features for C16 and Plus/4 users. Don't worry C128 users, it's your turn next month with VDC support in the screen designer.

Enjoy!

As usual, many thanks to the feature requesters, bug hunters and donators who helped with this release!
_________________
Try out CBM prg Studio over at www.ajordison.co.uk
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Commodore 64 (C64) Forum Index -> New Releases All times are GMT
Goto page Previous  1, 2, 3 ... 8, 9, 10 ... 14, 15, 16  Next
Page 9 of 16

 
Jump to:  
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
Tip: Get C64 Forever for super-comfy C64 emulation with pre-installed games, demos and other goodies!


Powered by phpBB © 2001, 2005 phpBB Group