| View previous topic :: View next topic |
| Author |
Message |
Immortal Grandmaster of C64


Joined: 30 Apr 2009 Age: 38 Posts: 3463 Location: Sweden
|
Posted: Thu May 31, 2012 10:49 am Post subject: |
|
|
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 |
|
 |
Newbie
Joined: 01 Jan 2007 Age: 32 Posts: 35 Location: Washington State
|
Posted: Fri Jun 01, 2012 7:12 pm Post subject: |
|
|
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 |
|
 |
Über Groupie

Joined: 09 Apr 2008 Posts: 341 Location: Hartlepool, UK
|
Posted: Fri Jun 01, 2012 9:20 pm Post subject: |
|
|
| 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 _________________
|
|
| Back to top |
|
 |
Über Groupie

Joined: 09 Apr 2008 Posts: 341 Location: Hartlepool, UK
|
Posted: Fri Jun 01, 2012 9:30 pm Post subject: |
|
|
| 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! _________________
|
|
| Back to top |
|
 |
Newbie
Joined: 01 Jan 2007 Age: 32 Posts: 35 Location: Washington State
|
Posted: Fri Jun 01, 2012 10:14 pm Post subject: |
|
|
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 |
|
 |
Über Groupie

Joined: 09 Apr 2008 Posts: 341 Location: Hartlepool, UK
|
Posted: Sat Jun 02, 2012 7:03 am Post subject: |
|
|
Yes, there's a 'generate basic loader' in the tools menu. You can use the memory tool to disassemble memory too. _________________ |
|
| Back to top |
|
 |
Newbie
Joined: 10 Jan 2005 Age: 38 Posts: 6
|
Posted: Sat Jun 02, 2012 10:13 pm Post subject: |
|
|
Hi! Your app made me pick up an old piece of code I was working on 5 years ago! Good job
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
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 |
|
 |
Über Groupie

Joined: 09 Apr 2008 Posts: 341 Location: Hartlepool, UK
|
Posted: Sun Jun 03, 2012 8:28 am Post subject: |
|
|
| Eight Bit wrote: | Hi! Your app made me pick up an old piece of code I was working on 5 years ago! Good job  |
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? _________________
|
|
| Back to top |
|
 |
Newbie
Joined: 10 Jan 2005 Age: 38 Posts: 6
|
Posted: Sun Jun 03, 2012 11:42 am Post subject: |
|
|
Hi! I've pm'd you with a dropbox link containing the entire project.
Mind it's an import of over 5 years old
Edit: I use Release Version 2.3.0 |
|
| Back to top |
|
 |
Immortal Grandmaster of C64


Joined: 30 Apr 2009 Age: 38 Posts: 3463 Location: Sweden
|
Posted: Sun Jun 03, 2012 5:53 pm Post subject: |
|
|
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 |
|
 |
Über Groupie

Joined: 09 Apr 2008 Posts: 341 Location: Hartlepool, UK
|
Posted: Sun Jun 03, 2012 10:32 pm Post subject: |
|
|
| 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! _________________
|
|
| Back to top |
|
 |
C64 Enthusiast


Joined: 21 Oct 2003 Posts: 702
|
Posted: Mon Jun 04, 2012 12:07 am Post subject: |
|
|
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 |
|
 |
Über Groupie

Joined: 09 Apr 2008 Posts: 341 Location: Hartlepool, UK
|
Posted: Mon Jun 04, 2012 8:59 am Post subject: |
|
|
| Neo-Rio wrote: | | * The close/reopen - reformat code bug. |
Erm remind me of this again?
| 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! _________________
|
|
| Back to top |
|
 |
Newbie
Joined: 10 Jan 2005 Age: 38 Posts: 6
|
Posted: Mon Jun 04, 2012 9:12 pm Post subject: |
|
|
| 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 |
|
 |
Über Groupie

Joined: 09 Apr 2008 Posts: 341 Location: Hartlepool, UK
|
Posted: Mon Jun 04, 2012 10:09 pm Post subject: |
|
|
| 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. _________________
|
|
| Back to top |
|
 |
C64 Enthusiast


Joined: 21 Oct 2003 Posts: 702
|
Posted: Wed Jun 06, 2012 12:25 am Post subject: |
|
|
| ajordison wrote: | Erm remind me of this again?  |
"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 |
|
 |
Über Groupie

Joined: 09 Apr 2008 Posts: 341 Location: Hartlepool, UK
|
Posted: Wed Jun 06, 2012 7:19 am Post subject: |
|
|
| 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! _________________
|
|
| Back to top |
|
 |
Newbie
Joined: 10 Jan 2005 Age: 38 Posts: 6
|
Posted: Fri Jun 08, 2012 11:52 am Post subject: |
|
|
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  |
|
| Back to top |
|
 |
Über Groupie


Joined: 20 Oct 2011 Age: 48 Posts: 342 Location: Netherlands
|
Posted: Fri Jun 08, 2012 12:59 pm Post subject: |
|
|
| 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 |
|
 |
Newbie
Joined: 10 Jan 2005 Age: 38 Posts: 6
|
Posted: Fri Jun 08, 2012 1:45 pm Post subject: |
|
|
Nice work-around! I would have given that a shot if ajordison wouldn't have fixed the label bug for me  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!  |
|
| Back to top |
|
 |
Über Groupie

Joined: 09 Apr 2008 Posts: 341 Location: Hartlepool, UK
|
Posted: Fri Jun 08, 2012 8:18 pm Post subject: |
|
|
| 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  | Thanks, it's all part of the service! _________________
|
|
| Back to top |
|
 |
Groupie


Joined: 21 Sep 2002 Age: 34 Posts: 179 Location: Finland
|
Posted: Mon Jun 11, 2012 3:36 pm Post subject: |
|
|
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 |
|
 |
Über Groupie

Joined: 09 Apr 2008 Posts: 341 Location: Hartlepool, UK
|
Posted: Mon Jun 11, 2012 5:27 pm Post subject: |
|
|
| 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. _________________
|
|
| Back to top |
|
 |
Groupie


Joined: 21 Sep 2002 Age: 34 Posts: 179 Location: Finland
|
Posted: Mon Jun 11, 2012 6:21 pm Post subject: |
|
|
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 |
|
 |
Über Groupie

Joined: 09 Apr 2008 Posts: 341 Location: Hartlepool, UK
|
Posted: Fri Jun 29, 2012 9:18 pm Post subject: |
|
|
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! _________________ |
|
| Back to top |
|
 |
|