CDesp

Forum Replies Created

Viewing 15 replies - 1 through 15 (of 32 total)
  • Author
    Replies
  • in reply to: .LDR format to load binary file into memory from tools menu #3958
    CDesp
    Keymaster
    • Topics: 15
    • Replies: 35
    • Total posts: 50
      Up
      0
      Down
      ::

      Hi,

      if you have a .bin file you can create a .ldr text file with this content

      address=$6000
      length=17

       

      $6000 is the hex value you can also use decimal so no $

      17 the length in bytes that you want to load from the .bin file

      In the next version i ll add this file too when you save an object from the assembler to disk.

      in reply to: Space Invaders missing file #3949
      CDesp
      Keymaster
      • Topics: 15
      • Replies: 35
      • Total posts: 50
        Up
        0
        Down
        ::

        Try downloading again

        in reply to: Válid link for 2048 game? #3902
        CDesp
        Keymaster
        • Topics: 15
        • Replies: 35
        • Total posts: 50
          Up
          0
          Down
          ::

          Fixed

          in reply to: Simple programa to print a char on the screen #3896
          CDesp
          Keymaster
          • Topics: 15
          • Replies: 35
          • Total posts: 50
            Up
            0
            Down
            ::

            Hi,

            Org 6000h

            WPTCHAR EQU $3CDF

            ld a,’A’
            DEFW WPTCHAR
            ret

             

            this uses the newbrain OS to print a char on the screen

            if you want to print at a specified location use this

            Org 6000h

            WPTCHAR EQU $3CDF

            ld a,22
            DEFW WPTCHAR
            ld a,10    ;X = Column
            DEFW WPTCHAR
            ld a,15   ; Y= Row
            DEFW WPTCHAR

            ld a,’A’
            DEFW WPTCHAR
            ret

            Usefull screen codes

            22,x,y

            31 ;Clear screen

             

            For built in assembler write the code to source. Click Compile then next to this button the RAM button will put the object code to ram. Next call 24576 to run.

            if you click put object in file then a file names <youfilename>.txt will be created that will have the basic code to run the code like this

            10 Reserve top-24576
            20 For i=0 to 16
            30 Read a:poke 24576+i,a
            40 next i
            50 ?”type CALL TOP to run your code.”
            100 END
            10000 DATA 62,22,223,60,62,10,223,60,62,15

            also a <filename>.blst like this

            5) 6000 3E 16 ld a,22 ;
            6) 6002 DF 3C DEFW WPTCHAR ;
            7) 6004 3E 0A ld a,10 ;
            8) 6006 DF 3C DEFW WPTCHAR ;
            9) 6008 3E 0F ld a,15 ;
            10) 600A DF 3C DEFW WPTCHAR ;
            12) 600C 3E 41 ld a,’A’ ;
            13) 600E DF 3C DEFW WPTCHAR ;
            14) 6010 C9 ret ;

            and ofcourse the <filename>.bin that have the raw bytes.

            The <filename>.GSYM contains the global symbols if you declared any, so you can include it to another source file if you want.

            you can declare globals at the start of the source file usually for projects

            GLOBAL <name>

            GLOBAL test

            test equ 45 or

            test: xor a

            ret

            OR


            @test
            equ 45


            @test
            : xor a

             

             

            • This reply was modified 4 weeks, 1 day ago by CDesp.
            • This reply was modified 4 weeks, 1 day ago by CDesp.
            in reply to: Newbas assembler help #3891
            CDesp
            Keymaster
            • Topics: 15
            • Replies: 35
            • Total posts: 50
              Up
              0
              Down
              ::

              You are right that was all wrong.

              Well here are the keywords i found from the binary

              AFTER ASSEMBLE IS FINISHED PRESSING A KEY SAVES THE BINARY FILE TO UNKNOWNx.BIN ON THE TAPE DIRECTORY
              ASSEMBLE COMPILES THE SOURCE
              LOAD LOADS THE SOURCE FILE (SELECT THE FILE TO LOAD FIRST)
              SAVE SAVES THE SOURCE TO UNKNOWNx.BAS
              DEL <LINENO> DELETES A LINE
              LIST
              NEW CLEARS THE CURRENT PROGRAM
              OLD REINSTATES THE OLD PROGRAM USE AFTER NEW
              PLIST LISTS TO THE PRINTER ANSWER Y ON START (ON THE EMULATOR THAT IS PRINTERNEW.PRN)
              REN <NUMBER> IT RENUMBERS ALL COMMANDS FROM NUMBER (10 IS THE SPACING)
              MEMORY SHOWS FREE MEMORY
              DLOAD NOT WORKING ON TAPE (DISK)
              DSAVE NOT WORKING ON TAPE (DISK)
              RUN LOADS FROM TAPE BUT WHAT
              MAN CRASHES

              • This reply was modified 1 month ago by CDesp.
              in reply to: Newbas assembler help #3884
              CDesp
              Keymaster
              • Topics: 15
              • Replies: 35
              • Total posts: 50
                Up
                0
                Down
                ::

                Hi,

                you can use the built in assembler of the emulator to put the code straight to memory.
                That is good for testing and fast development.
                For Newbas from what i remember you have to save the object file to disk or tape and then make a small
                basic loader to put the bytes to memory.
                Something like this ( i am doing this from memory so some mistakes my exist):
                tape must be at the start of the file, usually the loader precedes the object file, filename is optional
                10 Openin#1,1,”Filename.o”
                15 k=16384:n=<your filesize>
                20 for i=1 to n
                30 get#1,a:poke k,a:k=k+1
                40 next i
                45 close#1
                50 call 16384: Rem if you want to execute the code
                100 end

                for disk change line 10 to
                10 openin#9,9,”filename.o”
                filename is required

                in reply to: Cant download The Valley #3880
                CDesp
                Keymaster
                • Topics: 15
                • Replies: 35
                • Total posts: 50
                  Up
                  0
                  Down
                  ::

                  Try again

                  in reply to: NewBrain on FPGA running and alive. #3876
                  CDesp
                  Keymaster
                  • Topics: 15
                  • Replies: 35
                  • Total posts: 50
                    Up
                    0
                    Down
                    ::

                    VFD on
                    Run 1 elapsed 6.98
                    Run 2 elapsed 7.06
                    Run 3 elapsed 7.14
                    Run 4 elapsed 7.2
                    Run 5 elapsed 6.4 (after put 31 that clears the screen)
                    So it depends of how many chars the screen is showing. That is the busrq/busack. if a line has a1 char then the video circuit enables the cpu after that char, it does not wait for the line to end.
                    with put 31:run elapsed 6.38 every time no chars on screen
                    with vfd off the same results so the only the chars on the screen affects the result.
                    with list (so the listing is displayed) i get 7.3 secs

                    in reply to: NewBrain on FPGA running and alive. #3873
                    CDesp
                    Keymaster
                    • Topics: 15
                    • Replies: 35
                    • Total posts: 50
                      Up
                      0
                      Down
                      ::

                      Nice work.

                      Newbrain uses busreq/busack to paint the screen so the real speed is a lot less than 4MHz.

                      That is the reason if you play chess with the fast setting on it disables the screen to go full speed.

                      So for some games like the crossing  the speed should be reduced otherwise it is almost unplayable.

                      in reply to: NewBrain on FPGA running and alive. #3862
                      CDesp
                      Keymaster
                      • Topics: 15
                      • Replies: 35
                      • Total posts: 50
                        Up
                        1
                        Down
                        ::

                        You can try the files that newbrain emulator creates when you select a directory, it should work.

                        Run newbrain emulator with CPM, select a directory, then dont close the emulator, goto the disc directory and there should be a 800kb disk file that you can copy.

                        in reply to: NewBrain on FPGA running and alive. #3858
                        CDesp
                        Keymaster
                        • Topics: 15
                        • Replies: 35
                        • Total posts: 50
                          Up
                          0
                          Down
                          ::

                          Great implementation.

                          Tape files with binary follow ups should automatically change to the next file after each file loads. Like Pacman.bas, it needs to load the pac.screen.bin and the pac.bytes.bin. So it should probably go to a seperate folder and somehow put the files in order, or use a container like .tap.

                          There are also .bas files that are disk files (cp/m) like demo30.bas. this one loads(merge) other bas files depending on the menu you choose, so it needs the cp/m, either the small one or the full with the Expansion. In my fpga i use a new 8K rom on bank 4 that implements a new device 12,13,14,15 (like cp/m) that loads from the sdcard.

                          Newbrain uses all devices the same way as streams so you can replace any device with another.

                          If you need help with the cp/m let me know.

                          in reply to: Loading / Saving #3845
                          CDesp
                          Keymaster
                          Topic Author
                          • Topics: 15
                          • Replies: 35
                          • Total posts: 50
                            Up
                            0
                            Down
                            ::

                            Ok there is a new version that fixes all problems (i think).

                            Please try and let me know.

                            Redownload from the files section

                            in reply to: Loading / Saving #3833
                            CDesp
                            Keymaster
                            Topic Author
                            • Topics: 15
                            • Replies: 35
                            • Total posts: 50
                              Up
                              0
                              Down
                              ::

                              Hi.

                              You can export text through printer.

                              Open#8,8

                              List#8

                              The output will go to the file printernew.txt

                              in reply to: Loading / Saving #3827
                              CDesp
                              Keymaster
                              Topic Author
                              • Topics: 15
                              • Replies: 35
                              • Total posts: 50
                                Up
                                0
                                Down
                                ::

                                Hi,

                                you can try the attached patterns (just overwrite the contents of the folder). They are the same as the mame wave.

                                But be aware you cannot convert a non TAPE file to a wav file. The file you are converting should be a tape file not a disk one.

                                If you want to convert a disk file you can do it by loading it on the newbrain and then poke 19,1 and save it as tape. That will produce a tape file which then you can convert it to a wave file to be written to a real tape and then be read by a real newbrain.

                                Anyway if that doesn’t work i ll have to build me a cable and do some tests.

                                Attachments:
                                in reply to: Loading / Saving #3815
                                CDesp
                                Keymaster
                                Topic Author
                                • Topics: 15
                                • Replies: 35
                                • Total posts: 50
                                  Up
                                  0
                                  Down
                                  ::

                                  Ok i made a tool to do this. I have not tested it.

                                  So here it is https://newbrainemu.eu/download/bin2wave/.

                                   

                                Viewing 15 replies - 1 through 15 (of 32 total)